sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
6acd7b179511f7fd476e254c8ba9bb08388ff363ea12931817999e3daf485691
R
1,394
37
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import peaks ---- files <- c("db/peaks/ATAC/midbrain_peaks.narrowPeak", "db/peaks/ATAC/limb_peaks.narrowPeak", "db/peaks/ATAC/heart_peaks.narrowPeak") peaks <- lapply(files, importBe...
a0e8a978f3a0dc06b9894ae846b50a2a9807a0406d3ff56324f1274bccda8f77
R
1,400
34
# ========================================================================== # Script: 03_Marker_Gene_Heatmap_Bulk.R # Purpose: Visualization of Marker Genes in Bulk RNA-seq # ========================================================================== library(pheatmap) library(dplyr) library(readr) # 1. Load ...
bbd06840cb072f60730a03db11a06be5884bdfdb1ad249f55b0716aa27dcc846
R
1,402
29
library(GenomicRanges) library(GenomicFeatures) library(dplyr) library(readr) library(VariantAnnotation) library(rtracklayer) library(stringr) library(purrr) clinvar_vcf <- readVcf("data/clinvar_20250421.vcf") clinvar_vcf_gr <- rowRanges(clinvar_vcf) seqlevelsStyle(clinvar_vcf_gr) <- "UCSC" orfanage_txdb <- makeTxDbF...
f358561c934132f97718e436f44e15d06cc368813342826018b5dd278f90823a
R
1,406
41
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import collapsed test sets ---- bed <- importBed("db/bed/collapsed_test_set_paper.bed") # Extract sequence ---- bed[, genome:= tstrsplit(name, "__", keep= 2)] bed[, sequence:= getBSsequence(.SD, genome),...
19461e4b16897e0bec9429955752cae296488124383c20524ae7804aeb2e6e7a
R
1,411
41
#' Ligand-receptor interactions in CellChat database for mouse #' #' The ligand-receptor interaction database curated in CellChat tool #' #' @format A list includes the ligand-receptor interactions #' @source \url{https://github.com/sqjin/CellChat/} "CellChatDB.mouse" #' Ligand-receptor interactions in CellChat databa...
a2d2c1220b65be88b2615efd0ccdae5b9f682f262da8827a82c9cdda2f81ab8b
R
1,417
32
# Open a connection to a log file logfile <- file("tests/test_files/fastq_pipeline_tests/single/outdir/03_featurecounts_single_end/logfile.log", open = "a") # Redirect both output and messages to the file and console sink(logfile, append = TRUE, split = TRUE) require("Rsubread") fc <- featureCounts(files = c("tests/t...
150824004b3f5ed9091487c54a7adead2e33b5df4bc3e4fdb5e1db9ab8bbba44
R
1,451
38
# Open a connection to a log file logfile <- file("tests/test_files/fastq_pipeline_tests/paired/outdir/03_featurecounts_paired_end/logfile.log", open = "a") # Redirect both output and messages to the file and console sink(logfile, append = TRUE, split = TRUE) require("Rsubread") fc <- featureCounts(files = c("tests/t...
9959cddf78632a0d0b17310934560a6b66f982b8839dae7d3f462d7debf45dfe
R
1,456
43
#!/usr/bin/env Rscript ## 00_run_all.R — execute every methylation notebook in order ## ## Outputs: ## ../results/ per-stratum DMP + gene-level + mCSEA + RNA-vs-meth concordance ## ../figures/ per-stratum volcanos + cross-stratum heatmap ## ## Run: ## cd Methylation/r_notebooks ## Rscript 00_run_all.R HERE...
b0dff61f775a4352fae270110ef479bc73d819d7ce35e914059d351c51fdda05
R
1,456
41
#' Read a VCF into a tidy tibble #' #' @param file Path to a VCF file. #' @param info Character vector of INFO‑field keys to pull out into columns. #' #' @return A tibble with at least #' chrom, start, end, ref, alt and one column per element of `info`. #' @examples #' df <- read_vcf("example.vcf", info = c("...
0d1f90d44f1092871d783e1ebf5355ecad4c5861ef55e59b77509460c1c9ac60
R
1,465
50
Modules <- setClass( # Set the name for the class "Modules", # Define the slots slots = c( coverage = "data.frame", abundance = "data.frame", annotation = "data.frame", db="ModuleDB" ), # Set the default values for the slo...
55e742687603c2e2e1247670bc06dc27c9ef1d05ea5db97077eb552d9cc2cd41
R
1,485
65
#### Multivairable LDSC ##### library(devtools) require(GenomicSEM) library(data.table) library(dplyr) ## Set working directory setwd("/mnt/lustre/working/lab_esked/damianWo/Chapter2/1_genomicSEM") ## import all sumstat files traits <- list.files(pattern = "*sumstats.gz$", recursive = TRUE) ## Enter sample prevale...
df3847b805ae2828675ee3f63285f3d4730594024d5dc8c87d206186441b7e9e
R
1,486
49
library(dplyr) library(tidyr) library(ggplot2) my_theme <- theme_bw() + theme( axis.text.x = element_text(size = 20, vjust = 0.5, angle = 90, hjust = 1, color = "black"), axis.text.y = element_text(size = 20, color = "black"), axis.title.y = element_text(size = 25, color = "black"), ...
d716f6ce6e4f620668cc9a2c9c2bb0eebe7bebaa47268a8d0240387affaca05d
R
1,488
36
--- title: "ED Fig 11d-f - EB3 length under CK-666 (DIV-2, raw images)" author: "Lin et al., Nature 2026 (Bradke lab, DZNE)" output: html_notebook params: div: 2 image_pipeline: "raw" summary_variable: "growth_speed_median" pdf_name: "EB3_length.eps" d_drive_source: "D:\\DVElite\\CK666_LA_EB3\\240225_DIV2_EB3...
14815ea3089626a3b56815ce31324e731a5b194078fc2c91240bfc8076b782c7
R
1,498
58
--- title: "Stats_coupling" output: html_document date: "2024-12-17" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} coupl_contr = read.csv("./derivatives/Group/spindles/SP_coupling_contr.csv") coupl_pat = read.csv("./derivatives/Group/spindles/SP_coupling.csv") ``` ```...
60bade1991136a6e49d883f1b9cd9006ec5310a341bd5cfb75ba4aec496688af
R
1,504
63
#!/usr/bin/env Rscript # Author_and_contribution: Jieran Sun & Mark Robinson; Create the script suppressPackageStartupMessages(library(optparse)) option_list <- list( make_option( c("-i", "--input_file"), type = "character", default = NULL, help = "Input containing the aggregated labels." ), make_o...
b4c7e01124ff9033dcdc2d6fb5475c54887092367ef936affbe242853d496890
R
1,507
36
#!/bin/bash #PBS -N gsamixer #PBS -l walltime=6:00:00 #PBS -l select=1:ncpus=8:mem=36GB module load singularity/3.7.1 cd ./MIXER_GSA FILE=($(awk -v var=$PBS_ARRAY_INDEX 'NR==var {print $1}' sumstats.txt)) # custom path & settings export THREADS=8 export MIXER_SIF=./singularity/gsa-mixer-2.1.1.sif export ...
3568d7ad59a525240087542de73684f4b185362a607a3ffc7f213e911f8ea605
R
1,516
53
#!/usr/bin/env Rscript # Author_and_contribution: Jieran Sun & Mark Robinson; implmented method # Author_and_contribution: Peiying Cai; created template # Author_and_contribution: ENTER YOUR NAME AND CONTRIBUTION HERE suppressPackageStartupMessages(library(optparse)) option_list <- list( make_option( c("-i", "...
99c01a1ec6480e850d8cc66a6cb9e5d674371ee8eea60f5ccb2b2a4ef8f1b6a6
R
1,533
48
#!/usr/bin/env Rscript library(GenomicRanges) library(GenomicFeatures) library(rtracklayer) library(dplyr) library(tidyr) library(readr) args <- commandArgs(trailingOnly=TRUE) annotation_gtf <- args[1] predicted_cds_gtf <- args[2] output <- args[3] gencode_CDS <- makeTxDbFromGFF(annotation_gtf) %>% cdsBy(by = "t...
f4c9842a16efa7cab621b34cbcbfdeaab1dd9a2ccffa6f99092527db5c58843b
R
1,551
51
library(rtracklayer) library(GenomicFeatures) library(dplyr) library(ggplot2) library(patchwork) my_theme <- theme_classic() + theme( axis.title.x = element_text(size = 13), axis.title.y = element_text(size = 13), axis.text.x = element_text(size = 12), axis.text.y = element_text(siz...
e4367e5634c53fb8f9e1f7d8f003967c39fa19faafa1199427b9763dc3e646a5
R
1,561
51
# Setup script for the PhysMAP R environment. # # Reviewers / first-time users: prefer # # R -e 'renv::restore()' # # which reads the bundled renv.lock and installs the exact package versions # used to produce the paper figures (R 4.2.1, Seurat 4.3.0, dplyr 1.1.2, ...). # # Run THIS script only when you want to refre...
4693b35086238170c963c33c67c31a12e51090447ae9d3ecec422fa3651badbb
R
1,563
46
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import metadata meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="accessibility" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set=="chr18"] # Create accessibility predicted bedgraph fi...
7efe3ecd792c18152bf87cbc6755e0ce2eb75bd22ab87b338e3971561b18645a
R
1,566
48
rm(list=ls()) library(tidyverse) library(mgcv) library(emmeans) stress_df_long <- readRDS("C:/stress_df_long.rds") stress_df_long$ID <- as.factor(stress_df_long$ID) stress_df_long$Time <- as.factor(stress_df_long$Time) model1 <- gam(VAS ~ Time + s(ID, bs="re"), data = stress_df_long, method ='REML', family...
1bf98948fc3a5115a005d6355b7765029ecb724e6a52b8b9d10c898d076d48e0
R
1,568
48
#!/usr/bin/env Rscript ## 00_run_all.R — execute every transcriptome notebook in order ## ## Outputs: ## ../results/ per-stratum DE TSVs + cross-stratum summary ## ../figures/ per-stratum volcanos + cross-stratum heatmap ## ## Run: ## cd Transcriptome/r_notebooks ## Rscript 00_run_all.R ## ## Or execute the...
3ec1067a297df54f4220f116ac044d7bc45a519555b30a12fa4f9ed4df5f401c
R
1,601
31
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Selected sequences object were created in: # file.edit("git_deepATAC/subscripts/create_clean_list_sequences.R") # Clean list of designed sequences (different EVO/LEDIDI designs...) # file.edit("git_deepAT...
4ebed0fb4dbd47e870fb465e8249e1fa44b107fcf2ce5b4ac30e7f9731262951
R
1,610
40
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import metadata ---- meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="accessibility" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set=="testCenterActBins"] # Output files ---- meta[, ...
0e89949b1bf2e00210b62295ef330efd4befb017f876880c4307e8472e653361
R
1,611
48
#!/usr/bin/env Rscript library(GenomicRanges) library(GenomicFeatures) library(rtracklayer) library(dplyr) library(tidyr) library(readr) args <- commandArgs(trailingOnly=TRUE) annotation_gtf <- args[1] predicted_cds_gtf <- args[2] output <- args[3] gencode_exons <- makeTxDbFromGFF(annotation_gtf) %>% exonsBy(by ...
04c086b911fc83a7476efb6f55e51dc8d45afc91e999d500b6d9e86c1f0f54e6
R
1,614
45
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") require(metap) require(AUCell) require(Matrix) # Import data ---- dat <- readRDS("db/single_cell/subsetted_sc_dataset.rds") # Import motifs ---- mot <- readRDS("Rdata/motif_clusters_paper_3_tissues_single_...
4228146d3a7da89370994b91cf52271e1b22cac5edcd573ffc216e94b49aac9e
R
1,638
34
library(rstanarm) # main package for simple bayesian model implementation library(bridgesampling) # required for using stan derived MCMC samples in bayes factor computations library(bayesplot) # provides diagnostic tools like mcmc_traice library(here) setwd(here()) options(mc.cores=parallel::detectCores()) ...
01aab9ae10b01434f4b913833dcc5b8b3dd7525072fafbb7745386ff848ea8ad
R
1,652
47
library(dplyr) library(ggplot2) library(readr) library(stringr) library(rtracklayer) percolator_res <- read_tsv("nextflow_results/V47/orfanage/hybrid_percolator.tsv") %>% # Replace proteinIds: take the first ID (splitting on comma) mutate(proteinIds = sapply(str_split(proteinIds, ","), `[`, 1)) %>% # Repla...
38ef291606ba41cc035e92b01d966e7d7009610388b05956b734ceca4af097c7
R
1,656
33
# Open a connection to a log file logfile <- file("*PLACEHOLDERPATH*/logfile.log", open = "a") # Redirect both output and messages to the file and console sink(logfile, append = TRUE, split = TRUE) require("limma") design_matrix <- read.table("tests/test_files/test_design_matrix.csv", header=TRUE, sep= ",") design_ma...
9306cf0a83fbb1d092776ba0b77ad8c75db9ca56ceeb4170fbf3b921366c598d
R
1,657
57
library(Gviz) library(biomaRt) library(rtracklayer) library(GenomicFeatures) library(readr) library(dplyr) library(arrow) mart <- useEnsembl("genes", dataset = "hsapiens_gene_ensembl") txdb <- makeTxDbFromGFF("/project/rrg-shreejoy/Genomic_references/GENCODE/gencode.v47.annotation.gtf") df <- getBM( attributes = c(...
6db1d19109a3dc520bb5a6bdaa5cb9753e3d9e0af787df84edcbe2a2063604b2
R
1,659
50
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import metadata ---- meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="activity" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set == "test"] meta <- meta[tissue %in% c("limb", "heart", ...
9790da4bf1467b49fd8d7c77ae3e99263570a7282c14aedc20d5dc61e70a0a1d
R
1,660
50
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import enrichment ---- enr <- readRDS("db/motifs/revision_motif_enrich_atac_vista_designed_vs_rdm_genomic.rds") enr[, sig:= padj<0.05 & log2OR>0 & set_hit>=5] setorderv(enr, c("sig", "log2OR"), -1) # Sel...
42be56fc6959c5870d0b2374968b607775307b82765718a36139f1061e1dad82
R
1,671
63
# Testing for segregation script ## Source scripts source("./R_scripts/segregation.R") source("./R_scripts/segregation_by_type.R") load('./test/testanswer.RData') pass <- list() #### 1. Test segregation() #### m <- matrix(NA,4,4) # Create test data m[1,] <- c(1,4,2,2) m[2,] <- c(4,1,3,2) m[3,] <- c(2,3,1,8) m[4,] ...
65184f7507741a7592550fe71495054f8d0819808a683b60bc5a696800ddfaa9
R
1,700
42
df$seg_asso_proc[1] df$seg_sensory_proc[1] sense_i <- which(label$Chan_system_type_label[i_349]==1) asso_i <- which(label$Chan_system_type_label[i_349]==2) p349 <- label$Power_label[i_349] submat <- cube349[,,1] submat_noneg <- submat submat_noneg[submat < 0 ] <- 0 w.mat <- submat_noneg[sense_i, sense_i] mean_sense...
4c192ae838f5dbe827a03c83af2f14cabab72ff99ba7c53d0885dd5e9617ee53
R
1,701
37
### ### library(readxl) library(biomaRt) ## read in genes geneTab = read_excel("cortical layer marker gene list_1.xlsx") geneTab = as.data.frame(geneTab) colnames(geneTab)[1] = "Gene" ## get human/mouse conversion ensembl=useMart("ensembl",dataset = 'mmusculus_gene_ensembl') MMtoHG = getBM(attributes = c('ensembl_gen...
7749e0e293eb3f972ce4110aea2f8883a38ba3181e75de3c81962fbee2decadc
R
1,704
71
#!/usr/bin/env Rscript # Author_and_contribution: Niklas Mueller-Boetticher; created template # Author_and_contribution: ENTER YOUR NAME AND CONTRIBUTION HERE suppressPackageStartupMessages(library(optparse)) # TODO adjust description option_list <- list( make_option( c("-l", "--labels"), type = "character...
efe32c7e40bd5bf4574bc7f26b20793b4d77dc6f1de0101c5d2075c8b6ba4403
R
1,709
43
# Helper functions that are used in tutorials # probe locations from cross phenotype names - names are in form X[chr]_[start]_[end] (without []) - transform this to 10^9 * chr + probe midpoint get_probe_locs <- function(cross){ locfun <- function(x) {d=lapply(strsplit(substr(x,2,99),"_")[[1]], as.integer);1e9*d[[...
698bd883f4d07e8995b71d5efe191e24598fe2b48e421a08563b1c6e7c55cf78
R
1,712
45
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import metadata ---- meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="activity" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set=="test"] # Output files ---- meta[, mean_contrib_file:...
5cad5453f0aeb0b164f73c1b7a33900438b46ff84de68363b74d391814302339
R
1,724
37
# packages require(xgboost) source("xgboost_script.R") xg_data = readRDS("XgDataMacaqueBC.rds") # Get matrices and cell ids. Note that the matrices represent log(TPM+1) gene expression values train_data = xg_data$train_mat test_data = xg_data$test_mat train_id = xg_data$train_id test_id = xg_data$test_id # We have pr...
c76f69b7e1e361d08402d3d8d2bc70a2108fa5eae796e8e5d05a468914038a19
R
1,732
34
#This is my example with a dataset starting from the seurat object #included libraries library(magrittr) library(tidyverse) library(Seurat) library(future) library(ggplot2) # Plotting frac of cell populations with boostraped values load(file = "data/bootstraped_sampling_cell_count_genotype_1e4_endo_gs.rda") b %>% ...
1f9caeedee3049832e7ecaebce7716ee0af58bc6b5fd6a956c1ce18b3138a6d3
R
1,746
36
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") require(vlfunctions) # Import metadata ---- dat <- readRDS("Rdata/metadata_ATACSeq_models_processed.rds") # Import mm10 cordinates VISTA ---- coor <- readRDS("db/peaks/vista_tiles_clean.rds") # Check that there is no overlap between test and training/valid ...
3746167003e8da46af2a1d59ccc159f8509df94b66569771a639a9487bbd4ffe
R
1,754
73
library(jaffelab) ## PDF --> Excel using Adobe Acrobat ## Excel --> TSV using Excel ## scan subsequent text file x = scan("HBA_ISH_GeneList.txt", what = "character", sep = "\n") ## get rows for each table ind = c(1, grep("Table", x), nrow(x)) names(ind) = gsub("\"", "", gsub(" ", "", ss(x[ind], "\\.", 1))) names(in...
fb5621ab16f7e85ae401b1d314d7b76c738780d7870d01058ae20b0fefafd9b2
R
1,758
43
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") source("git_deepATAC/function/augmentation_function_tiling_sliding_window.R") # Import vista tiles ---- vista <- readxl::read_excel("/groups/stark/shenzhi.chen/db/VISTA_enhancer_dataset/VISTA2024_AllTissuesReferenceAlleles.xlsx") vista <- as.data.table(vista)...
c4f27aace4c674631d5c3708751578fb3eba3f7fbadfea1b78421a0625558065
R
1,776
50
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import ATAC peaks ---- ATAC <- readRDS("db/peaks/bulkENCODE_confident_ATAC_peaks.rds")[, 1:5] # Import VISTA mm10 peaks ---- vista <- readRDS("db/peaks/vista_tiles_clean.rds") vista$class <- vista$genome...
7a9f86767048e7242026ea4967da2981c8e5f87dba2ae52a95bac441f4b6d967
R
1,780
40
--- title: "ED Fig 11d-f - EB3 length under CK-666 (DIV-2, deconvolved cropped)" author: "Lin et al., Nature 2026 (Bradke lab, DZNE)" output: html_notebook params: div: 2 image_pipeline: "cropped" summary_variable: "growth_lifetime_mean" pdf_name: "EB3_length.eps" d_drive_source: "D:\\DVElite\\CK666_LA_EB3\\2...
3d31f9ed7e8f4e93ca62fbcb5e7ecbb27aa7413a4036d13ab4a4dd3380613031
R
1,782
51
#' Create an Index Matrix for an LDSC Sampling Covariance Matrix #' #' Creates the matrix of index values used to map entries in an LDSC genetic #' covariance or correlation matrix to the corresponding rows and columns of #' its sampling covariance matrix. #' #' @param LDSC_OBJECT An optional LDSC output object contain...
71134d81335d1da17181093993a15a78d3fe12a6f281967a2ca65348fe860cc2
R
1,796
71
## ### library('SingleCellExperiment') library('here') library('jaffelab') library('scater') library('scran') library('pheatmap') library('readxl') library('Polychrome') library('cluster') library('limma') library('sessioninfo') library('reshape2') library('lmerTest') library('WGCNA') ## multithread allowWGCNAThreads(...
4ada1fc4f10b0f18b6eaef8233e7b3c8f98232e3782049db8ed167c07d2e7afd
R
1,798
45
#' Generate data from regularized models. #' #' Generate data from regularized models. This generates data from the background, #' i.e. no residuals are added to the simulated data. The cell attributes for the #' generated cells are sampled from the input with replacement. #' #' @param vst_out A list that provides mode...
6cf2ba096a8f37be2e65f58ee1730fa66777a2bb0fb0c1b2440c48e46b646ba1
R
1,802
57
summaryGLS <- function(OBJECT = NULL, Y = NULL, V_Y = NULL, PREDICTORS, INTERCEPT = T){ #if (length(PREDICTORS[,1]) != length(LDSC_OBJECT$subS)) { # warning("The length of predictors must be the same length as the parameters to be modeled.") #} ###Getting the length of SE estimation predictors if (is....
95c5eb398d696445c96603fb9fbdde5c03221bdb3a70537c0b918658e6d121ea
R
1,812
39
setwd("/Users/zhangyuan/Google Drive/2023_math_reading_neurotransmitter/GitHub") rm(list=ls()) library(ggplot2) library(forcats) # CMI results (shared mode) fname = "results/neurotransmitter/cmi/shared/individual_neurotransmitter_regression_results_shared_mode2_wFDRp.csv" postfix = "barplot_adj_r2_shared_cmi" output...
45bbf8a76122c1efee76811991cf670c56a946a9bc4a675a52642c3725d140b8
R
1,820
60
#Fig. 1e # Feature plot showing the expression of Lepr in different cell clusters library(Seurat) library(patchwork) library(ggplot2) ##--------- ## Load data ##-------- # Use imputed dataset using relative path data_path <- "data/ganglia_seurat_object.rds" if (!file.exists(data_path)) { stop("Seurat object not ...
2edd043b5592b075880e69d7ca318bf7f377cc7d3fdc2be97a8042eee58489be
R
1,845
46
library(lme4) # fits LME model usin REML library(lmerTest) # gets p-values using Satterthwaite corrected df behav_dat <- read.csv('paingen_behav_dat_sid_14_164.csv') heat_dat <- behav_dat[behav_dat$heat == 1,] mdl <- lmerTest::lmer('Yint ~ stimLvl*placebo + (stimLvl*placebo | sid)', data = heat_dat) summary(mdl) ###...
2fcdd54b7918b0f44362b04b708c3bfd574d3b4999d0a76f01f494e76bd1f047
R
1,852
65
binary_search <- function( spe, do_clustering, extract_nclust, n_clust_target, resolution_update = 2, resolution_init = 1, resolution_boundaries=NULL, num_rs = 100, tolerance = 1e-3, ...) { # Initialize boundaries lb <- rb <- NULL n_clust <- -1 if (!is.null(resolution_b...
5981d725a6b26510b37068c337c6b12c1b504af7173eff0cbd771862a377a75c
R
1,852
77
#Fig. 1b # UMAP plot from scRNA Data of mouse superior cervical ganglia (SCG) and stellate ganglia library(magrittr) library(tidyverse) library(Seurat) library(future) library(ggplot2) library(patchwork) ##--------- ## Load data ##-------- # Use imputed dataset using relative path data_path <- "data/ganglia_seurat...
9c32c944454e148190de425fce181dc3d8b836b14793705cd6cc376055d6da43
R
1,858
46
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") require(orthogene) # Import cluster metadata ---- jeff.meta <- "/groups/stark/shenzhi.chen/projects/transferLearningMammalianEnhancerDesign202408/db/motif/motif_annotations.xlsx" meta <- readxl::read_xlsx(j...
6228b4e3ff9ee750cbeee580e4db49a03e8606d7248472dc41a950de284b9143
R
1,860
32
# Open a connection to a log file logfile <- file("*PLACEHOLDERPATH*/logfile.log", open = "a") # Redirect both output and messages to the file and console sink(logfile, append = TRUE, split = TRUE) require("DESeq2") count_data <- read.table("tests/test_files/big_counted.csv", header=TRUE, sep= ",", row.names = 1) des...
6c7d4f816de0917b5d9345fe0e1d44862089b9063eb9a4dba21a2dce75fe1c06
R
1,865
51
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 row_mean_dgcmatrix <- function(matrix) { .Call('_sctransform_row_mean_dgcmatrix', PACKAGE = 'sctransform', matrix) } row_mean_grouped_dgcmatrix <- function(matrix, group, shuffle) { .C...
d8cef8fe0dd324082ba5ddd2e6ec1626f37bda3965f67b8d340d1dcb466d346b
R
1,876
38
# ============================================================================= # install_packages.R # Install all R / Bioconductor / GitHub dependencies for the NPY-GBM pipeline. # Run once before executing the analysis scripts: Rscript install_packages.R # Developed and tested on R >= 4.0 (Methods 4.12). # =========...
6f938bc7ff80b1a0a86dc92c049d0bf03ebb3e48dc73a857bf92a323cc9261a1
R
1,889
41
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") # Make metadata ---- meta <- data.table(bed_file= list.files("db/bed/bulkATAC/", "_test.bed$", recursive = T, full.names = T)) meta[, dataset:= tstrsplit(bed_file, "/", keep= 5)] meta[dataset=="ATAC", c("tissue", "augmentation", "balancing"):= tstrsplit(bed_f...
09537d81f361ef291409d08ff3d5ff569bb5e6e8f4bf4e66faa07f91d04f10f4
R
1,904
46
--- title: "ED Fig 2c - pooled-replicate neurite-actin xcorr (SD envelope)" output: html_notebook --- <!-- ================================================================================ WRAPPER for ED Fig 2c (pooled-replicate CCF with SD envelope). ==================================================================...
130453c3368ea93ce4ca3781f6b9b75802780c4e13c44f8bf144adbf897470bc
R
1,904
81
--- title: "R Notebook" output: html_notebook --- ```{r} library(tidyverse) library(magrittr) ``` ```{r} counts <- as.data.frame(read_csv("OBiroi_bulk_antennal_RNAseq.csv")) rownames(counts) <- counts$GeneID counts <- counts[-1] counts ``` ```{r} cpm <- counts / colSums(counts) * 1000000 cpm ``` ```{r} geneli...
4ee8c47d7c53c3bfb390d2391fc111943038a493aadd5f6f15064210352b2227
R
1,905
52
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") require(Seurat) require(Matrix) # Import data ---- mat <- fread( "/groups/stark/shenzhi.chen/projects/transferLearningMammalianEnhancerDesign202408/db/MouseAtlas/GSE119945_gene_count.txt.gz", sel= 1:3, ...
671efefd1d943da8f187c03b6c110b84773b68d2b3de15d7e4ff9fcfcaa56870
R
1,909
50
library(arrow) library(ggplot2) library(dplyr) # FSM transcript gene type percentages read_parquet("nextflow_results/V47/final_classification.parquet") %>% filter( structural_category == "full-splice_match" ) %>% distinct(associated_transcript) %>% left_join( GENCODE_gtf[, c("transcrip...
8a0d0633ed2ab5af71e5ed91eaefc478525382f08be8b19ffdd04eda8e7b3b36
R
1,909
44
# ========================================================================== # Script: 02_Bulk_vs_PseudoBulk_Correlation.R # Purpose: Correlation between Bulk RNA-seq and Pseudo-bulk from scRNA-seq # ========================================================================== library(ggplot2) library(dplyr) libra...
1e13ea361a97e0246f4a14287e283ef523fbb2a473972a608bf7b3b46140b5f2
R
1,910
67
library(ggplot2) library(scico) library(patchwork) library(readxl) # Load the data Wt_E8_data <- as.data.frame(read_excel("Data_1.xlsx", sheet = "Wt_E8.5_data", col_names = TRUE)) # Plot settings point_size <- 0.8 axis_title_size <- 22 axis_tick_text_size <- 20 plot_title_size <- 28 vjust_pos = -6 # Base theme elem...
dd5b4dea8d0b9b79c35ca4015e9f84045f7db92d96a30c55dbd10315c6e57879
R
1,914
57
suppressMessages(library(Seurat)) suppressMessages(library(ggplot2)) suppressMessages(library(patchwork)) suppressMessages(library(cowplot)) library(tidyverse) set.seed(123) setwd('~/Desktop/project/Ciona_ST/') result_dir <- 'result/result1/featurePlot/' ciona_nc.combined <- readRDS('result/result1/clustering/ciona_n...
ee7d3f10f75b856b3aa8d6404cd328ea2218d3afa0d2af2184ea69c62ff37587
R
1,921
42
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") source("git_deepATAC/function/augmentation_function_tiling_sliding_window.R") require(vlfunctions) # Import ATAC-Seq peaks, vista tiles, control regions and compute overlaps ---- vista <- readRDS("db/peaks/vista_tiles_clean.rds") vista[, start:= start-100]# E...
5b6aa0c5cb7b2abfab781844ec015d3879a78023061691d25e80cfba6c21d14a
R
1,923
75
#!/usr/bin/env Rscript library(GenomicRanges) library(GenomicFeatures) library(rtracklayer) library(dplyr) library(tidyr) library(readr) # Read input files args = commandArgs(trailingOnly=TRUE) annotation_gtf <- args[1] predicted_cds_gtf <- args[2] novel_CDS <- args[3] # Get novel UTRs GENCODE_threeUTRs_gr <- makeT...
53f4fb7cf85744e6a77fe39578de12173948399bb003fe59ca099b83920aec26
R
1,959
46
# ------------------------------------------------------------------------- # Compute FDR-corrected p-values for neurotransmitter regression results # for joint CCA Mode 2 analyses # Author: Yuan Zhang # Date: 2026-04-13 # ------------------------------------------------------------------------- setwd("/Users/zhangyua...
0db6386b7ffcf4aa484de62e6ff8327003d6262b1636b5917169d101a0fa088d
R
1,966
42
#Extended_data_Fig. 5a # DOtplot showing the expression of adrenergic receptors library(magrittr) library(tidyverse) library(Seurat) library(future) library(ggplot2) library(patchwork) ##Load integrated data using relative path data_path <- "data/ganglia_seurat_object.rds" if (!file.exists(data_path)) { stop("Seur...
7e779b1b4589e4c029dfd0c8444529b6ad35501bbdb5853c5aa867e5d01df330
R
1,975
66
## library('SingleCellExperiment') library('here') library('readxl') library('Polychrome') library('rafalib') library('sessioninfo') library('WGCNA') library('lmerTest') ## multithread allowWGCNAThreads(6) ## Functions derived from this script, to make it easier to resume the work sce_layer_file <- here('Analysis...
5d4504d24b1b7bae93ee4453a22b7d026a63266f8ac7a7b4d926c022cababed9
R
1,978
69
############ library(SummarizedExperiment) library(jaffelab) library(readxl) library(VariantAnnotation) library(rtracklayer) library(janitor) # read in sra and supp table info pd = read.csv("he_SraRunTable.txt",as.is=TRUE,row.names=1) pheno = read_excel("41593_2017_BFnn4548_MOESM254_ESM.xlsx", sheet=1) pheno = as.data...
9a7129213b542a5681429f440ab4f035fb02fd5f324aef8aa5c9aaecfaf71ad0
R
1,993
50
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") require(AUCell) require(Matrix) # Import data ---- dat <- readRDS("db/single_cell/subsetted_sc_dataset.rds") # Select cell clusters of interest ---- # dat$counts <- dat$counts[,dat$cells$cluster!="Other"] ...
4029755723fd7d544b6b92c213bfc8ce34468b4601a80ccfeddeb9bada70d758
R
2,020
73
#' Run association test using mix model (GENESIS) #' #' @param pheno : data frame of the phenotype #' @param outcome : as.numeric , outcome to test #' @param covars_prs : covariates to adjust #' @param col_id_name : column ID name that match with rownames and colnames kinship matrix #' @param group.var : #' @param ...
379ef8ec84981195ae5ca27e205c4abb22a8397a5aa174f8174b42c740da3805
R
2,029
44
# Open a connection to a log file logfile <- file("*PLACEHOLDERPATH*/logfile.log", open = "a") # Redirect both output and messages to the file and console sink(logfile, append = TRUE, split = TRUE) require("limma") design_matrix <- read.table("tests/test_files/test_design_matrix.csv", header=TRUE, sep= ",") design_ma...
13541c4361cc0c124d2a695589b65db73b87a5654298fc0e412e8e4377b1f316
R
2,035
69
##################################### # Example of meta d calculation for individual subject and # exemple of trace plots and posterior distribution plots # using the Function_metad_indiv.R # AM 2018 ##################################### ## Packages ---------------------------------------------------------------- li...
09da1bc6f9158f5c42143dd1c7896a03ab15a06e0a44895905ae468b05449082
R
2,037
110
### Genomic SEM Models for MDD and Disease Groups ### library(devtools) require(GenomicSEM) ## Load in LDSC results load("LDSCoutput_CVD.RData") ## CVD-MDD Single Factor Model ## model_CVD <- ' F_CVD=~ NA*HF + CAD + AF + STK F_CVD ~~ 1*F_CVD MDD ~ F_CVD ' model_CVD <-usermodel(LDSCoutput, estimation = "DWLS",...
b5cd13aaa73b3f65f0163b5becd2527ec7863cf5ee6c71cf1d233b29e6b3ec8d
R
2,043
81
ModuleDB <- setClass( # Set the name for the class "ModuleDB", # Define the slots slots = c( directory = "character", modules = "character", hierarchy = "data.frame", module.names = "data.frame", hierarchy.file = "character", module.names....
b47e218bcc85e2aada8f122da3ebc6a0d4cee3a83d3117863aa1ca8e3115d293
R
2,045
69
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import metadata ---- meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="accessibility" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set=="test"] # Plotting parameters ---- Cc <- c("grey...
9a30f9d3f72c5f0493939c2b1aa47f640d1a43a39a6067c86c6d595877dbcf4c
R
2,063
58
# brain-maintenance-lgcm: trivariate latent growth curve model and brain # maintenance index, companion code for Menze et al. (2026). # # Copyright (C) 2026 The authors of Menze et al. (2026). # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License...
618c847da7c526b850c2ea14017d8d5844e444434533de8e3ee6df2822cf956e
R
2,066
82
--- title: "Or mutants antennal RNAseq" output: html_notebook --- ```{r} library(tidyverse) library(magrittr) library(ggrepel) library(readxl) ``` ```{r} anOrMut <- read_excel("Table S1_count-rpkm-DESeq_OR mutant antenna.xlsx", sheet = 1, col_types = c(rep("text", 2), re...
180f8f119bd9de4e8efe34d6617763856a40ea560244cd7712291d6ef2c19657
R
2,073
83
##################################### # Estimate metacognitive sensibility (meta d') for individual subject # # Adaptation in R of matlab function 'fit_meta_d_mcmc.m' # by Steve Fleming # for more details see Fleming (2017). HMeta-d: hierarchical Bayesian # estimation of metacognitive efficiency from confidence rati...
024352421a486b83510bfb6eee7959c177d8e6ecf6ffd16251c72266621f7e02
R
2,087
49
# brain-maintenance-lgcm: trivariate latent growth curve model and brain # maintenance index, companion code for Menze et al. (2026). # # Copyright (C) 2026 The authors of Menze et al. (2026). # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License...
c921a598ed9793d1b5dc1dfef16a038828d16cb8bb238dd36c6b6f42e6259656
R
2,087
83
--- title: "Atonal mutants antennal RNAseq" output: html_notebook --- ```{r} library(tidyverse) library(magrittr) library(ggrepel) ``` ```{r} ato_DEG <- read_csv("ato mutants.csv") %>% as.data.frame() genes <- read_tsv("genelist_beat-side.txt") %>% as.data.frame() %$% gene ``` ```{r} ato_DEG[ato_DEG$Symbol %in% gen...
a260ec418913130e24f25cf3621070025507846d1a0e066763d6600cbe799bd0
R
2,091
56
#!/usr/bin/env Rscript ## 03_bcells_de.R — generated from notebook spec ## Run: Rscript 03_bcells_de.R ## ============================================================ ## # 03 — B cells stratum DE (R/limma) ## ## R/limma rerun of stratum `cell_tissue_case_control_b_cells` from ## `Stratified_Analyses/Expression/`. ...
4c9132cd109a5af056a0bac14a38619dc4a1202fe7ecbbe3fbd83f0cb1c2134f
R
2,113
64
library(biomaRt) library(dplyr) ## set some parameter # DataDir = '/Users/guofanhua/Desktop/gfh/work/StandardBrainTemplateAndAtlas/AllenBrain/' # FileName = 'microarray/' DataDir = '/Users/guofanhua/Desktop/gfh/work/experiment/ASL_Mesoscopic2025/reference/2024NNcode_AHBA_gradients-master/outputs/' FileName = 'expressi...
1f6cb5e2b0c7cbb99003fe25e1a5ed1becc433ad5f5fe943c93f83eb51cd2838
R
2,118
40
# MIT License # # Copyright 2018 Broad Institute # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, ...
7adeae6262cb7e0c0d6decacfbd9fe19943215220422c1f4e677222bb19fbfaa
R
2,126
63
# ======================= # Setup: Paths and Config # ======================= # Setup distance_metric <- 'manhattan' number_permutations <- 10000 ncores <- 4 # Number of CPU cores for MDMR # Variables to include in X (must be column names present in the CSV) and output naming from chosen variables chosen_cols ...
c20478d24884e3c6b0c47baab5c7b45eb1e530f97fe3350088b70d2b2dc34422
R
2,127
57
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") devtools::load_all("/groups/stark/vloubiere/vlite/") # Import data ---- dat <- readRDS("db/contributions/mean_contrib_per_motif_instance.rds") dat <- dat[tissue %in% c("midbrain", "limb", "heart"), .(contrib= mean(contrib.mot)), .(motif, dataset, tissue)] dat...
9147cb0018d9dfd46aca7a8603f3120b389ab8b9e49a8c5eb423662eea073246
R
2,132
51
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") require(vlfunctions) # Bin the whole genome ---- bins <- vl_binBSgenome(BSgenome.Mmusculus.UCSC.mm10::BSgenome.Mmusculus.UCSC.mm10, bins.width = 1001, steps.width = 1000) # Resize to account for later augmentati...
627bf76abdcc729e88919daedbb469cdc7339293622e714d6c9f9f181b1bff65
R
2,133
94
--- title: "Outlier analysis" output: html_notebook --- Winsorizing seems like a better approach to deal with outliers compared to mean imputation. This script will focus on winsorizing all variables before checking for multivariate outliers. # Reading in the data ```{r, message=FALSE, warning=FALSE} library(tidyver...
0c36c42b90b630998b7bb710ca404e210c4973017ed788c70ac9ee322e2ae2df
R
2,135
32
suppressPackageStartupMessages({library(data.table);library(limma)}) S <- "__MS_GEO_ROOT__/Methylation_Data" E <- "__MS_GEO_ROOT__/Expression_Data" CAND <- c("ITGB2","IKZF1","CD79B","LXN","SH3BP4","RUNX3","CASP6","CASP8","DGKQ", "MX1","IFIT1","NUP210","CTSZ","CHL1","ICAM1","HLA-E") dt <- fread(file.path(E,"Co...
8f06d8df2b4dd64880e719d3c214975c426ec9ea744aaf4844e1293b70cfcb64
R
2,135
56
#!/usr/bin/env Rscript ## 05_whole_blood_de.R — generated from notebook spec ## Run: Rscript 05_whole_blood_de.R ## ============================================================ ## # 05 — Whole blood stratum DE (R/limma) ## ## R/limma rerun of stratum `cell_tissue_case_control_whole_blood` from ## `Stratified_Analy...
b035a4c50413d77d7fa5d9a34fa6795022815666407df5645396ab7b7b715c48
R
2,136
57
#!/usr/bin/env Rscript ## 02_tcells_de.R — generated from notebook spec ## Run: Rscript 02_tcells_de.R ## ============================================================ ## # 02 — T cells stratum DE (R/limma) ## ## R/limma rerun of stratum `cell_tissue_case_control_t_cells` from ## `Stratified_Analyses/Expression/`. ...
2dd1e3861cf0a5af6d4fdf38b5c82402d8a344b37bb04e25ef8f6bab1477cfb2
R
2,143
57
#!/usr/bin/env Rscript ## 01_pbmc_de.R — generated from notebook spec ## Run: Rscript 01_pbmc_de.R ## ============================================================ ## # 01 — PBMC stratum DE (R/limma) ## ## R/limma rerun of stratum `cell_tissue_case_control_pbmc` from ## `Stratified_Analyses/Expression/`. Uses the a...
845a6939872ab9fe36ca8f05ea8f72f6451ccf168d05448fe399bc11e0f0ea33
R
2,172
79
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") # devtools::load_all("/groups/stark/vloubiere/vlite/") devtools::load_all("/groups/stark/vloubiere/vlite-dev/") # Import metadata ---- meta <- readRDS("Rdata/paper_metadata_v3.rds") meta <- meta[dataset=="activity" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & ...
4db976c739a1a85e1e4e49fb7901c7962f74da7da4af73425b6a1560074700f3
R
2,173
74
--- title: "R Notebook" output: html_notebook --- <!-- ================================================================================ parac1_file_sorting.Rmd ================================================================================ # Helper utility: PA-Rac1-specific file sorting variant. # Same body shape as...
e4500a0c79ed898c91002cbfe6dce32a0a89e0601e58fe5c3e47a0af6d6024a7
R
2,174
57
#!/usr/bin/env Rscript ## 04_brainwm_de.R — generated from notebook spec ## Run: Rscript 04_brainwm_de.R ## ============================================================ ## # 04 — Brain WM stratum DE (R/limma) ## ## R/limma rerun of stratum `cell_tissue_case_control_brain_wm` from ## `Stratified_Analyses/Expression...
e562c37292b5baf9250bae754a3af7af3519512190cb213b519404d51efd0ef4
R
2,176
67
# Sanity check functions .check_equal_length <- function(left, right) { name_left <- deparse(substitute(left)) name_right <- deparse(substitute(right)) if (!(is.null(left)) & !(is.null(right))) { if (length(left) != length(right)) { stop(paste("Length of", name_left,"and",name_right,"should be equal"),...