sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
e6912bdbb9c71a19728c3113b01ff3b567bf35fa32b1d093e83208ae1b151c0d | R | 9,516 | 219 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# Lloyd-Price, Jason, et al. "Multi-omics of the gut microbial
# ecosystem in inflammatory bowel diseases."
# Nature 569.7758 (2019): 655-662.
#
# The output tables are:
# 1) metadata - subje... |
991baa9243919fdfbdc133f6ad8e2fd500354c28a26a20585317425b4c204b20 | R | 9,518 | 451 | #
# 15th April 2019
# risk factor selection for multivariable MR based on Bayes Factors
# computation is based on summary data which speeds up computation
#
# functions
# summary_mvMR_BF: exhaustive evaluation of all combinations of risk factors
# logBF_summary: compute log10 Bayes factor for indicator on summary da... |
5ed6451a87bf3e8a99129d91af5dd41f33584a4e48386dda52ea759783a85434 | R | 9,530 | 170 | library("here")
library("sessioninfo")
outdir <- "spatialLIBD_files"
pkgname <- "spatialLIBD"
meta <- data.frame(
Title = c(
"LFF_spatial_ERC_SRT",
"LFF_spatial_ERC_SRT_pseudobulk",
"LFF_spatial_ERC_SRT_modeling_results",
"LFF_spatial_ERC_snRNAseq",
"LFF_spatial_ERC_snRNA... |
caf1458b2c32523180034cb551a7b2ea0102ef7ed2834a0dd747e7c48d6c6de5 | R | 9,531 | 277 | #' Sample spatial cluster visualization
#'
#' This function visualizes the clusters for one given sample at the spot-level
#' using (by default) the histology information on the background. To visualize
#' gene-level (or any continuous variable) use [vis_gene()].
#'
#' @param spe A
#' [SpatialExperiment-class][SpatialE... |
c5cac732392252f7d9e5418a4e9872efd0d023fe14b98d536de7ea54e38ed721 | R | 9,539 | 227 | #' Project Bulk ATAC-seq data into single cell subspace
#'
#' This function will Project Bulk ATAC-seq data into single cell subspace.
#'
#' @param ArchRProj An `ArchRProject` object containing the dimensionality reduction matrix passed by `reducedDims`.
#' @param seATAC A `SummarizedExperiment` object containing bul... |
6d50358465c3fdebd16e10d9ce45346bd56b73621a1911e6d1ff5bcda6daa9fb | R | 9,543 | 217 | render_debarcoder_ui <- function(...){renderUI({
fluidPage(
fluidRow(
column(4,
fluidRow(
column(8,
p("Current barcode key")
),
column(4,
actionButton("debarcoderui_select_... |
54b12b8e81e1b77fcecdb979fceb9a6c813f0be3dd7bf801ae510bcec1699ded | R | 9,549 | 218 | #' Runs MetaNeighbor
#'
#' For each gene set of interest, the function builds a network of rank
#' correlations between all cells. Next,It builds a network of rank correlations
#' between all cells for a gene set. Next, the neighbor voting predictor
#' produces a weighted matrix of predicted labels by performing m... |
fc66e908e3d17e20d22842bb36b1a16e56d62d8e1e6a2721ef9d75e8b515b200 | R | 9,550 | 244 | op <- choose_malevnc_dataset('VNC')
on.exit(options(op))
test_that("coerce_integerish_clio_fields works", {
df <- data.frame(
bodyid = c("123", "456"),
group = c("123", NA),
class = c("DN", "AN"),
stringsAsFactors = FALSE
)
out <- coerce_integerish_clio_fields(
df,
types = c(bodyid = "int... |
369ed102894c364f6be129bcc9d0fa158e43180a565343a3ba8ea5e00432ac59 | R | 9,565 | 271 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(here)
library(lme4)
library(ggplot2)
library(ggpubr)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
library(glue)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------... |
b67697bac629ff8e340599e80f69c27880e3b58fffdb9ead78d4d74fbcee7c5d | R | 9,565 | 224 | ## ============================================================================
## Maximum-likelihood phylogeny pipeline (publication-grade)
##
## End-to-end ML phylogenetic reconstruction from a FASTA file:
##
## 1. Multiple sequence alignment with MAFFT (preferred for publication)
## with an automatic fallback... |
61c031e2f5ed5c1b262385aa8a1768bf431e61431e3663e74b83d09a933361bc | R | 9,566 | 250 |
## Figure 1 ####
tell_user('done.\nCreating Figure 1...')
resx=300
png('display_items/figure-1.png',width=6.5*resx,height=4.0*resx,res=resx)
layout_matrix = matrix(c(1,2,3,3,
1,2,3,3,
4,4,4,5), nrow=3, byrow=T)
layout(layout_matrix, widths=c(.75, .75, 1, 1))
panel =... |
35d2a72f0aef375e0cf714727c9c4255bd08516b701c65abe042d09ed3492859 | R | 9,570 | 209 | rm(list = ls())
#### Load packages ####
library(lme4)
library(lmerTest) # will enhance the lme4 summary by df's and p-values
library(pbkrtest) # required by lmerTest for Kenward-Roger's
library(ggplot2)
library(GGally)
library(plyr)
library(lsmeans)
library(gridExtra)
library(Rmisc)
library(psychometric)
library(boot)... |
5f9698090e6f8cbb389d6eeeba318829bfeb4499afb2d76ce119cf4353d5db2e | R | 9,590 | 256 | #' Load required packages
load_dependencies = function() {
# Install and load CRAN packages
cran_packages = c("purrr", "dplyr", "parallel")
for(pkg in cran_packages) {
if(!require(pkg, character.only = TRUE)) {
install.packages(pkg)
library(pkg, character.only = TRUE)
... |
cde1366d6efeff80218f270f3bd8f9ee393a7900d3d6bb739e36fdcedcf112fa | R | 9,590 | 164 | dyn_load_detect_online <- function(path_to_online_sac_detect = "/home/richard/Dropbox/PROMOTION WORKING FOLDER/Projects/Online Saccade Detection/GITHUB/R",
fun_name = "detect_saccade_for_R.so") {
# This function loads the compiled C function.
# To compile, run in console: R CMD ... |
ad6e734f0bb430a8e93667e4d90bd376bde238d634582d89d59e7c8413ffd021 | R | 9,591 | 288 | rm(list = ls())
# library(sojo)
library(Matrix)
# load('sojo_test_data/sojo_input.Rdata')
sojo <-
function(sum.stat.discovery, sum.stat.validation = NULL, LD_ref, snp_ref, v.y=1, lambda.vec=NA, standardize = T, nvar = 50){
colnames_input <- c("SNP", "A1", "A2","b", "se", "N")
colnames_lack <- setdiff(co... |
578c5ae9cdae6894e6d612d3e9344ee944a3ea69f5cdaa285e982c6f0a129281 | R | 9,596 | 274 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(here)
library(lme4)
library(ggplot2)
library(ggpubr)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
library(glue)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------... |
1bc335c58cdb970455c3dd3bcb220fa22daa486bcd5e15f21c58f36d2ec188ea | R | 9,605 | 408 | ---
title: "Evaluate correlation between brain and blood samples of significant CpGs and DMR regions using the LONDON dataset"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
... |
828e35a71d6fc584bacaf6ad9cb50c3078c747b9b96898ca2c2b8d6bcb8d0308 | R | 9,612 | 313 | library(ggplot2)
library(reshape2)
library(dplyr)
library(scCustomize)
library(patchwork)
library(RColorBrewer)
library(viridis)
library(stringr)
library(pheatmap)
# Extract the neuronal cluster annotations------------------------------------------
neurons <- c("JGN1",
"JGN2",
"JGN3",
... |
2bf4824c6cbeb6e880ed9d975cb380b38e018ad8245c050f0f340df0212f6b12 | R | 9,617 | 361 | ---
title: "Abud vs Villani, after combat - sample to sample correlation"
author: "Izaskun Mallona, Mark D. Robinson's lab, UZH"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
code_download: true
number_sections: true
df_print: k... |
937bff8d4ec441c4e7d96ec9af722818c40dfe8b47e9afec48e6521335afe963 | R | 9,622 | 330 | ---
title: "Check the subset of patients identified by Astro and Micro-PVM expression"
author: "Wei Sun"
date: "`r Sys.Date()`"
output:
html_document:
theme: journal
highlight: tango
toc: true
toc_depth: 3
toc_float:
collapsed: true
smooth_scroll: false
number_sections: false
df... |
2539d303ec16029c4379a40d2c167884805e4834cc84105b033efc0e6c8099f1 | R | 9,644 | 249 | #' Convert .gmt files into a binary matrix.
#' @param signature A file containing gene sets (signatures) in .gmt format. These gene sets will be used to de-sparsify the gene-level mutation scores.
#' @param cagenes A vector of genes, for example of cancer-associated genes. This will be used to subset the gene-level mut... |
6c7d2471834234cec965b1fd5e0b95e6d0680179f468e42d6777188e9a4c171b | R | 9,655 | 274 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(here)
library(lme4)
library(ggplot2)
library(ggpubr)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
library(glue)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------... |
d11340a16e0d22acd9c1df03656028c47530700e83b93493b087dfc545c3e193 | R | 9,655 | 220 | suppressPackageStartupMessages({
library(dplyr)
library(purrr)
library(stringr)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Training")) && dir.exists(file.path(current, "PLOS-Submission"))) r... |
24ea59c609e0d6c700f3feebfef26ec26ed9b93384d2b2243e949bc1eb89ede4 | R | 9,659 | 251 | #' MODULE Genotype Matching Script
#'
#' This script performs genotype matching for MODULE analysis by:
#' 1. Loading and processing genotype data from bim files
#' 2. Matching SNPs with MODULE reference databases
#' 3. Handling allele flipping and complementing
#' 4. Converting matched genotypes to VCF format
... |
02ecd23903c92d96e4cf0a8686130b56e16ed1bfcb7e03c65451bea31f1634a9 | R | 9,675 | 200 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# Poyet, M., et al. "A library of human gut bacterial isolates
# paired with longitudinal multiomics data enables mechanistic
# microbiome research." Nature medicine 25.9 (2019): 1442-1452.
# ... |
8e6a244f83fa6262d9625fe34c7f8d5d6bcfa6a8eaa97a10fe821331574d8e2f | R | 9,675 | 284 | ###############################################################################
## Standalone SynGO GSEA Analysis Runner
## Loads checkpoints and runs SynGO analysis independently
###############################################################################
message(strrep("=", 60))
message("Starting standalone Syn... |
88dded76e79b4b135e35508e4628b795b1a64ff96b51838b15e28155a74e3554 | R | 9,680 | 229 | #PCA
#http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#R_clustering
#http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#clustering_pca
#http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/My_R_Scripts/my.colorFct.R
args<-commandArgs(TRUE)
genome_species_list = sprintf("%s", args[1])
vir_taxa_file = sp... |
c258f8a94e3fedc7ece4048a4a9346339138c8c2e86b7c913dacaf318ca1ab90 | R | 9,683 | 253 | # ============================================================
# Developmental GAMs across MIND feature sets
# 1. Test significance of non-linear age term for every region
# 2. Plot example fit + first derivative
# Outputs -> output/gam/
# ============================================================
suppressPackag... |
da015773d89b76e342927c427118e8569e36c4c90fc171b8bd11f0d3c20b894e | R | 9,683 | 321 | ---
title: "Processing the POU5F1 ChIP-seq data from Ji et al. 2016"
output: html_document
date: "2025-03-06"
editor_options:
chunk_output_type: console
---
# Data download
```{sh download}
pd=/your/project/directory/
wd=$pd/data/validations/POU5F1_ChIP_seq
mkdir -p $wd/fastq
mkdir -p $wd/logs
cd $wd/fastq
for sr... |
02c032a32d44b1efbe0b643d31735484b25ec341720d8172f26df9cfcbc5d096 | R | 9,688 | 346 | ---
title: "Processing the NANOG ChIP-seq data from Barakat et al. 2018"
output: html_document
date: "2025-03-06"
editor_options:
chunk_output_type: console
---
# Data download
```{sh download}
pd=/your/project/directory/
wd=$pd/data/validations/NANOG_ChIP_seq
mkdir -p $wd/fastq
mkdir -p $wd/logs
cd $wd/fastq
for... |
4502f9e3cb877097eb9d64ddd56ccf830e96a46d41487f440c7c4b7eb3968bbe | R | 9,710 | 215 | #### Krause et al. 2025
library(ggplot2)
library(ggrepel)
library(readxl)
library(tidyr)
library(dplyr)
library(tibble)
library(tidyverse)
#*FILL
version <- "final"
# read raw data
# MaxQuant output file generated with MaxQuant v2.6.1.0
raw <- read.table("proteinGroups_v2_6_1_0.txt", sep = "\t", heade... |
649004b5d1c833df226afb40b1f7776d10587bd4eb545c4b57e2404875b68c04 | R | 9,710 | 190 | # This script processes and combines gene expression predictions from two different INGENE models:
# 1. INGENE_EpiXcan: A model that uses epigenetic data for prediction
# 2. INGENE_CIS: A model that uses cis-regulatory information for prediction
# The script selects the best performing model for each gene and combin... |
b8ee5e2b1339910bd7eb92b4c57e55ce7a76678d6cc6f583c402442b5d3c64e1 | R | 9,724 | 203 | ## ============================================================================
## Niche width and niche overlap analysis
##
## This script quantifies two complementary aspects of community ecology:
##
## - Sample-level niche width: how broadly each sample uses the available
## genus pool. Computed with both the ... |
dd41d377eb86b579e01857d067a922847ad474f87c2cb86c1cec85320b13dbc9 | R | 9,742 | 207 | ## ============================================================================
## Covariate-controlled multivariate PERMANOVA
##
## A two-site (or two-group) microbiome comparison is rarely free of
## confounding: samples may differ not only in the focal variable (here, the
## primary grouping) but also in sex, age, s... |
9f914ff00a8ea33a6fac9c2d101b480b68be551898b9fe41124f60966a363e4d | R | 9,745 | 325 | ## pca
full_pca_deseq <- function(dds, plot = FALSE, ntop = 500){
vsd <- vst(dds, blind=FALSE)
# plotPCA(vsd, intgroup="together")
intgroup = "condition"; returnData = FALSE # ntop is usually 500
# pca <- prcomp(vsd)
# loadings <- as.data.frame(pca$rotation)
rv <- rowVars(assay(vsd))
... |
e4c5686c8e818adda6b07e999c4b32a237973884c4e49f1a43c86f6b23e9d547 | R | 9,748 | 219 | library(enrichplot)
library(clusterProfiler)
library(pathview)
bter_pathways <- keggList("pathway", "bter")
obb_pathways <- keggList("pathway", "obb")
vcd_pathways <- keggList("pathway", "vcd")
lsq_pathways <- keggList("pathway", "lsq")
# Specify a new function
keggSpecies <- function(genes_of_interest, kegg_organis... |
dd8c6c0eb7b35b836003bfc72e9579f000791a1d9f0803131f4fb8dd2d87abb5 | R | 9,750 | 239 | library(readr)
LR_CT_ST_IM_1_ <- read_csv("C:/Users/huynhk4/Downloads/LR_CT_ST_IM (1).csv")
library(dplyr)
library(ggplot2)
# 1. Define groups for Var2: mucosa, glands, and disease (perio)
LR_CT_ST_IM_1_ <- LR_CT_ST_IM_1_ %>%
mutate(Group = case_when(
Var2 %in% c("BuccalMucosa", "Gingiva1", "Gingiva2", "Tongue12... |
08992077975770ebdb62ab5b9769dad54126580906ee603342994e7bd919a57a | R | 9,764 | 178 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
efae886fa0f19ff9b2dce0ce52257456af4bd916a5a333021a4b002205772a7d | R | 9,783 | 226 | #' Queries for information about flywire nuclei (helpful for finding somata)
#'
#' @description \code{flywire_nuclei} finds nuclei based on known \code{rootids}
#' or \code{nucleus_ids}
#' @inheritParams flywire_partners
#' @param nucleus_ids ids from the nucleus table to return (optional, NB only
#' one of \code{r... |
ee74f740398f07631e5e9e38bd11dfb8cd714df73f934039d9fbd064e6f110ab | R | 9,787 | 199 | ## ---- message=FALSE, warning=FALSE--------------------------------------------
library(conos)
library(dplyr)
## -----------------------------------------------------------------------------
install.packages('conosPanel', repos='https://kharchenkolab.github.io/drat/', type='source')
## ------------------------------... |
d776caf788976fd5323692cb772963a3c82533e7873e681c3b9cd6d83ecd5f04 | R | 9,790 | 260 | # ============================================================================
# Figure 2F: ISR Activating Drugs — with individual replicate data points
# Journal requirement: show individual data points behind mean ± SEM
# Generates Factor1 + GDF15 plots (not EIF2AK3) for each Parental line
# =========================... |
2508bc505e294d6e7ac7aabd98415468c1dfaa2b7422e717d1300b2aa4aea785 | R | 9,792 | 260 | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("argparse"))
# create parser object
parser <- ArgumentParser()
# specify our desired options
# by default ArgumentParser will add an help option
parser$add_argument("-i", "--input", required=TRUE, help="load snap RData")
parser$add_argument("-s", "--seura... |
9fddf91a49035808028c7cb9495790c642e5f86af0d822493bfbc6600956fb79 | R | 9,801 | 266 | # =============================================================================
# Supplementary Figure 2 — Raw Data and Model Diagnostics for LMM 1
# =============================================================================
#
# Paper: ReFOFA (NCOMMS-24-11279)
#
# This script generates all five panels of Supplement... |
196856b813f8ab8c2164f9a34cb7584fc04a159a35b79280f3b1e7f474e4a2a9 | R | 9,808 | 248 | library(dplyr)
library(ggplot2)
library(pheatmap)
library(UpSetR)
# ANALYSIS: Cell-autonomous vs Non-cell-autonomous DEG Sharing Across Subtypes
# Filter clusters
neuronal_clusters <- c(0, 1, 2, 3, 9, 6, 15, 20, 10, 13, 8, 11, 21, 16, 7)
sig_degs_filtered <- sig_degs_sorted_combined %>%
filter(cluster %in% neuron... |
5641001bd88db18eb56d24fd454f740a551e9b22907f4120b338ba1fb5838d63 | R | 9,828 | 251 | ##################### Exploratory Analysis (Figures 1-2) #######################
# Packages
library(ggplot2)
library(reshape2)
library(stringr)
library(tibble)
library(corrplot)
library(dichromat)
library(dplyr)
################# Figure 1: Heatmap #####################
# Base directory
#setwd("~/FC-Network-Replicab... |
3b40fd9a8061ea891e3875d6a79f1a9464ca532e36a6622e36e07477fc8defa8 | R | 9,834 | 362 |
# Robustness analysis of the age-associated clonal diversity decline in ISCs of the adult Drosophila posterior midgut
rm(list = ls())
library(ape)
library(dplyr)
library(tidyr)
library(purrr)
library(stringr)
library(ggplot2)
library(readr)
library(phangorn)
library(patchwork)
# Load data
load('~/... |
510fcfbb10ded51efebbd3b66227a6b63f9f0886ea80487e9949d5ebff5307b9 | R | 9,840 | 270 | #' Run SynGO GSEA Analysis and Visualization
#'
#' @param tbl Differential expression results table
#' @param contrast Name of the contrast for plot labeling
#' @param T2G Term to gene mapping dataframe
#' @param T2N Term to name mapping dataframe
#' @param n_pathways Number of top pathways to display (default: 30)
#' ... |
4b7e3f8ce7251e163b8cb5411d235fe0ced0a46a518a93aea0936b6f3a9a3e1d | R | 9,850 | 254 | # wd <- '/net//mraid20//export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
library(shaman)
library(viridis)
library(cowplot)
library(stringr)
library(patchwork)
library(ggrastr)
library(ggplot2)
library(ggplotify)
library(rtracklayer)
library(Gviz)
library(Hmisc)
library(biomaRt)
genome <- 'mm10'
trackdb... |
faa1dbdc2ab68f13a33bce2e66a85c410b6dcf9dfd7937f1c7a24439a7e455e3 | R | 9,860 | 222 | library(dplyr)
library(cifti)
library(ggplot2)
library(ggExtra)
library(R.matlab)
library(corrplot);
library(ComplexHeatmap);
library(colorRamp2);
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(dplyr)
library(ggseg3d)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
library... |
dbb826b346e8729c6dead5125fe77ea482ccc9b85483e8696392959972020540 | R | 9,861 | 191 | library(ggrepel)
library(CellPlot)
library(clusterProfiler)
library(org.Hs.eg.db)
library(tidyverse)
library(circlize)
library(RColorBrewer)
library(ComplexHeatmap)
library(fgsea)
library(dplyr)
library(impute)
raw <- read_rds("./input/fhs/epigenomics.rds")
raw <- raw %>% t()
model <- read_rds("./input/best_model.rds... |
0ce4fc4d019c7b62c36926dc25db9881ba086fe653058bdb655f3e45489db1be | R | 9,866 | 263 | # ============================================================================
# Figure 1G: ISR Score Boxplots - FIGURE GENERATION SCRIPT
# ============================================================================
# This script generates boxplots of ISR (Factor 1) scores for each condition,
# sorted by ascending med... |
b4bbf4e4e6a065738dfb3449146f84d65b6671cf494e6352f295eaf23e9f4549 | R | 9,867 | 210 | # Load necessary libraries
library(dplyr)
library(ggplot2)
library(ggrepel)
human_l2fc_df <- DESeq_l2fc_df_FILTERED
Human_groups <- c('FILTERED_1_MTLEALL_NL', 'FILTERED_2_MTLEHS_NL', 'FILTERED_3_MTLE_NL')
Target_comparison <- 'FILTERED_1_MTLEALL_NL'
Target_group_name <- '1'
# Choose Species
Species <- 'Mouse'
ortholo... |
ed841c9628b3c4f24b629e848881c51fa200adbad0a948bba9206c27afaa25c2 | R | 9,886 | 190 | ## ============================================================================
## Dirichlet Multinomial Mixture (DMM) enterotype clustering
##
## This script clusters samples into enterotypes (community types) using the
## DMM model of Holmes et al. (2012), then visualises the clusters in the
## space spanned by Princ... |
14e3b0f645c9276233207a6935299326756d902a975cd6d1f1900936dd16d714 | R | 9,887 | 250 | ---
title: "Figures_1_4"
output: html_document
date: "2025-10-16"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load everything
```{r}
library(dplyr)
library(Seurat)
library(ggplot2)
neural <- LoadSeuratRds(file = "neural_final.rds")
```
Doing some housekeeping quick and re-save - Don't ne... |
83e9e8fc3dfe9f9ca395f6d610034bd58606327ad792e04684d4c872e3ce3d65 | R | 9,889 | 210 | # Uplad species
vcar_matrix <- read.csv("~/2023-species_comparisons/tables/star_counts/vcar_star_featureCounts.csv")
obic_matrix <- read.csv("~/2023-species_comparisons/tables/star_counts/FULL_SET_obic_star_featureCounts_notfilt.csv")
bter_matrix <- read.csv("~/2023-species_comparisons/tables/star_counts/bter_star_feat... |
22ee0cbf1997487762b4e78c3e2d1b8467d8e1623d1bfebf6b58e83940a6870f | R | 9,890 | 281 | ---
title: "tail_figures"
output: html_document
date: "2025-07-18"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load libraries
```{r}
library(ggplot2)
library(dplyr)
library(Seurat)
```
Load tail file
```{r}
tail <- LoadSeuratRds(file = "tail_final.rds")
```
Figure 1B
```{r}
palette <- c... |
dfbd5d0d14c95064a9910a5a00ec8150c51bf99b9fcc67869a4076f2df6c8ce5 | R | 9,891 | 191 | #!/usr/bin/Rscript --slave
# annotated_QR_example_code.R
# 5th May 2026
# Modified: 5th May 2026
# Author: Richard G. Carson (richard.carson@tcd.ie)
#################
# Read the data file
data <- read.csv("example_data.csv", header=TRUE, stringsAsFactors=FALSE)
# Ensure data are numeric
data["mep_amplitude"] <- a... |
1e23fd2c918ab1694836655b796ca24f877976e29c66e8975788e7a9e2a6b264 | R | 9,901 | 145 | #!/usr/bin/env Rscript
library(Matrix)
library(Seurat)
library(tidyverse)
library(readxl)
library(Augur)
calcProbfromChildren <- function(p1, p2, l1 = 1,l2 = 1){
(p1 * l2 + p2 * l1)/(l1 + l2)
}
######################################################################################################################... |
b377766c5724f2abb78430700b0777394dc75bd17c28baf963b4604cc0783d50 | R | 9,908 | 319 | suppressPackageStartupMessages({
library(dplyr)
library(tidyr)
library(ggplot2)
library(purrr)
library(stringr)
library(boot)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Training")) &&
... |
7c38913ac144bff911981ec2b767d2292c01e2c06cb851f591b732e54e030e54 | R | 9,917 | 207 | #!/usr/bin/env Rscript
###############################################################################
## Freeze R Environment - Capture all installed packages and versions ##
###############################################################################
## This script documents all R packages used in the analys... |
32f03343be3f768bb244292c5408826522739cb849d9780a4b4c8ef4d288b94b | R | 9,918 | 224 | #' banc-alignment-discrepancies — Flag super_class discrepancies in optic-lobe alignment.
#'
#' Identifies BANC neurons where the alignment-assigned cell_type implies a
#' different `super_class` than the SeaTable curation, and emits per-row
#' neuroglancer links for review.
#'
#' @section Reads:
#' - `data/optic_lob... |
8098b843759fdd3eb731cf9efe2d53bb5b026107eab13d1f5eeff0013a3ac2f0 | R | 9,947 | 234 | ###############################################################################################
# Script to Preprocess tissue rse data and remove outliers
# This script performs:
# 1. Loads RSE (SummarizedExperiment) data and processes expression assays
# 2. Filters samples by age, race, diagnosis, and genomic info... |
5608cf82b1145f2bf7c37595a2cf36236a4038bc62c5d7c765c24d93710d8678 | R | 9,955 | 417 | ---
title: "Evaluate correlation between brain and blood samples of significant CpGs and DMR regions using the LONDON dataset"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
... |
5a2e1d35f28a10c5865578ec1af1f3add8eea59c55b1f0a9259c40145d694a3e | R | 9,965 | 332 | ---
title: 'WGCNA modules - filter on linear relationship with sample > epi; compute epilepsy linear model betas'
author: "Jon Thompson, Pers lab"
date: "`r Sys.time()`"
params:
date: !r substr(gsub("-","",as.character(Sys.Date())),3,1000)
randomSeed: !r 12345
pValThreshold: !r 0.05
nrepBootstrap: !r 1e4
outp... |
93615369a2fd05459354ecd1e4b0cc536021ff284ca48b4e2574d4a1389d005b | R | 9,970 | 182 | ---
title: "netZooR application with TB dataset"
author: "Tian Wang"
date: "2019-10-16"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{netZooR application with TB dataset}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse... |
ff411586b8373e5d43b783d5c62ad9b7195dab73a803987341bf65c18e704a05 | R | 9,993 | 342 | ---
title: "Processing the PAX6 ChIP-seq data from Xu et al. 2021"
output: html_document
date: "2026-02-12"
editor_options:
chunk_output_type: console
---
# Data download
```{sh download}
ppd=/your/project/directory/
wd=$pd/data/validations/PAX6_ChIP_seq
mkdir -p $wd/fastq
mkdir -p $wd/logs
cd $wd/fastq
for url i... |
54a7b4114a584366ff276b239e43059242a32e61533d837193f79f5c2d1d4ae4 | R | 10,012 | 202 |
#install.packages
library(Seurat)
library(ggplot2)
library(DoubletFinder)
library(dplyr)
library(cowplot)
library(reshape2)
library(MAST)
#load in data from Cell Ranger or other counts data ====
#for loading Cell Ranger counts:
setwd("/athena/ganlab/scratch/lif4001/LG815_TDI/DF_2ndRound_mt5")
LG815_Ctrl_160 <- read... |
d6bc2466b70afea2e7a12781e5c55be0c784096b75b811f71c2802ba694cf37f | R | 10,025 | 232 | ---
title: "Fig3"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE)
```
## Fig. 3: statistics and panel figures: a to d ##
Comparing the effect sizes on mean cortical thickness (CT) and total surface area (SA) of neurodevelopmental and psychiatric disorders (N... |
9c2e36ad948a51114f21c44ddf1e68e7cec4217bdc676abc14a3be79b4ed24c0 | R | 10,027 | 223 | ##########################
### GET MANC META DATA ###
##########################
source("banc/banc-startup.R")
drosophila_neurotransmitters <- "/home/ab714/drosophila_neurotransmitters/"
drosophila_neuropeptides <- "/home/ab714/drosophila_neuropeptides/"
# Run locally
banc.meta.save.path <- "/Volumes/neurobio/wilsonla... |
c7aeed18c29a38fa7632212130013867bfe38c143577260de8e337ba5b46dd62 | R | 10,033 | 216 | ###temp_hotspot_module_GO-----------
library(sceasy)
library(reticulate)
Sys.setenv(RETICULATE_MINICONDA_PATH="~/miniconda")
reticulate::use_condaenv("hotspotenv")
library(SeuratDisk)
SaveH5Seurat(Temp_scRNA, filename = "./temp/temp.h5Seurat")
Excitatory <- readRDS(file = "./temp/Excitatory/Excitatory_anno_cluster_1.r... |
6239fd8a0473f0c9f1667ba26d33d103df25ac80762d2379395a01ba24774e71 | R | 10,040 | 218 | ---
title: "Motor_Neurons"
output: html_document
date: "2025-08-21"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(ggplot2)
library(dplyr)
library(Seurat)
library(scCustomize)
```
Subset dataset and run processing on Interneurons
```{r}
neural <- LoadSeuratRds(file = "neural_fi... |
d23191b72ba99b09a24c00ceda9cff903121a84d8c8f2ae26ae8a49832cb7d22 | R | 10,041 | 398 | ---
title: "Update of ggVennDiagram 1.5"
output: word_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.width = 7
)
```
```{r setup}
devtools::load_all()
library(dplyr)
library(pak)
```
```{r}
genes <- paste("gene",1:1000,sep="")
set.seed(20231214)
x <- list(A=sam... |
dd56c4fb457eaea266de2822d695b147baec3fa8150a25b3a0ae74d6dfb689ad | R | 10,044 | 301 | #### Table Analyzer — Shared ANOVA Module ####
#### Section: UI & Output Binding ####
build_anova_layout_controls <- function(ns, input, info, grid_cache = NULL) {
has_strata <- !is.null(info$strata) && !is.null(info$strata$var)
strata_levels <- if (has_strata) info$strata$levels %||% character(0) else charact... |
9ed48d76fa91a1dba6415e1ea784cdb1486568f4fadb0101889ef4445c30f17e | R | 10,045 | 283 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
######################
### load libraries ###
###... |
d814656b06811398803297a3e6bc654b18c51acc2aedd535cb18ab4867e8cdd8 | R | 10,053 | 307 |
###############################################################################
## Export GSEA results to CSV for Python visualization ##
###############################################################################
## Purpose: Convert all GSEA results from RDS checkpoints to CSV format
## ... |
5aeb7ceb47da0af6ca47cb0b7a9ed572adc725ec8a03b166896bd5c0b1319fa5 | R | 10,054 | 200 | ##################################
# Create UMAP plots for the two tumor types
# Author: Kevin Johnson
##################################
library(tidyverse)
library(RColorBrewer)
library(viridis)
library(Seurat)
library(harmony)
library(Matrix)
library(ggpubr)
library(openxlsx)
library(DoubletFinder)
# Specify output... |
98aa0111759ff91092742a35a35c05ce3d4199026aa48507e4ab8947412d5bd9 | R | 10,065 | 269 | # ==============================================================================
# Generate Genomic Alteration Matrices (GAMs)
# ==============================================================================
# Builds TCGA, MSK, and ICLE GAMs from MAF + GISTIC. Used by 01_load_all_data.R.
#
# Author: Osama Shiraz Shah
#... |
42f53dff21b7030d4074542144bed5c5b4677a9bf7fa33a9b3f74f4b4a18453d | R | 10,066 | 382 | #' Create registered model
#'
#' Creates a new registered model in the model registry
#'
#' @param name The name of the model to create.
#' @param tags Additional metadata for the registered model (Optional).
#' @param description Description for the registered model (Optional).
#' @template roxlate-client
#' @export
m... |
9a745a00e4b545362ff92b7b12599b46312fef43ccb5e928e9f1a6f17248a14c | R | 10,068 | 349 |
local({
# the requested version of renv
version <- "0.11.0-5"
# the project directory
project <- getwd()
# avoid recursion
if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
return(invisible(TRUE))
# signal that we're loading renv during R startup
Sys.setenv("RENV_R_INITIALIZING" = "tru... |
ff6c500333f17ce8edf12823b3007d73a09831974569f7257f50c0835f7666c6 | R | 10,070 | 236 | require(readr)
# ----------------------------------------------------------------
# Utility functions for data loading
# ----------------------------------------------------------------
# Receives a list of metabolite names (or other identifiers) and
# uses MetaboAnalyst's conversion utility to map names to HMDB + ... |
331a567879c3ce480ba78cc9dc8126033620795f33c7f673ce6b4ef69232e926 | R | 10,079 | 290 | ###############################################################################
## GSEA Dotplot Helper Functions ##
## ##
## Reusable functions for creating pooled GSEA dotplots with: #... |
d625e2ce57ef08ae5f0596e27e17e887c70f79343c75781acf6ab6c448959ac8 | R | 10,091 | 236 | # the origin code was from https://matthieuxmoreau.github.io/EarlyPallialNeurogenesis/
# then I made some modifications and added some new functions
#############################################################################
##### This function takes a list of markers and a Seurat v5 object ######
##### and return a ... |
9c35d09cc610d2851052cf7e1e140c90411c0028751c3c3886cbc8ec39dd1b72 | R | 10,102 | 300 | library(Seurat)
library(ggplot2)
library(cowplot)
library(patchwork)
library(dplyr)
library(writexl)
library(stringr)
library(clusterProfiler)
library(DOSE)
library(readxl)
library(org.Mm.eg.db)
library(enrichplot)
library(ReactomePA)
library(harmony)
library(data.table)
library(Matrix)
#Quality Control----
for (i in ... |
94788ae83ab7b9dd91eadc3bd5a53805f39dae34bedd73d616c26f5fdf1ea71a | R | 10,103 | 212 | ##################################
# Analyze malignant cell abundance association with common genetic events in IDH-mutant glioma TCGA dataset.
# Author: Kevin Johnson
##################################
library(tidyverse)
library(RColorBrewer)
library(viridis)
library(ggpubr)
library(openxlsx)
library(EnvStats)
librar... |
ffee24bea669a4c4902fdb969bde004186a8eb31e2c5cf3bed82665c0f5da38e | R | 10,106 | 295 |
library(ggplot2)
library(readr)
data=data.table::fread("C:/Users/huynhk4/Downloads/combined_spatialLDA_PCF_v3 (1).csv")
data=as.data.frame(data)
data_final=data
user_colors <- c(
"Acini" = "cyan", # Acinar Cells
"B cells" = "#FFA500", # B Cells
"DC cells" = "#FFD700", ... |
dae7710eee0e12b3d72736b0d2890cae57b7ebfb90961803649a18cb8ffdf4db | R | 10,114 | 235 | library(tidyverse)
library(psych)
library(performance)
library(lme4)
library(lmerTest)
subj <- c('sub-101','sub-103','sub-104','sub-105')
l1stats <- read.delim('C:/Users/mmatt/Desktop/Projects/NightOwls/night-owls/derivatives/extractions/extractions_L1stats-revised_smoothed.tsv')
l1_mid <- l1stats[l1stats$task=='mid' ... |
94c5b6dfba71f77ec2bb1e83e5744fbbd5004e1d2fdb5d776c3e7d111159b93f | R | 10,115 | 231 | # ============================================================================
# Tissue Proliferation Index — Data Processing Script
# ============================================================================
# Calculates a tissue-level proliferation score from GTEx TPM data using
# three proliferation markers: MKI6... |
b5f6ca701f03b3704d514827b0260bde728fc54e8ea3112b742f6f142ddc00b2 | R | 10,115 | 228 | library(tidyverse)
library(readxl)
library(patchwork)
library(cowplot)
library(writexl)
library(flextable)
library(officedown)
# read the data
raw_data <- read_excel("../Data/SNPs/Mutations.xlsx", sheet = "Summary (2)")
# The data has one column per mutation, we need to have all these column names
# as a single varia... |
d0f6fb1f54f7d0d56d293e7f4bc8608eee0bfdbaf1d4e14711677399e0c6f81a | R | 10,118 | 326 | # ===============================================================
# 🧪 Table Analyzer — Filter Module (Refactored Reactive Version)
# ===============================================================
filter_ui <- function(id) {
ns <- NS(id)
sidebarLayout(
sidebarPanel(
class = "ta-sidebar",
width = 4... |
b4504f5ed29f905e6863db9aa94377c509997995529bf7b640c2ccb0dcc8e00f | R | 10,131 | 238 | # Set working directory to project root
# setwd("path/to/project/root")
load("./predictions/LIBD_training/GTeX.v9/Combined/MLE_common.RData")
regions = names(Common.Predictions.logTPM)
combos = names(Common.Predictions.logTPM$dlpfc)
common.genes.plot = sapply(regions, function(region){
combo.df = sapply(com... |
22be650f1765e991684d982187258d1abe0ab06ad255403a3c72b0ae429d5024 | R | 10,144 | 180 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/1dbebafa-3a45-4982-9682-cbdf2477bc60 ####
##... |
c1ebb0530fc07cdeb28d51ab3fdb8ead45561ee16bb897f42cbe112e6b743819 | R | 10,146 | 306 | rm(list = ls())
library(dplyr)
library(plyr)
library(Seurat)
library(ggpubr)
library(reshape2)
library(tidyr)
library(tidyverse)
library(DropletQC)
source('~/SCRIPTS/utility_functions.R')
#####
## LOAD COUNT MATRIX
#####
# Only the putamen samples
allsamps = rio::import('~/workdir/TABLES/Primate_Tables_From_EmilyOh/C... |
4c9847e624d56bb2ff276a08e967e17e8b88e35a7711227d1a46e12f8d9d0248 | R | 10,156 | 247 | #####################################################################
# INGENE Network Prediction Averaging Helper Functions
#####################################################################
# This script contains functions for averaging and validating predictions
# across different networks in the INGENE pipel... |
2a2d5d9f883eeefc6d289b46b7f7747588e1b6a39822fbc82405074a92969df8 | R | 10,158 | 330 | # ===============================================================
# ?? Regression shared results helpers
# ===============================================================
reg_diagnostic_explanation <- paste(
"The Residuals vs Fitted plot shows how far the model's predictions are from the observed values.",
"A heal... |
a8e79d7dad16090ca7241f207471183c1803dc972ca0e3d3a1c09711f0d3fbdf | R | 10,168 | 373 | ##########################################################################################
# Validation Methods
##########################################################################################
.validInput <- function(input = NULL, name = NULL, valid = NULL){
valid <- unique(valid)
if(is.character(valid... |
f179046805f7968c0ccb8059f0d852f09c551601d39e2d487cc77d56221f6c7f | R | 10,179 | 218 | ## ============================================================================
## Microbial co-occurrence network construction and robustness analysis
##
## This script builds correlation-based co-occurrence networks from a feature
## table, computes their topological properties (modularity, clustering
## coefficient,... |
14a8ee3824a41b1e89b53bac8dec4bd4fa2341120a15e4225cd63ed2b3d1e2c8 | R | 10,183 | 248 |
## Figure 4 ####
tell_user('done.\nCreating Figure 4...')
resx=300
png('display_items/figure-4.png',width=6.5*resx,height=4.5*resx,res=resx)
layout_matrix = matrix(c(1,1,1,1,
2,3,4,5,
6,6,6,6,
7,8,9,10), nrow=4, byrow=T)
layout(layout_matrix,... |
21b1ab33e7933e2ac01a0dcfb461d5a0e84c8fd941cdcd733cbbbb99c1d7e528 | R | 10,230 | 197 | # Set working directory to project root
# drive = "path/to/project/root"
# setwd(drive)
base_dir = getwd()
load("./predictions/LIBD_training/GTeX.v9/Combined/predictions_testing_data_lst.RData")
gtex = readRDS("../../dataset/GTEx/expression/rse_GTEX_cleaned_gtex.rds")
gtex$sACC = gtex$ACC
gtex$dACC = gtex$ACC
... |
a78e4011d3fc5de30f14a2473f7fcc4583ad5a50072754f01d940a1776d14bb1 | R | 10,239 | 269 | library(Matrix)
library(data.table)
library(Rfast)
library(keras)
source("R/ml_features.R")
source("R/ml_tuner.R")
source("R/ml_preprocess.R")
source("R/ml_plot.R")
source("R/ml_modeler.R")
source("R/score_funs.R")
#version 2
#datatype = "bind", "escape", "log_escape"
#wts = "none", "uncert", "fifths", "mahala"
#to us... |
747fd72d222e184e323874e88b599a53398de0e9279a7fa48154ab46053cd2f2 | R | 10,246 | 232 | # METAMODULE GENERATION
### RECOMMENDATIONS FOR METAATLAS ###
# Save a folder for each dataset int your metaatlas, in which all individual Seurat objects and all outputs of individual processing (correlation matrix, cluster assignment dataframe, gene score table) will be saved
# Arguments:
# 1. filepath to .lis file... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.