sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
ac338bd9df339777f57ce4fc5ac637f720ab12d123a16d597f457ee82160be3e
R
28,234
849
--- title: "Folate_ConBP_Females" output: html_document date: "2024-01-12" --- Load RNA-sequencing data, Consensus between Brain and Placenta for males ```{r} library(WGCNA) library(readxl) #only use samples that have #No PCB ; No Folic Acid (0 / No) #No PCB ; Yes Folic Acid (0 / Yes) #Yes PCB ; No Folic Acid (0...
1ed13f2caef8377d33614ce958295c9f72d7bcf6083018a55fd40feb8bbc20f1
R
28,278
920
--- title: "S5: behavioural, DDM-based analysis with ggdmc" author: "I. S. Plank" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true fontsize: 10pt #geometry: margin=0.5in --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, fig.align = 'cen...
14a19f08519c51ca153307a9caa558a48ad9f40029d37b71d590437ed55017a2
R
28,288
822
--- title: "Male_ConsensusBrainPlacenta_PCBonly" output: html_document date: "2023-09-28" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` #Conserved modules between male brains and placenta ```{r} # Display the current working directory getwd(); # If necessary, change the path below to the dir...
b29daf6d82d25d2195b47e098403530e568d34e6d47bbbd7fd63e0bf1770e498
R
28,292
864
#This code currently gets the log2 TMM expression of GDF15, then centers and scales it, and then compared the pc2 score (which also gets centerd and scaled) for each tissue rm(list = ls()) # # BiocManager::install("ComplexHeatmap") # BiocManager::install("edgeR") library(tidyverse) library(edgeR) library(corrr) libr...
1e73a630267842275bbded7a59a3e36063165882689713d931010f8a300900de
R
28,329
689
##################################################################### # Helper Functions for Training Pipeline (Basic Elastic Net) ##################################################################### # Helper function to get file paths get_file_path = function(file_type, brain_region=NULL, chr=NULL, CONFIG) { ...
a933d162af1036f7dba5f46b34c0d403851010908cc668405683f4d75b8b50b5
R
28,409
533
# 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(ggdensity) library(ggseg3d) library(cifti) library(stringr) library(factoextra) library(matrixStats) li...
7b6441b869fbde0f73c705cbc14255d27c5296cbeb38eb09fff34de996e77ae1
R
28,433
894
--- title: "S4: behavioural, HGF-based analysis with brms" author: "I. S. Plank" date: "`r Sys.Date()`" output: pdf_document: toc: true number_sections: true fontsize: 10pt geometry: margin=0.5in --- ```{r settings, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, fig.align = 'cen...
1cd2252ce53083eea3ba949a6fe84c522ebbe769ce10ec3db33bb15335e2d527
R
28,469
741
getuw_fl <- function(ds, lambda1s = NULL, lambda2s = NULL, nlambda1 = 10, nlambda2 = 10, max.iter = 500, iseed = NULL, silent = FALSE) { # dim n2 <- nrow(ds) p <- ncol...
bac9e731784d582fe2512acdd34d75d17288abf613fba69e3d59977a64b10303
R
28,480
962
root="C:/Users/Jun/Documents/R/AA_wSignal/" require(readxl) require("changepoint") require("lubridate") require("colorRamps") freeze_rule=1 #length in seconds for a bout of immobility to trigger freezing itilength=45 #in seconds zbase=2 #in seconds max_shock_time=15 arena=c(21,47,335,178) #xleft, ybot...
116b45d389c244968d19b428e96792bfbbc60b3d54e4f7c94637affe8d551119
R
28,542
573
####*兴奋性神经元分析--------------------------- ####****兴奋性神经元分亚型--------- ####*****加载颜色------- cols <- c(rgb(196,165,222,150,maxColorValue = 255),#L23 rgb(129,184,223,150,maxColorValue = 255),#456 rgb(246,202,229,150,maxColorValue = 255)) #L6 ####*****提取数据-------- Excitatory <- readRDS(file = "./temporal...
5a49c66c465b936a05b8092e7911737bc54f9844ff89c0493b36700a1fbef382
R
28,559
580
#' @title perform_muscat_de_analysis #' #' @description \code{perform_muscat_de_analysis} Perform differential expression analysis via Muscat - Pseudobulking approach - FOR ONE CELLTYPE. #' @usage perform_muscat_de_analysis(sce, sample_id, celltype_id, group_id, batches, covariates, contrasts, expressed_df, assay_oi_pb...
fb1966b0109b06ccb355efc21fb504c4a4cd005da88c58ae4f0668898dab7487
R
28,664
747
########################################################################################## # Doublet Identification Methods ########################################################################################## #' Add Doublet Scores to a collection of ArrowFiles or an ArchRProject #' #' For each sample in the Arr...
c310c52dc5880314fd3f7b7e5abf1e3f375a8bf253942eb25cb65c5b267c8117
R
28,724
544
######################################## ### Calculate rootpoints for neurons ### ######################################## source("banc/banc-startup.R") library(R.utils) message("##### Working out BANC roots #####") numCores <- 1 # Direct us to the BANC dataset bancr::choose_banc() bc <- banctable_query("SELECT _id, s...
9e64fd493d52e2bd47d4c33c68a8d9176f7f187adcf30e687b25d6ebb988ab07
R
28,929
955
--- title: "Expt 7 Ions and protein young mice" output: html_document date: "2025-09-19" editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(tidyverse) library(ggpubr) library(ggplot2) library(dplyr) library(rstatix) setwd("~/Library/Mobile Docume...
f91475bfb6e2e27f9580ee9a2e3b34f035ebfa0005c9e2707e26258839dcd735
R
28,939
623
####*胶质细胞富集功能总结------------- ###***小胶质细胞每个亚群在海马体前后端差异基因-------- Microglial <- readRDS(file = "./Hippo\\subcluster\\Microglial\\anno\\Microglial_sub.rds") celltype <- names(table(Microglial$Anno_Idents)) diff_micro_all <- data.frame(matrix(ncol = 5, nrow = 0)) for (i in 1:length(celltype)) { data <- subset(Microglial,...
ae1982225e1345bceb0bb9a14cab0010e980861795171b03c3231d0598e25be9
R
28,963
816
library(Seurat) library(SeuratObject) library(dplyr) library(Matrix) library(ggplot2) library(patchwork) # Loading datasets WT_data <- Read10X(data.dir = "WT") WT <- CreateSeuratObject(counts = WT_data, project = "WT") PINK1_data <- Read10X(data.dir = "PINK1") PINK1 <- CreateSeuratObject(counts = PINK1_data, project ...
75e262378c11458aa03052957a654d29a2a906b76a1caa4fbc4c71a7e610a11e
R
28,991
762
--- title: "iDOR_transcriptome" author: "Iza-Clarisse" date: "10-02-25" --- This file contains **your original code** with inline comments only. I did **not** change variable names, logic, or function calls. Any potential pitfalls are flagged with `# NOTE:` comments, but the code itself remains exactly as you wrote it...
26bb4720e747fd306a5da01ee7dd24786b73395fe9befca8d4ca72d1963d1901
R
29,023
672
# These functions are used for visualization #' Plot the QC metrics of an individual biological sample #' #' @param data_list A list of Seurat objects. #' @param metrics A string - the name of the QC metrics. #' @param group_by A string - the grouping variable in the metadata. #' @param plot_type A string - the typ...
1d35e67868b9162940b631a80ff1e6c5d5e13a57459bd7310fb9ca0fe0fb2abe
R
29,083
697
required_packages <- c( "dplyr", "data.table", "stringi", "stringr", "ggplot2", "ggpubr", "CMplot", "org.Hs.eg.db", "grid", "VennDiagram", "GenomicRanges", "Gviz" ) load_required_packages <- function(packages) { missing_packages <- packages[!vapply(packages, requireNamespace, logical(1), quie...
24ceea107c913242696af307249b9ec3a1555fbff2ca0b0d73c91bd6f921ad70
R
29,106
636
#' @importFrom dplyr %>% #' @importFrom ComplexHeatmap ht_opt #' @importFrom ComplexHeatmap Heatmap #' @importFrom ComplexHeatmap HeatmapAnnotation #' @importFrom rlang .data #' @importFrom stats setNames NULL ## exporting to inherit parameters below, plotEmbeddings() #' @export sccore::embeddingPlot #' Get a vector ...
ffd42d20b449628bbe10c43a88a2f9c2a9974a0169b60d745f5a2fbdbd5f8be7
R
29,123
551
###亚型分析------------- ###*兴奋性神经元---------- scRNA <- readRDS(file = "./scRNA_anno_cluster.rds") metadata <- scRNA@meta.data ##meta.data添加信息 scRNA@meta.data$color[metadata$Anno_Idents %in% "Oligodendrocyte"] <- "#CCCCFF" scRNA@meta.data$color[metadata$Anno_Idents %in% "Oligodendrocyte progenitor cell"] <- "#FFCC00" scRNA@...
2bb33b60ee185437694ce3200c4f339c9564486d84080dee77caaa0b884637a4
R
29,239
614
#' Visualize 5 or 3-primes on a genome #' #' @export plot_transcripts <- function(visfrom, visto, plot.data, gene.plotdata, geom = geom_bar(), geom2 = NULL, sum.counts.in.window=T, bin_width = 200, sum.fun='sum', add.all.pos=F, y.thresh=0, minus.strand.down=T, genome=NA, add.genome.plot=T, flip...
691f54e7017b9e2e0270c2d925e4c6f346ce1bbfb909ff890a4b5518134b3730
R
29,394
668
library(data.table) library(openxlsx) library(protr) source("R/combined_ml.R") source("R/score_funs.R") source("R/ml_predict.R") #model driver, save plots to file mai_antib_model_plotter = function(plot.type = "scatter", ml = "rf", feats = "mixed"){ pdf(file = paste0("output/antib_model_", plot.type, "_", ml, "...
c4f049d72aaaef21a14453c0bbaa80f7a10047199d46c370f8af9de1fedd20b0
R
29,403
638
################################## # Examine distributions of the CARE IDH-mutant cell states across tumor grade, tumor types, and time points # Author: Kevin Johnson ################################## # Reproduce the following figures: Fig3a, Fig3b, Fig3c, Fig3d, EDF7a, EDF8a, EDF8b, EDF8c library(tidyverse) library...
0a22e6842bbf78e10536e9ed809b5f7caa30a1d0731f49302f42296bfd25668d
R
29,507
950
--- title: "A. Villani's microglia RNAseq" author: "Izaskun Mallona, 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: kable theme: lumen params: seed: 665 --- ```{r w...
a7b490ccfb7047a13ae8055946e3b69295fc56ac3ae46b7f00daeebdbebcf538
R
29,761
807
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
7f5e3166cc96199bc111275ba261937de0d53d4082ba862141758202b51b0661
R
29,770
569
context("test MONSTER result") test_that("MONSTER function works", { system('curl -O https://netzoo.s3.us-east-2.amazonaws.com/netZooR/unittest_datasets/testDatasetMonster.RData') load("./testDatasetMonster.RData") data("yeast") design <- c(rep(0,20),rep(NA,10),rep(1,20)) yeast$exp.cc[is.na(yeast$exp.cc)]...
142f90749e492db1e5e1d5ae510041bae61d42803193a9053e51ed77f48fe54b
R
29,779
950
rm(list = ls()) library(dplyr) library(plyr) library(Seurat) library(ggpubr) library(reshape2) library(tidyr) library(tidyverse) library(DropletQC) source('~/SCRIPTS/utility_functions.R') # Set directories path_cr = '~/project/01_CELLRANGER_OUT/BAT_OUT/' path_cb = '~/project/03_MATRIX_FROM_CELLBENDER/BAT_OUR/' samps =...
8b277d371c45f851f6dbaade2486664ae3980189378f43614a428c2010dac653
R
29,792
752
getuw_ssl <- function(ds, penalty = c("adaptive", "separable"), lambda0s = NULL, nlambda0 = 100, lambda1 = NULL, theta = 0.5, a = 1, b, eps = 0....
b1919096cad50dc6ab8a77951f050abdbb688324752b7c60f19616809906fcba
R
29,931
889
#This code currently gets the log2 TMM expression of GDF15, then centers and scales it, and then compared the pc2 score (which also gets centerd and scaled) for each tissue rm(list = ls()) # # BiocManager::install("ComplexHeatmap") # BiocManager::install("edgeR") library(tidyverse) library(edgeR) library(corrr) libr...
05b0ccaffe16f4a12b2fda3d495766cf661fae507a16d1c5562f184b65034262
R
29,941
768
############################################################################### ## Critical Period Trajectories: GSVA-Based Analysis ## ## D35 -> D65 Maturation Dynamics with Proper Pathway Enrichment Scores ## ##############################################################################...
31fc113c3393771f1c084d73be417e488e7d4e81d48015c17a4106fd0cad5a48
R
29,954
681
# R411 .libPaths("/vast/projects/rdavuluri-group/psurana/conda_environments/r451/lib/R/library") # Load required libraries pacman::p_load(data.table, dplyr, biomaRt, GenomicRanges, Biostrings, BSgenome, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Mmusculus.UCSC.mm39, caret) ##------------------------------...
eaa9b05ad8c3c8f1ab0de0e083b98e102d896f3098a3ac4b58c6a3dc36691a1d
R
30,181
854
## Validate the identified Enhancers library(ggplot2) library(ArchR) addArchRThreads(threads = 10) projdir <- "projrmSubset_subPeak" dt.Enhancer.majorGroupExist <- readRDS(file.path(getwd(), "outdir_projrmSubset_subPeak/CRE_projrmSubset_subPeak","subC.enhancer_majorGroupExist.rds")) #!!!!!!!!!!! dt.exist <- dt.Enha...
1c90414528950a9315bc2c5817b3a914c28526d2ea9d674876b3379ae95548ea
R
30,193
825
# KOLF2.1J-iTF paper #cCRE identification #Figure2 chromatin conformation # open R srun -n 10 -p interactive --pty /bin/bash module load cluster/gsl/1.15 module load cluster/htslib/1.9-devel module load cluster/build_tools/llvm/8.0 module load cluster/util/gcc/8.2 module load hdf5_18/1.8.21 conda activate r_env #co...
0387e98536ebfda59cb66b1bd890f0ce85c5f64694fad4599f4b74364254a6fe
R
30,556
714
library("Biobase") library("preprocessCore") library("locfit") library("blme") library("reshape") # Contains the empty() function library("plyr") library("genefilter") library("ggplot2") library("MASS") # Cut out 3 legacy parameters simemIsogenic = function(screens, covariate=NULL, ...
ae19e5264183bbbc3244e7641cd77062f35a89ee60b6cb0f07d2aa81d6a8156f
R
30,580
893
--- title: "ConsensusPlacentaComparisonPCBOnly" output: html_document date: "2023-08-30" editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} # Display the current working directory getwd(); # If necessary, change the path below to the directory w...
b0c47f4c335a888e2992455209153d3759e9ba623d6e7d3cc7aea5908663af48
R
30,671
618
#' @importFrom rlang .data #' @importFrom utils packageVersion NULL #' @keywords internal extendMatrix <- function(mtx, col.names) { new.names <- setdiff(col.names, colnames(mtx)) ext.mtx <- matrix(0, nrow=nrow(mtx), ncol=length(new.names)) colnames(ext.mtx) <- new.names return(cbind(mtx, ext.mtx)[,col.names])...
d5576861b2684cd56c8bf3f1f2b5d332f69df36685052c9ac8d0f7e63194c770
R
30,686
666
--- title: "Figure 6" output: html_document date: "2025-10-16" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(rstatix) library(dplyr) library(ggplot2) library(car) library(GO.db) library(Seurat) library(scCustomize) library(circlize) library(ggplot2) library(readr) library(clust...
cc041005fade38f14352ff3b5cfeb0f1955a59462fa300bd9224596eac87e56b
R
30,692
784
# author: Gavin Ha # Dana-Farber Cancer Institute # Broad Institute # contact: <gavinha@gmail.com> or <gavinha@broadinstitute.org> # date: March 17, 2017 #### EM (FWD-BACK) Algorithm #### runEMclonalCN <- function(data, params, #gParams = NULL, nParams = NULL, pParams = NULL, sParam...
33841a823238d3171ec47ad69bdd38d249c46a7f474616d264e25f7333d6f519
R
30,715
585
#' Run single variant or gene- or region-based score tests with SPA based on the linear/logistic mixed model. #' #' @param bgenFile character. Path to bgen file. Currently version 1.2 with 8 bit compression is supported #' @param bgenFileIndex character. Path to the .bgi file (index of the bgen file) #' @param sampleFi...
829db97748f9795d24a7927685080fc03b48ef021e5bdd29f462c3d467b5dd80
R
30,725
638
--- title: "Using spatialLIBD with 10x Genomics public datasets" author: - name: Abby Spangler affiliation: - &libd Lieber Institute for Brain Development, Johns Hopkins Medical Campus email: aspangle@gmail.com - name: Brenda Pardo affiliation: - *libd - &lcg Licenciatura de Ciencias Genómi...
d8b67f0f9062c5874214f9db894343cde4ae3a5910cc1aac4ba86b143e0d32b1
R
30,734
762
# ============================================================================== # Script 23: Figure 5 - RNAi Differential Dependencies (ILC vs NST) # ============================================================================== # Description: Performs gene dependency analysis comparing ILC vs NST cell lines # ...
89365cd8a9a9484e873963c75cbd37001aa6cec365d63e7f08b54f0129e8d88f
R
30,741
684
# ITS Tau correlation with the oscillatory and rhythmic alpha variables --------------------------- ## Load the required packages ------------------------------------------------- required_packages <- c( "tidyverse", # Load this first because it includes ggplot2 and dplyr "ggpubr", "psych", "reshape2", "flex...
c4bb67ab95bc034955594a877943b7cb9304ec0d3c23f9d5d934a3808fbfd48e
R
30,757
728
#' Information Criteria and Log Marginal Likelihood #' #' Returns the BPIC/DIC and optionally marginal deviance (-2 x log marginal likelihood) for a list of samples objects. #' #' Computes DIC and BPIC using a deviance based on either (a) the data likelihood #' only ("conditional", default) or (b) the joint likelihood ...
1ab7087ca6077f6b6e753e053e3babd55d3fc4489f1f43f0d40319278c7921bd
R
30,768
783
library(gplots) enrichment_plot <- function(rankings, components, bin=0.01, title = '',xtitle = '', ytitle = ''){ rank_order <- abs(rankings[order(abs(rankings), decreasing = TRUE)]) thresh <- seq(from = 0, to = max(rank_order), by = bin) y <- c() for (i in thresh){ ...
4d4ee266386827f76fea11b7dad00c3d50f9fe0924870c477a700d7f19c0e852
R
30,835
1,000
# =============================================================== # Visualization Module - PCA (Biplot) # =============================================================== # Helper to detect categorical columns ---------------------------------------- .is_categorical <- function(x) { is.factor(x) || is.character(x) ||...
a66a520a88ed375f983c801174ff64ca10c75e7cf0601f42bd08a3bc344b4c7d
R
30,907
628
--- title: "acesinabcd_acesproxy" author: "FB" date: "2024-03-11" output: html_document: default word_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## ACEs proxy scores for ABCD data Running this code will create an ACEs proxy score for Baseline, Yr1, Yr2, and Yr3. Need...
7309b0c38918b46937af7202e09f357d06fa05e1b630357f3b04925c59a70b6e
R
30,912
540
################################## # 10x snRNAseq analysis of preprocessing approaches for CARE-IDH-mutant oligodendrogliomas # Author: Kevin Johnson # Date Updated: 2026.03.18 ################################## library(tidyverse) library(RColorBrewer) library(viridis) library(Seurat) library(harmony) library(Matrix) ...
181a19d3343c2da0831273c7e6a78a2505a5c207a4ff3f04c0f78ff81926f5d4
R
31,017
505
#' Prune modules #' #' Prunes the initial modules by keeping only the best targets of each transcriptional regulator. #' #' 3 methods are implemented to choose the best targets: #' \itemize{ #' \item{topN: Takes a fixed number of targets per regulator with the highest regulator-target adjacencies (for details see \cod...
85bdf884c63abbd5f831dd73118beca1941907fb30ba558a813a144e5aeacf0c
R
31,069
664
#' banc-cell-info — Compile and publish BANC cell-info reference tables to GCS. #' #' Brain hemilineage table, NT / neuropeptide controlled vocabularies, plus #' other annotation reference CSVs. #' #' @section Reads: #' - FAFB `flytable_query` (hemilineage source) #' - SeaTable `banc_meta` #' #' @section Writes: #'...
94666452b3811a53148eda6788b96ccd6f3e8750ffa06ad054b99a44fb241856
R
31,110
626
##*星形胶质细胞--------- scRNA <- readRDS(file = "./Hippo\\scRNA_anno_cluster.rds") table(scRNA$Anno_Idents) Astrocyte <- subset(scRNA,Anno_Idents %in% "Astrocyte") table(Astrocyte$group) metadata <- Astrocyte@meta.data dim(metadata) metadata <- metadata[,-c(6:18,20)] Astrocyte <- CreateSeuratObject(counts = Astrocyte@assays...
10aa0787bb9b0b92af2b09309c4e5d1d31e6f97a965f9cc651dc8b2e048148b5
R
31,124
647
#!/usr/bin/env Rscript # ============================================================================ # ## 02_mgngtus_plot.R ## MGNG-TUS study: plot behaviour (responses, repetitions, RTs) as bar and line plots. ## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025. rm(list = ls()) # ====...
3707058fc37926d6ba59858da2ed2662c7458496e0b4c688ac10d2751ad5d300
R
31,241
1,009
library(readxl) # library(preprocessCore) # tximport tools salmon_process <- function(dir = getwd(), samples_file = "samples.xlsx", tx_to_gene_file, DGE = FALSE, output = TRUE, output_data_file = "summarized.txt", output_session_file = "sessionInfo.txt", s...
37c1c00e0b794b024c0a59e1115496c3367565459e4bcf390b2af58b055435a2
R
31,246
827
# load packages library(patchwork) library(Seurat) library(BPCells) library(rhdf5) library(DropletUtils) library(DropletQC) library(dplyr) library(Matrix) library(ggplot2) library(plyr) library(tidyverse) library(tidyr) library(ggpubr) library(reshape2) library(rio) library(data.table) library(harmony) library(DESeq2) ...
8344d1a7e60176472b46a332fcd0c0c59b4b4528c3ea4ca05f4f4075b3a09d55
R
31,294
697
#' banc-update-celltypes — Derive cell types from cross-dataset matches and push to SeaTable. #' #' For each matched dataset (FAFB, MANC, maleCNS, hemibrain, FANC), look #' up the matched neuron's cell_type and set the dataset-specific column. #' Also sets `cell_type` itself per the cascade (FAFB > MANC > hemibrain > F...
f905eb1973a69cd604f4f3ca07bc538c474b25ce028544ecafd3bdf60a622f34
R
31,320
549
################################## # 10x snRNAseq analysis of preprocessing approaches for CARE-IDH-mutant astrocytomas # Author: Kevin Johnson # Date Updated: 2026.03.17 ################################## library(tidyverse) library(RColorBrewer) library(viridis) library(Seurat) library(harmony) library(Matrix) librar...
3ffc67491010774973142ec5f19ea43182977bf7b5c1b9f07d1fd0ff590d251d
R
31,453
1,077
--- title: "ConsensusBrainEnrichRComparisons" output: html_document date: "2023-05-22" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(WGCNA) library(readxl) #took out samples that had Folic Acid F_Brain <- read_excel("/Users/kchau/Documents/PEBBLES/RNA-seq_ComparisonBrain_PCBon...
694cae1c6d397359bd6b9199c2a715d4fffd09c096ea24afcafb284a57a9d432
R
31,923
570
#set working directory ==== setwd("/athena/ganlab/scratch/lif4001/DVPV/DF_2ndRound") #install.packages library(Seurat) library(ggplot2) library(DoubletFinder) library(SoupX) #for loading Cell Ranger counts: all <- readRDS(file = "/athena/ganlab/scratch/lif4001/DVPV/DF_1stRound/DVPV_CTX_311_QC.rds") #Doublet finder (no...
34ce095e7388b9e13a3033170d609654d7af6aa34ac21f1122b56fe43bd78216
R
31,987
766
#' banc-bm-asymmetry — Diagnose BM sensory L/R asymmetry and propose retypes. #' #' For all BANC sensory neurons whose cell_type starts with `BM_`, report #' L/R count asymmetry and propose retype corrections by scoring each #' BANC neuron's downstream cell_type connectivity profile against FAFB BM #' type centroids (c...
0a6e80f12fe08a9a9514fc01748d4beb724881ba1205fc038a500a2aaa868b97
R
32,030
681
library(openxlsx) library(seqinr) library(data.table) #4/10/23 #selects two hundred variants to experiment on based on various criteria #selects n.top most dangerous specific variant pairs, looks for n.sing top most dangerous single mutations #and selects all combinations (single or paired) without dupes, for each var...
7cdea0d590475128d15c7f9a0cb2011e51657b2ed62d50065a9caf291bf79198
R
32,159
650
################################## # Purpose: Analyze the myeloid cell abundance across relevant features such as grade and time point # Author: Kevin Johnson ################################## library(tidyverse) library(ggpubr) library(EnvStats) proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut/" fig_dir...
27e788c521efffdf42eac1dbd5fc6e1feeca024f3f7ae208e615f2cbf2d8bf9c
R
32,185
736
##***伪时间轨迹分析------------ Excitatory_sub <- readRDS(file = "./Hippo\\subcluster\\Excitatory\\anno\\Excitatory_sub.rds") cols<- c("#AAD0E3","#277AB4","#FABF74","#FB7D1A","#CAB4D6","#B5DF90","#3AA12F","#693C9A") table(Excitatory_sub$group) A_sub <- subset(Excitatory_sub,group %in% "A") table(A_sub$Anno_Idents) table(Excit...
ee7f155a4ec06a9823f138405367eb762fbba8e80c813f5af689b24aefd54146
R
32,230
867
--- title: "S1: behavioural, conventional analysis with brms" author: "I. S. Plank" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true fontsize: 10pt #geometry: margin=0.5in --- ```{r settings, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, fig.align =...
0fec081ba0edd1ca3bc338d978c87b7222228b8ee9ff835728ff0249c004b7c2
R
32,236
508
# ---------------------------------------------------------------- # The following script loads and processes data from: # # Sinha, Rashmi, et al. "Fecal microbiota, fecal metabolome, and # colorectal cancer interrelations." # PloS one 11.3 (2016): e0152126. # # The output tables are: # 1) metadata - subject meta...
ba3c08a44fa87cb5e9287db52c2aa9c19572d0c6870a2adcbe95ab11d896670b
R
32,261
901
library(dplyr) library(factoextra) library(tidyr) library(cluster) library(ggrepel) library(ggplot2) library(tidyverse) library(nlme) library(mgcv) require(lme4) library(purrr) require("emmeans") library(broom.mixed) library(lmerTest) library(easystats) setwd("") data <- read.csv("PsychENCODE-W5-bulk-RPKM-data-scRNA-...
e6c3b7258e76957810b2a817d10df220137e5c18d9452b9db56ebfe0ffef9813
R
32,306
797
# author: Gavin Ha # Dana-Farber Cancer Institute # Broad Institute # contact: <gavinha@gmail.com> or <gavinha@broadinstitute.org> # date: July 26, 2018 # data is the output format of TITAN cytoBand = {T, # F} alphaVal = [0,1] geneAnnot is a dataframe with # 4 columns: geneSymbol, chr, start, stop spacing # i...
2e44421257314bf285555eeef85f316e3be48f37440c00048b32bdb7315afd6c
R
32,381
811
############################################################################### ## Analysis pipeline – human bulk RNA-seq (refactored 2025-05-19) ## ############################################################################### ## Key improvements ---------------------------------------------------------- #...
26088bbbbc4651b4cde9247ce0b9e813ab433dda184af97f6378bc1fb4cc3590
R
32,573
693
library(ggplot2) library(Seurat) library(tibble) library(SCENIC) library(SCopeLoomR) library(dplyr) library(scales) library(stringr) library(VennDiagram) cherry_proportion_plot <- function(seurat_obj, mcherry, subtype, cell_line="all") { if (cell_line == "all") { a <- as.data.frame(table(seurat_obj@meta.data[,mc...
b01f45f7891ac1ad2bec56dbb827231e249d7a23ee78487d19a0877ad4bbbec4
R
32,698
1,233
#feature selection#Lasso rm(list=ls()) install.packages("glmnet") library(glmnet) setwd("your_pathway") data1 <- read.csv("youdata.csv",row.names = 1,header = TRUE) dim(data1) head(data1) names(data1) x <- as.matrix(data1[,1:50]) y <- as.numeric(data1[,51]) set.seed(99) alpha1_fit <- glmnet(x,y,...
ae19e6f56f9d43b0d90579df6dabf2a523fc16dd26828db95003114e8a32fa0d
R
32,850
814
pmwgs <- function(dadm, type, pars = NULL, prior = NULL, nuisance = NULL, nuisance_non_hyper = NULL, ...) { if(is.data.frame(dadm)) dadm <- list(dadm) if(is.null(pars)) pars <- names(sampled_pars(attr(dadm[[1]], "prior"))) if(is.null(prior)) prior <- attr(dadm[[1]], "prior") dadm <- extractDad...
f27b991dca2a026fe1a53b653db99f94eec5480990be56c089193c8c0d05f8d8
R
32,886
928
# open R srun -n 10 -p interactive --pty /bin/bash module load cluster/gsl/1.15 module load cluster/htslib/1.9-devel module load cluster/build_tools/llvm/8.0 module load cluster/util/gcc/8.2 module load hdf5_18/1.8.21 conda activate r_env #conda deactivate R # Load required libraries library(csaw) library(edgeR) l...
ba26dc2f719bcad7eedf632b39b43ef298b8e4eb705ed7ec7a4a1c13097fed8d
R
32,978
979
--- title: "S4: behavioural, HGF-based analysis with brms" author: "I. S. Plank" date: "`r Sys.Date()`" output: html_document: toc: true number_sections: true fontsize: 10pt #geometry: margin=0.5in --- ```{r settings, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, fig.align = 'c...
45d2f37b56043a63b438fca36aca63d289f9e4cc51f66ee30243727388f684ed
R
32,988
1,032
#' @title Manhattan plot #' #' @description `fig_manhattan` creates a Manhattan plot for genomic markers #' from across the genome, e.g. results from genome-wide association studies. #' #' @details This plotting function plots a Manhattan plot for genomic markers #' from across the genome. The default is to truncat...
ae0c7285fc2423f80341f2cd225833e43e04805f0c1c6630c58fc6c279e5543b
R
33,151
926
--- title: "Supplementary materials" subtitle: 'Predicting emotional valence in autism: a preregistered study in the Bayesian Brain framework' author: "Plank et al." date: "`r Sys.Date()`" output: pdf_document: toc: false number_sections: true latex_engine: xelatex extra_dependencies: ["float"] fonts...
e345426d90224542de682bc796e36119b0aae723e8e8143f44084f57ec6c686c
R
33,187
454
# unit-tests for UNAGI context("test UNAGI functions") test_that("[UNAGI] BreadthFirstSearchU() function yields expected results", { # Construct a starting network, which will be modified. # Here, we expect genes A and B to be connected after 1 hop via TF2, genes A and D # to be connected after 1 hop via TF3, ...
48307948939f13d0f430b672ba8f896516a4191b5d3ecb03b3461d87a5c31dc7
R
33,234
1,003
--- title: "Folate_ConMF_Placentas" output: html_document date: "2023-12-19" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load RNA-sequencing data ```{r} library(WGCNA) library(readxl) #only use samples that have #No PCB ; No Folic Acid (0 / No) #No PCB ; Yes Folic Acid (0 / Yes) #Yes PCB ...
d8f703bf6fe8c07f5b7007a0f5df4a2ddca067e2a250d1afa51ad98a39de7b85
R
33,246
664
############################################################################################# # SCRIPT TO GENERATE A HEATMAP WITH THE TOP ENRICHED TERMS (BASED ON P-VALUE) FOR EACH VIEW # ############################################################################################# library(MOFA2) library(reshape2) ...
bf0358841b16699790a153ea50a31ddad5f365045d925d02e3fd0b8acbc5580b
R
33,287
717
library(Seurat) library(ggplot2) library(scCustomize) library(patchwork) library(RColorBrewer) library(viridis) library(dplyr) library(stringr) library(pheatmap) # load data --------------------------------------------------------------- data <- readRDS("diet_nodomap_metadata_updated_2510.rds") DefaultAssay(data) = "o...
2a97314983d668fda0e2379287856050ecc2b6cdcd34e220c147e6ccdf9b7b5f
R
33,419
821
##################################################################### # Helper Functions for Training Pipeline ##################################################################### # Helper function to get file paths get_file_path = function(file_type, brain_region=NULL, chr=NULL, CONFIG) { pattern = CONFIG$fi...
5edd924b6f5279c768919a373a588b1f41c56fa71ed78df821b844c0314f7d10
R
33,438
821
##################################################################### # Helper Functions for Training Pipeline ##################################################################### # Helper function to get file paths get_file_path = function(file_type, brain_region=NULL, chr=NULL, CONFIG) { pattern = CONFIG$fi...
514cdb25b55dcc55657cbe057800d49050f7136be2603a8bc8c94392722d4326
R
33,457
827
# Read Group file and split variants by functional annotations read_groupfile <- function(groupfile_name, gene_name) { lines <- readLines(groupfile_name) # Pre-filter to only the gene's lines via fixed-string startsWith # (regex strsplit on every line is the dominant cost for large group files) prefix_...
c866676e4e42ef701cd9008477a5e3e4897fc64081e48fa5730ffb94d9947463
R
33,603
1,006
--- title: "Supplementary materials" #subtitle: 'Predicting emotional valence in autism: a preregistered study in the Bayesian Brain framework' author: "Plank et al." date: "`r Sys.Date()`" output: pdf_document: toc: false number_sections: true latex_engine: xelatex fontsize: 10pt geometry: margin=0.5in ...
38cf241285b06f9f2bfbd89a28b93b93bcc98cc71ddc69c7a8e28917b7852da0
R
33,641
749
#' banc-alignment-plots — Generate publication-quality validation plots for the optic-lobe alignment. #' #' Faceted figures comparing BANC alignment assignments to FAFB ground truth #' for the optic lobe. Falls back to per-side outputs if no bilateral #' `banc_optic_both_alignment_optic_lobe_full.csv` is found. #' #' @...
796803aea27417d7315198ce49bd9f4d3e7f4dda3acbd433efd7c5109cebe38e
R
33,656
825
#' Add Group Coverages to an ArchRProject object #' #' This function will merge cells within each designated cell group for the generation of pseudo-bulk replicates and then #' merge these replicates into a single insertion coverage file. #' #' @param ArchRProj An `ArchRProject` object. #' @param groupBy The name of t...
db555bd9ab7ba4dbee1a30e790d51dea2d94bf77de7a72c0c2a9c675e3bd4586
R
33,783
712
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
a7f670c2c386c52b1771f0d65cc93f2684cfc724b987106d7b1acd6e730db141
R
33,889
776
context("MultiNicheNet pipeline") organism = "human" if(organism == "human"){ options(timeout=1000) lr_network = readRDS(url("https://zenodo.org/record/5884439/files/lr_network_human_21122021.rds")) lr_network = lr_network %>% dplyr::rename(ligand = from, receptor = to) %>% distinct(ligand, receptor) %>% filter(l...
e0890a11d6328c646da7ed3e915a7cd57a2b049748dd655c53857a2a27684f1d
R
33,892
722
--- title: "A defined community of core gut microbiota members promotes cognitive performance in honey bees" author: "Amelie Cabirol, CNRS-University of Toulouse" date: "11/02/2022" output: html_document: toc: yes toc_float: collapsed: no top_depth: 3 pdf_document: toc: yes --- ...
15175205ce57a45c0c32f3e33619d34c54bbd14ab11aa2facd1f44520dbe4140
R
33,900
910
--- title: "A defined community of core gut microbiota members promotes cognitive performance in honey bees" author: "Andrew Quinn (University of Lausanne) and Amelie Cabirol (CNRS-University of Toulouse)" date: "04/12/2025" output: html_document keep_tex: yes always_allow_html: true --- # Introduction T...
4892dac8acf8ecd017d6b11e3b5bbe62615ae9288a9b1ec90da73d6c54fe4d73
R
34,227
1,220
local({ # the requested version of renv version <- "1.0.7" attr(version, "sha") <- NULL # the project directory project <- Sys.getenv("RENV_PROJECT") if (!nzchar(project)) project <- getwd() # use start-up diagnostics if enabled diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALS...
2212186db11625759b4b2d7bf91cf38b00b61926b9384b68756b870e600e56aa
R
34,414
874
##################################################################### # INGENE Training Helper Functions ##################################################################### # This file contains helper functions for the INGENE training pipeline. # Key components: # - Cross-validation and model evaluation function...
8d263773651d43001853a567e320c5a5ba2b7c1e729d7d6400701f292ce5a140
R
34,447
1,015
--- title: "Folate_ConMF_Brains" output: html_document date: "2023-11-30" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load RNA-sequencing data ```{r} library(WGCNA) library(readxl) #only use samples that have #No PCB ; No Folic Acid (0 / No) #No PCB ; Yes Folic Acid (0 / Yes) #Yes PCB ; ...
972074ad660fe12e8674afb20c881a6eb7bfcd31a297b7d0b2ecaf0077e031a2
R
34,496
919
--- title: "Tutorial 02: Neuron Morphology" author: "Alexander Bates" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: true toc_depth: 3 code_folding: show theme: cosmo --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = TRUE, warning = FALSE, message = FALSE, ...
1ad9102b722e7dd7624cad0e5de0bb98359ffb08dcd39520fe32d33acd87f1a6
R
34,682
688
--- title: "MultiNicheNet analysis: MIS-C pairwise comparison - wrapper function" author: "Robin Browaeys" package: "`r BiocStyle::pkg_ver('multinichenetr')`" output: BiocStyle::html_document output_dir: "/Users/robinb/Work/multinichenetr/vignettes" vignette: > %\VignetteIndexEntry{MultiNicheNet analysis: MIS-C pa...
ab51555f448df085219e88dbeb4f83a0738b0d8d6e24255c7aa85b4390506d0e
R
34,702
861
#This code currently gets the log2 TMM expression of GDF15, then centers and scales it, and then compared the pc2 score (which also gets centerd and scaled) for each tissue # Uncommented out many of the "print" plots rm(list = ls()) # BiocManager::install("edgeR") library(tidyverse) library(edgeR) library(corrr) li...
444161390c3c1851b9166f362e8753861ffb5774044a3fa8db98fd147794e269
R
34,735
688
--- title: "Running SCENIC" subtitle: SCENIC (Single Cell rEgulatory Network Inference and Clustering) output: html_document: number_sections: no toc: yes toc_float: yes css: corrected.css results: hold html_notebook: toc: yes pdf_document: toc: yes bibliography: references.bib vignett...
b934617d69226969fec1cc24c04085eec20fa8603d7e7060d3d2eb33c174bcca
R
34,772
727
#' Given a set of genes of interest, full bipartite networks with scores (one network for each sample), a significance #' cutoff for statistical testing, and a hop constraint, BLOBFISH finds a subnetwork of #' significant edges connecting the genes. #' @param geneSet A character vector of genes comprising the targets o...
ac9b4e3856f74bcb06a739c62c33df608e03df9f034c9732b0ccfcf3b54bdd29
R
35,099
1,086
#################################################################### # Transcription Factor Deviation Methods #################################################################### #' Add a matrix of deviations for a given peakAnnotation to Arrow Files in ArchRProject #' #' This function will compute peakAnnotation dev...
f639049a0d7120118f7721630007d746a060f409bc3e501a0f4ef9f8b14196f3
R
35,431
867
#' banc-class-fixes — Propagate classification columns for bates-sourced neurons. #' #' For BANC neurons whose `cell_type_source` contains "bates", pull #' downstream classification columns from the matched FAFB neuron in #' `franken_meta` (primary) or the matched maleCNS neuron (fallback). Writes #' the propagation pl...
d54f797e9dbbed8d077fd9b74d7443c660f07202ab73b141a60b2a43ae0a9bcc
R
35,469
839
################################################################## # Requirements for generic data extraction function: # - extract arbitrary subset of screens, identified by: # cellLineId, condition, any combination of filtering criteria organized as a list (variable => vars) # # - optionally: add data column(s) to ...
12ef3d26231b88a201a2c1879384cb00167f5ff21c3e830265cef81d8dff6e2f
R
35,651
769
#' @title Lesion to Symptom Mapping #' #' @description #' Lesymap uses univariate and multivariate methods to map #' functional regions of the brain that, when lesioned, #' cause specific cognitive deficits. It requires is #' a set of binary lesion maps (nifti files) in template #' space and the vector of corresponding...