sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
79c751103f78bbb169cc81d6b0647e3f5616c4db525ca6d41bb6fffbc9e8a421
R
7,044
161
## helpers.R — shared utilities for Transcriptome/r_notebooks ## Loaded with: source("helpers.R") ## ## Provides: ## - PROJ_ROOT, TX_ROOT, OUT_DIR, FIG_DIR, STRATA_DIR ## - CROSS_OMICS / RECURRING / PAPER_TOP / ECM_FAMILY (same panels as proteomics) ## - load_stratum(name) -> list(mat, groups, meta) for a stratum...
9ccc00f58400eeea41703f32184338038e48cb05fcbcafe93765a23006c0c33c
R
7,120
156
#!/usr/bin/env Rscript .libPaths(setdiff(.libPaths(), normalizePath(Sys.getenv("R_LIBS_USER")))) ################################################ ################################################ ## LOAD LIBRARIES ## ################################################ ##########################...
b9a1c306368eaa0cd7c0e9027cfb1fe4bd7ed69751236d0fc8e74f0d6d36f95a
R
7,124
182
library(dplyr) library(tidyr) library(Rmisc) library(ggplot2) library(ggpubr) library(stringr) library(ggforce) library(paletteer) library(ggsci) epsilons <- c(5, 10, 25, 50, 100, 200, NA) samples <- c(rep(100, length(epsilons)-length(which(is.na(epsilons)))), 18) file_paths <- paste0("~/Python/WASP-DDLS/SE-benchmark...
8142ee465d5a358238f11a94a4a320c34fa242aafd27dd8617c88c65830cb040
R
7,151
209
############################################################ # Canonical Correlation Analysis (CCA) - CMI Cohort (SES-Controlled) # Author: Yuan Zhang # Date: 2025-07-25 # # Description: # This script runs CCA analyses for both math and reading # tasks on the CMI cohort, controlling for age and regressing # out SES (...
06d04548db5674e912b28911e030f05f158d406a3c62f453e56671185e6104e1
R
7,172
152
# ============================================================================= # 01_tcga_dea.R # TCGA bulk RNA-seq differential expression analysis (Methods 4.3) # # Produces: # Supplementary Table S1 - DEA Normal Brain vs GBM # Supplementary Table S2 - DEA LGG vs GBM # Supplementary Table S3 - DEA Mesenchyma...
78c9e625086e40ece8a0a8284bfa3bea1b80f7dfaea04ffb681411e468dde788
R
7,173
212
--- title: "R Notebook" output: html_notebook --- <!-- ## What this file does Reads three Fiji ROI-batch-measurement CSVs (`Myl_quant`, `Arp3_quant`, `Actin_quant`) from PA-Rac1 + para-aminoblebbistatin photoactivation movies. For each of the N=13 activation events, intensity at the growth cone is sampled at three ti...
b2f123e38f806f7b66922fcd824c1b8b0e4768653a4131ca3bdf1dfa072619a1
R
7,175
205
#Fig. 3a and Fig.3b # Co-expression of Lepr and Adrb2 in different cell clusters of murine SCG and stellate ganglia library(tidyverse) library(Seurat) library(ggplot2) ##Load integrated data using relative path data_path <- "data/ganglia_seurat_object.rds" if (!file.exists(data_path)) { stop("Seurat object not fou...
61150909da8d0cfd5192a9fb48766cebafa460caef770c388f1d10a65aa3acad
R
7,229
232
## module load conda_R/3.6.x ## ----Libraries ------------------ library(parallel) library(SummarizedExperiment) library(Matrix) library(RColorBrewer) library(jaffelab) library(edgeR) library('zinbwave') library('SingleCellExperiment') library('magrittr') library('ggplot2') library('Seurat') ## load rse list load("...
33b20f8f676cb835b1c392f18cc903cc0964f3877a5b76c58fb51a497b03ed62
R
7,249
133
#!/usr/bin/env Rscript ## dep_bh_equivalence_check.R ## ========================= ## Shows that the complete-case limma path used for the reported CSF proteomics is equivalent to ## running DEP itself, without imputation and with Benjamini-Hochberg adjustment. ## ## WHY THIS EXISTS. Methods states that protein intensit...
049f42d477268fd0fdba7183c51a38694df89e65535e1d1bcb310d9546f715e0
R
7,290
221
#!/usr/bin/env Rscript # Author_and_contribution: Niklas Mueller-Boetticher; created template # Author_and_contribution: Søren Helweg Dam; implemented method suppressPackageStartupMessages({ library(optparse) library(jsonlite) library(SingleCellExperiment) library(Seurat) library(PRECAST) }) opti...
a8cb03819bc99786b64b5c5ce47159f732da6206b6ed3edb7b0b7f620a13fc4f
R
7,290
231
--- title: "R Notebook" output: html_notebook --- <!-- # Arp3 / F-actin growth-cone Airyscan line-profile colocalization ## What this file does Reads paired Airyscan growth-cone line-profile CSVs (`profiles.csv` and `profiles2.csv` per neuron, lines 53, 58, 70, 74) for the Arp3-A488 + phalloidin-Rhodamine staining c...
6cc157bbf3d678b7c7d603f990878988ec1cbe85263f027811a2e50c9cf7ca2b
R
7,362
257
--- title: "Group Coupling" output: html_document date: "2024-11-29" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` This script preprocesses the spindle and slow oscillation data to feed it into the python scripts. Because these data were analyzed by a team, there are different IDs ...
5ac36d21e26e0850eaa2e770ffc83ec2cc3a2e2d6ae45c1d45b2f38ddb53f8de
R
7,372
176
#!/usr/bin/env Rscript ## SUPERSEDED / STILL IMPUTED. This cross-platform ComBat meta calls the MinProb helper on ## both platforms before concatenation, which is the procedure the revision withdrew: it is ## what manufactured the spurious MS-up ITGB2 CSF call. Its output ## CSF_combined_R_ComBat_DE.tsv is no longer re...
aa560513281d992393ef1704c3b9eab2f7b18caa02b02f52b6ae4653e8b07912
R
7,382
196
library('SingleCellExperiment') library('here') library('sessioninfo') ## Load data load(here( 'Analysis', 'Human_DLPFC_Visium_processedData_sce_scran.Rdata' )) ## For building the checking function path <- here('Analysis', 'Layer_Guesses', 'First_Round') merged_name <- 'Merged' path <- here('Analysis', 'Lay...
56b3fe12dffb0413c4d0d697653dedf2769b7df6d94b37e3c69d6306cb7ccb1f
R
7,385
138
.munge_main <- function(i, utilfuncs, file, filename, trait.name, N, ref, hm3, info.filter, maf.filter, column.names, overwrite, log.file=NULL) { if (is.null(log.file)) { log.file <- file(paste0(trait.name, "_munge.log"),open="wt") on.exit(flush(log.file)) on.exit(close(log.file)) } else { .LOG("\n\...
b90ed7ef26e6b8bad14c3b92cc6ab8c8c3a4daa5453044fe0192fda9eaaf3b48
R
7,425
237
--- title: "R Notebook" output: html_notebook --- <!-- # Rab11a / F-actin soma-patch line-profile correlation (alternative-cohort variant) ## What this file does Alternative-cohort variant sourced from `D:\DVElite` rather than the published G:\ cohort. Reads paired soma-patch line-profile CSVs `Rab11.csv` and `Actin...
33066da80e2da5ff940f5184523b9c3aee0cf7dc22522c4b743e807ea329ead2
R
7,435
228
#' @title Proportion of features #' @description Check the Proportion of positive cells (default: expression above 0) #' in certain clusters #' @param seu Seurat object #' @param feature Features to plot (gene expression, metrics, PC scores, anything that can be #' retreived by FetchData) #' @param ident cluster name, ...
47a86db9f1579d23b586fba19e09ced40b3bece064f24fd0f03232be7cb1345e
R
7,471
265
--- title: "SpatialDE subsampling comparison" author: "Lukas Weber" date: "`r format(Sys.time(), '%Y-%m-%d')`" output: html_document: toc: true toc_depth: 2 --- ```{r setup, include = FALSE} knitr::opts_chunk$set(echo = TRUE, cache = TRUE) ``` # SpatialDE subsampling comparison Comparison of ge...
0a23d894f8a7353846162b2ea2fe3c4a18a6789ff1a3139ca006555317fcbfd5
R
7,507
167
library(ggplot2) library(patchwork) library(reshape2) library(dplyr) library(RColorBrewer) # Import data Wt_E8_data <- as.data.frame(read_excel("Data_1.xlsx", sheet = "Wt_E8.5_data", col_names = TRUE)) hNMP_data <- as.data.frame(read_excel("Data_2.xlsx", sheet = "hNMP_Spatial_D3_Data", col_names = TRUE)) Gloid_data <-...
d066cb5cd64dbb916871f5508c3fb2dbb0a4e4663d53039fd9cbe2867fd240c7
R
7,516
197
color_palette_fig1A <- c( "original_paper" = "black", "benchmark_Hu2024" = "#E41A1C", "scMEB" = "#377EB8", "conST" = "#4DAF4A", "BANKSY" = "#984EA3", "SpaceFlow"= "#FF7F00", "DeepST" = "#FFFF33", "CellCharter" = "#A65628", "STAGATE" = "#F781BF", "SPICEMIX" = "#999999", "DR-SC" = "#66C2A...
7d197bb8824304a26fe0e38655a5ba531904228c9883477d705af463167a7630
R
7,553
240
--- title: "R Notebook" output: html_notebook --- <!-- # F-actin / Rab11a soma-patch line-profile colocalization ## What this file does Reads paired soma-patch line-profile CSVs `Rab11.csv` and `Actin.csv` per neuron (lines 52, 57, 67, 71), computes per-patch correlation between the two intensity profiles, and pools...
ff4b385ef12cd58b3e31c82b12a4b2e7ef8a5ed2916cf46c761e4ca407d9211a
R
7,573
160
# Vanni Bucci, Ph.D. # Assistant Professor # Department of Biology # Room: 335A # University of Massachusetts Dartmouth # 285 Old Westport Road # N. Dartmouth, MA 02747-2300 # Phone: (508)999-9219 # Email: vbucci@umassd.edu # Web: www.vannibucci.org #---------------------------------------------------------------------...
296e5dffc5849728fe460b589a6c8e09f041097654d57f3393c0fead187cafb5
R
7,580
199
#' @title Gene Set Enrichment Analysis #' @description Calculate the GSEA score of gene sets at the single-cell level using the 'AUCell' package: #' #' Aibar et al. (2017) SCENIC: Single-cell regulatory network inference and clustering. #' Nature Methods. doi: 10.1038/nmeth.4463 #' #' Aibar et al. (2016) AUCell: Analys...
8c460a91b9d5adab8678080169829e350be5668507afb1ec0deed1d1ffc2b6de
R
7,602
257
#!/usr/bin/env Rscript # Author_and_contribution: Niklas Mueller-Boetticher; created template # Author_and_contribution: Søren Helweg Dam; implemented method suppressPackageStartupMessages({ library(optparse) library(jsonlite) library(SingleCellExperiment) library(Matrix) library(SpatialExperiment...
8cd326eb3dde70730653df205096300f6a9c2b1d99f68fcb30af1c9ab9e39ccf
R
7,602
187
#!/usr/bin/env Rscript ## 05_t_lineage_meta.R — generated from notebook spec ## Run: Rscript 05_t_lineage_meta.R ## ============================================================ ## # 05 — T-lineage microarray meta (GSE32915 + GSE78244) ## ## Cross-study T-lineage meta-analysis: ## ## | Series | Author | C...
e2e1f7920f90636a80f2302871d5098c533b4796db10655c995590cfa18a6c07
R
7,603
180
library(readxl) library(ggplot2) library(dplyr) library(tidyr) library(ggpubr) #library(Microsoft365R) ########## Privacy ############ df <- read_excel("~/Python/WASP-DDLS/results.xlsx") #df$samples <- c(NA, 18, rep(100, nrow(df)-2)) #df_srd <- df |> select("Epsilon", "Mean SRD", "...10", "samples") |> # rename("A...
e0597d5242a4061437063d4c15ba7e9a0da00d1b76aa1fb4746933f38850f340
R
7,730
292
############################################################ # Prediction Using CCA Models (CMI → Stanford) # Author: Yuan Zhang # Date: 2026-05-25 # # Description: # This script applies Canonical Correlation Analysis (CCA) models # derived from the CMI cohort to predict brain–behavior scores # in the Stanford cohort (...
0a997de5a1be7c91d06476c6aeee10bf9fd3269c44f32f73a41588d0f9a47545
R
7,750
260
#!/usr/bin/env Rscript # Author_and_contribution: Niklas Mueller-Boetticher; created template # Author_and_contribution: Søren Helweg Dam, implemented method. suppressPackageStartupMessages({ library(optparse) library(jsonlite) library(SpatialExperiment) library(Seurat) library(stardust) }) # Get...
ac2a790b3b991107ac02a1412ad6f84385c52df47921e5185f12d7cccde23d71
R
7,810
257
#!/usr/bin/env Rscript # Plot transcript isoform structures for selected Meis1, Pax6, and Nfib transcripts # using a SQANTI3-corrected GTF file and SQANTI3 classification table. suppressPackageStartupMessages({ library(rtracklayer) library(dplyr) library(ggplot2) library(ggtranscript) library(magrittr) li...
64132acc2a6dff03960d787b28a82ed9e58940c57e9b5265b51e6343bf02bfcb
R
7,847
128
--- title: "Comparison analysis of multiple datasets with different cell type compositions" author: "Suoqin Jin" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: toc: true theme: united mainfont: Arial vignette: > %\VignetteIndexEntry{Comparison analysis of multiple datasets using CellCha...
05cb9c47de1333a58889c0924c17b4b037f6751e72f85afb2c585e1b406c97e6
R
7,849
162
#!/usr/bin/env Rscript .libPaths(setdiff(.libPaths(), normalizePath(Sys.getenv("R_LIBS_USER")))) ################################################ ################################################ ## LOAD LIBRARIES ## ################################################ ##########################...
625eaa90adda1088da90c67e9903db0ee1715826fffd301bdc9e0bd20a2f1d64
R
7,849
173
#' @title Run Standard Seurat Pipeline #' @description This function processes a Seurat object through various steps including normalization, PCA, and clustering based on specified parameters. It allows for conditional execution of each step based on prior executions and parameter changes. #' @param seu A Seurat object...
78c1ce0cedee54e6a51d3b50e2572196910b7909f7c5bec15376e6675d8b9020
R
7,923
237
#!/usr/bin/env Rscript # Written by Lorena Pantano and revised for flexibility in handling assays # Released under the MIT license. library(SummarizedExperiment) #' Flexibly read CSV or TSV files #' #' @param file Input file #' @param header Passed to read.delim() #' @param row.names Passed to read.delim() #' #' @re...
417c7afcebf47b2696a7dbb320bf0f373a85eec1a8572352c550d50dbe089f0c
R
7,929
302
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("winsorizedOu...
9aaae2acd659b9c6c44f3335d48bd836f59012711e49eac769a0bd7d64337982
R
7,929
270
############################################################ # Partial correlation between original U and V controlling # for global morphometric covariates # 1) SST_GVOL # 2) SST_BVOL # + permutation test for significance # # Author: Yuan Zhang # Date: 2026-03-30 ###################################################...
d32c3e8150495ca66b7745d7dfa2f4ad2ca45ccab48b8aacd01ea3c183eeaa8b
R
7,948
304
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC and s variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("winsor...
21a11edf1fcaf368b25217a46ed584e928dfa5643cea919c2d81dc2576e223b5
R
7,975
223
#!/usr/bin/env Rscript setwd('/Users/guofanhua/Desktop/gfh/work/experiment/ASL_Mesoscopic2025/reference/2022Nature_VascularAtlas/') ########################## library(scales) library(plyr) library(Seurat) library(dplyr) library(patchwork) ################################## df=read.table('..//data/sampleinfo.txt',heade...
150508475013e33c598bed1bb42d112f086cb7a15af21810dd2483f1afe7a650
R
7,976
221
--- title: "R Notebook" output: html_notebook --- <!-- # Western-blot densitometry quantification (Arp3, MRLC, pMRLC vs GAPDH) ## What this file does Reads per-lane band-densitometry tables (`read_*` calls open the per-blot intensity tables; the values are pasted in-line in this Rmd) for the Arp3, total MRLC and pho...
fb5964aa05a7c8ecb88a442b75f71f3fb44e669264a6d9d1f9e3a8b764b53b3d
R
7,981
249
# annotate modules with ClusterProfiler # Adapted from: # https://yulab-smu.top/biomedical-knowledge-mining-book/enrichment-overview.html load("Consensus_neural_meta_hdWGCNA_object.RData") # Load packages and data library(clusterProfiler) library(org.Hs.eg.db) library(enrichplot) modules = modules background = modu...
7bc15758fa74fade21e9a2341afb45f952e359ef793497b7f1fdfea584448671
R
8,016
181
suppressPackageStartupMessages(library(monocle, warn.conflicts = FALSE , quietly = TRUE)) suppressPackageStartupMessages(library(Scribe, warn.conflicts = FALSE, quietly = TRUE)) suppressPackageStartupMessages(library (optparse, warn.conflicts = FALSE, quietly = TRUE)) suppressPackageStartupMessages(library (igraph, war...
8ce5c21f32e362e481d4dc2115e9657b9caa82e37fce17c87bab52f76ce411c3
R
8,018
242
library(arrow) library(readr) library(ggplot2) library(rtracklayer) library(ggpubr) library(tidyr) library(dplyr) #---------------------------Read in datasets---------------------------------# protein_class <- read_tsv("nextflow_results/V47/orfanage/SFARI.protein_classification.tsv") expression <- read_parquet(("nex...
3b98946088982134108d53b488df3360d2a9c000088683b793bc795ed8558294
R
8,038
140
#' @title Compute and Visualize Cell Trajectories Using CellRank #' @description `Cellrank.Compute()` calculates cell trajectories using pre-existing pseudotime data in an AnnData object, providing an alternative to scVelo when it produces trajectories that may not align with established biological knowledge. `Cellrank...
5ebd53049c8e46a12b56fc17d199af672e9390b4f7291734ced15fdc305053d2
R
8,048
216
# hdWGCNA: https://smorabit.github.io/hdWGCNA/ # load packages library(Seurat) library(reticulate) library(Matrix) # plotting and data science packages library(tidyverse) library(cowplot) library(patchwork) # co-expression network analysis packages: library(WGCNA) library(hdWGCNA) load("day4_integrated_SMD.RData") Hu...
fc333daf426f1a13314f6d959e1f67fb16b4eb9933869b60344db9fdbc257f2b
R
8,059
186
#' @title Search Pathways in GO/Reactome Database #' @description Search for pathways in the GO or Reactome database using a gene name, pathway ID (SetID), or pathway name (SetName). #' @param item A gene name, pathway ID, or pathway name. #' @param type Types of search criteria. Can be one or a combination of "gene", ...
ab3f4a6076c9b45d7592794075fe357a3373b5db3e8cdf637b9a624dbd88c9c7
R
8,106
231
--- title: "Applying spatialDE to identify spatially DE genes" author: Stephanie Hicks output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load libraries ```{r} suppressMessages({ library(here) library(SingleCellExperiment) }) ``` Copy data (if needed) to be able to w...
b57363774cf180e41dc0e9fa3208ad2cd1493ed0dce24d9fe629b9e2fe547210
R
8,127
306
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing s variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("winsorizedOut...
7a03a3652882bd10a2429da979d7309ded9a3e95734f7dbf3ac9dd1bb0db07cb
R
8,138
236
#' Plot Running Enrichment Score #' #' Creates a two-panel plot showing the running enrichment score and #' ranked statistic for a specific region set. #' #' @param ranking Named and sorted vector of genomic regions and their ranking score #' @param region_sets List of region sets (from mapGRangesToRegionSets) #' @p...
d620493c26df5287fb59517ae03579f83fada76dd28b24c8ca05cc3de6d5fe0d
R
8,146
173
# ============================================================================= # 00_setup.R # Shared configuration, gene panels, signatures, and helper functions # for the multi-scale NPY / hypoxia transcriptomic analysis of IDH-wildtype GBM. # # Manuscript: "Loss of Neuropeptide Y Signaling Accompanies the Neural-to-...
78e30c38bacd027d714129b308a70825c58b89a8b2361199f28c81c003b9bd17
R
8,206
207
# note: need to add cutoff option as well # Usage: # heatmap: function name # log2fc: path to log2fc file ################ heatmap function ################ heatmap_ <- function(plot_type,heatmap,dend_labs,reordercols,legendtitle,squish_bounds) { # read in logfc table (must be a tsv with columns: label, log2fc)...
ea3f51bda13c88ce8eb73a1c860cfb96289fd125a367bb6a0eddf2509f75cc14
R
8,222
318
##################################### # Estimate correlation coefficient between metacognitive effiency # estimate between two, three, or four domains. # # Adaptation in R of matlab function 'fit_meta_d_mcmc_groupCorr.m' # by Steve Fleming # for more details see Fleming (2017). HMeta-d: hierarchical Bayesian # estim...
dc65c2a33a985de0c3e31c8efce294178898e2623c3de12aff57c0095c34b833
R
8,250
304
############################################################ # NMDA scatter plots for CCA-derived GMV maps # Author: Yuan Zhang # Date: 2026-05-29 # # Description: # This script plots associations between CCA-derived GMV # structural phenotypes and the NMDA receptor map for: # 1. CMI math # 2. CMI reading # 3. St...
c85d7ff5f18a3cdfee0ccebfada7f632ec73c47429f4c556c115acd69b19d4a4
R
8,256
306
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC and s variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("social...
3060434f44cfb7ce65390db74602cd80e5a7fce8f131c5f4576fb996a278c360
R
8,305
288
--- title: "HumanPilot: Clustering using PCA, UMAP, marker genes, spatial coordinates" author: "Lukas Weber" date: "`r format(Sys.time(), '%Y-%m-%d')`" output: html_document: toc: true toc_depth: 2 --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, cache = TRUE) ``` # Introductio...
533ac44c2b81b94005fa7c7ea7b3a3dc2be40b816f840f05b05201a40d407fe4
R
8,342
293
--- title: "Maze_Statistics" output: html_document date: "2025-01-23" --- ```{r setup, include=FALSE} rm(list = ls()) knitr::opts_chunk$set(echo = TRUE) library(ggplot2) library(tidyverse) library(dplyr) library(ggpubr) library(rstatix) ``` ```{r} library(emmeans) data_maze_raw <- read.csv2("./dat...
99893c713ed1ae83cf138a47cb0dfeadb6c0e721b6a71bf75492e7f532a143ab
R
8,358
270
--- title: "Survey the expression of beat/side othorlogs in mosquitos Aedes aegypti" output: html_notebook --- # Load the packages. ```{r} library(tidyverse) library(magrittr) library(ggridges) library(RColorBrewer) library(Seurat) ``` # Prepare the dataset. ```{r} # The following datasets could be found in https...
fbdabe0c26d1708669dd64c0c6ca48832f05a67cb0aae1a198f02398a020b9e4
R
8,369
225
library(deSolve) library(tidyverse) GLV <- function(t, x, parameters) { with(as.list(c(x, parameters)), { x[x < 10^-5] <- 0 dxdt <- x * (r + A %*% x) list(dxdt) }) } sigma=0.1 sparsity=0 ## 0.2;0.5;0.8 generate_glv_parameters <- function(p, seed) { set.seed(seed) A <- { A_temp <- matrix(rnor...
cd6cdb6142bc7ee4839f2e49c8fbf4960c3b0606f9c23515ef944273e6dd1322
R
8,379
310
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing s variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("socialBehavior...
4dab2eee27f3cb0eadc63120e00ddb43a27c846b2970b87311b879d38b9a5977
R
8,398
236
--- title: "Literature proportion analysis" output: BiocStyle::html_document: toc: true date: "2023-07-28" --- ```{r setup, include=FALSE, message=FALSE} knitr::opts_chunk$set(echo = TRUE) source("../../utils/dario_functions.R") LoadLibraries() SourceFiles() ``` # Read in data ```{r, fig.height=4, fig.width=8...
3042a27231ad48f5f87bc383b28e763dabcf4b56e3427f12181593b8f3fc3118
R
8,436
220
#' Smooth data by PCA #' #' Perform PCA, identify significant dimensions, and reverse the rotation using only significant dimensions. #' #' @param x A data matrix with genes as rows and cells as columns #' @param elbow_th The fraction of PC sdev drop that is considered significant; low values will lead to more PCs bei...
f9e9a50d7e5743e53d877c2814bf3e7d5c5b86e60417ff27c17e6d1df9a1d8f6
R
8,456
308
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script predicts Savg from the genotype and neural network metrics. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) prl <- read.csv("socialBehaviorPrLdataPIi...
72ffbcfb40eac291a26e67a9e6723d8b345343a5b312eca0dd48ca88baea612d
R
8,464
207
library(tidyverse) my_theme <- theme_bw() + theme( plot.title = element_text(size = 15, hjust = 0.5), axis.text.x = element_text(size = 14, vjust = 0.5, angle = 90, hjust = 1), axis.text.y = element_text(size = 16), strip.text = element_text(size = 18), strip.placement = "ou...
1045424585d874a8d369db2117d1827b192b4a5821e74b05b9bc469d4d4c9293
R
8,466
253
## From https://gist.githubusercontent.com/mages/5339689/raw/2aaa482dfbbecbfcb726525a3d81661f9d802a8e/add.alpha.R add.alpha <- function(col, alpha = 1) { if (missing(col)) stop("Please provide a vector of colours.") apply(sapply(col, col2rgb) / 255, 2, function(x) rgb(x[1], x[2], x[3...
ab1ff0bae7011f1e959e99d5043f53b7a0cce065ea14eec0205adc8e33680c02
R
8,483
210
# Fit NB regression models using different approaches fit_poisson <- function(umi, model_str, data, theta_estimation_fun) { regressor_data <- model.matrix(as.formula(gsub('^y', '', model_str)), data) dfr <- ncol(umi) - ncol(regressor_data) par_mat <- t(apply(umi, 1, function(y) { fit <- qpois_reg(regressor_d...
36cb6a14fed5793c1893aabfbf7cd5f3ae1192aa8855a2d8928e343cc4f55915
R
8,510
255
calc_entropy <- function(u) { p <- u[u>0] p <- p/sum(p) -sum(p*log(p)) } # given a matrix of labels, calculate all pairwise ARIs calc_aris <- function(m, flavour="ARI") { a <- diag(ncol(m)) for(i in 1:(ncol(m)-1)) for(j in 2:ncol(m)) { if(flavour=="ARI") { require(mclust) a[i,j] <-...
b2e8eaabb91f4a458fe0b725b0d0478457a3dd9874b3697ab42543abcc148ed6
R
8,529
316
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing s variables for M3. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("socialB...
a40ca4af24d7b577b69b387d1b98905a85f26b44606a7a077bfda23dcdff7122
R
8,535
317
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("socialBehavi...
ed646f76a83e94cbaf8674d74a8b93f4a19f04730f0203a4b8ea1041f1eb32df
R
8,547
317
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("socialBehavi...
f46397e265506a6b0bf76d8298fa1d8b342e2a807e61a09d17c91bb4057181b1
R
8,575
323
--- title: "K group fold ML winsorized w/grid tuning" output: html_notebook --- This script is for the ablation analysis removing AUC and s variables. ```{r, warning=FALSE, message=FALSE} library(tidyverse) library(caret) library(randomForest) library(beepr) library(tictoc) library(doParallel) prl <- read.csv("social...
40addd3af70f696833a39e16fa2de7d638c2f7256323f91c7647c217492f9906
R
8,579
209
# cfDNA_enrichr_analysis.R # this file is meant to be used inside Rstudio # this script takes in gene lists, connects to the Enrichr databases and output graphs of enriched pathways and proteins library(enrichR) library(ggplot2) # read in significant gene lists (q<0.01) # intragenic 5hmCG gene_5hmc <- fread('/mnt/i...
a3e5a801b33410e3ba2d228bd6a763c0935e723821b237819934c89a83b269ec
R
8,644
301
#!/usr/bin/env Rscript library(rmarkdown) library(optparse) option_list = list( make_option( c("-r", "--report"), type = "character", default = NULL, help = "Report template file", metavar = "character" ), make_option( c("-o", "--output"), type = "ch...
31e42ab0c7f61498b11a6b756bea7a4e282723a9d880135bdc7eb7788c9f3218
R
8,655
271
rm(list = ls()) library(pbapply) library(parallel) library(mgcv) library(emmeans) df_combined <- readRDS("C:/df_combined_delta.rds") df_combined$Subject <- as.factor(df_combined$Subject) df_combined$Gender <- as.factor(df_combined$Gender) df_combined$ROI <- as.factor(df_combined$ROI) df_combined$Time <- a...
cc8e0523876c0e156047e89fe66cc041ce0113f8beba7fb76c47f8ce117ef581
R
8,674
239
--- title: "Train UMI-fy model" author: "Christoph Hafemeister" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: true code_folding: show highlight: pygments df_print: kable link-citations: true --- ```{r setup, include = FALSE} library('Matrix') library('ggplot2') library('knit...
9ca6074bc7e7e293df0bb2b56cc34bcca37eafd1dc037f5d3d84d0257c92a197
R
8,719
185
# It should be possible to pass some arguments as either unit() objects or as # numbers. Numbers should be converted to unit(n, "lines"), while unit() objects # should remain unchanged. # A combination of units for some arguments and numbers for others should be # possible. # # These arguments are: # box.padding ...
9be26318f54856efde76df59a293eb411c1e902d57e2719fa080ca11c104db90
R
8,736
267
addSNPs <-function(covstruc, SNPs, SNPSE = FALSE,parallel=FALSE,cores=NULL,GC="standard"){ print("Please note that an update was made on 11/21/19 that combine addSNPs and the multivariate GWAS functions into a single step. Therefore, addSNPs is no longer a necessary function.") warning("Please note that an ...
97b5853deb0635fcd4d4a10e4d43ab361896e9870b6c5dada06c6cf6594eedd5
R
8,767
175
test_that("end-to-end run over the synthetic fixture produces correct schemas, sort order, and files", { dir <- local_temp_dir() fx <- make_synthetic_dataset(dir) outs <- out_paths(local_temp_dir()) res <- run_eqtl_finemapping_files( index_eqtl_file = fx$index_eqtl_file, cis_pairs_file = fx$cis_pairs_file,...
eff54c1cdc6292ab3f0258a281e2cc9079d2a7cd2c8d93158bffe83b0a2c032b
R
8,800
190
################################################################################ ### Resolving strandedness in the GWAS samples. ### We discovered an issue in which the SNPs did not always match with the ### mm10 or C3HeB/FeJ references at their specific positions, so we ### consulted Dr. Jeff Smith. He had the s...
922f328155107aef1ae1452adf4c08c7ec950977b383ae4ad7cd51404122230e
R
8,849
264
library(parallel) library(igraph) library(matrixcalc) library(MASS) install.packages("/Users/satabdisaha/Downloads/QUIC", repos = NULL, type = "source") # library(QUIC) library(Hmisc) library(robustbase) library(GENIE3) library(fitdistrplus) library(ZIM) library(ggplot2); theme_set(...
919832ba4e61e1398ae8b9c5a7596ade0cd7cb62894343b9263900b1c859afac
R
8,900
289
#!/usr/bin/env Rscript # Subject-level all-critical ROI tests. # # Input: the CSV/TSV produced by 01_calculate_roi_isps.py. # Output: # - subject_level_summary.tsv: subject means by ROI x version (same/diff) x smltp. # - subject_level_ttests.tsv: parametric paired t-test of WBSLD(same) vs WBSLD(diff), # ...
436799892904a75482505320a88b7fc514e77c398dcfea4c6c35e1922db009ec
R
8,929
185
# Function to generate a permutation map from a set of cortical regions of interest to itself, # while (approximately) preserving contiguity and hemispheric symmetry. # The function is based on a rotation of the FreeSurfer projection of coordinates # of a set of regions of interest on the sphere. # # Inputs: # coord.l...
bd15bf602c896d3e53454ba8e612f6c0d0fadbb2c5dabb3efebdfa932d0f94cf
R
8,988
164
setwd('~/Desktop/Research/ciona/spatialTranscriptomics/myData/') # slide 1 slide1 <- read.csv('ciona_brain_nc1/spatial/tissue_positions_list.csv', header = FALSE) slide_1_1 <- slide1 slide_1_2 <- slide1 slide_1_3 <- slide1 slide_1_1[slide_1_1$V6 > 4000,]$V2 <- 0 slide_1_2[(slide_1_2$V6 < 4000) | (slide_1_2$V6 > 70...
a67fb227b6c18b5bdd49bdc4d3f97834ea636689f3b9cb4a9863222f540850b0
R
8,993
302
############################################################ # Compare GMV weight maps across cohorts/domains # Rigorous comparison using cocor + figures # Author: Yuan Zhang # Date: 2026-03-24 ############################################################ rm(list = ls()) library(Hmisc) library(corrplot) library(ggplo...
da8b8c175f211a48c8da3e473c2ea77f17e69dec8380897cd45e121cddd6e29d
R
9,009
142
### Harmonizing connectivity matrices for efficiency analysis ######################################################### ### (A) Installing and loading required packages ######################################################### if (!require("dplyr")) { install.packages("dplyr", dependencies = TRUE) library(dplyr) }...
aa80365f606ed1e07cd3a6f2ea6840f22c8120040bb065051b56eee343d15c76
R
9,014
145
--- title: "Variance Stabilizing Transformation" author: "Christoph Hafemeister" date: "`r Sys.Date()`" output: html_document: highlight: pygments --- ```{r setup, include = FALSE} library('Matrix') library('ggplot2') library('reshape2') library('sctransform') library('knitr') knit_hooks$set(optipng = hook_opti...
b21395caf121433b87456a69097d596f8a7d59f211a8516053a2449c72440fab
R
9,014
174
## 11_itgb2_csf_pleocytosis.R ## ## Why ITGB2 is detected more often in MS than in control CSF, and why that is not an ## MS-specific property of the protein. ## ## Background. ITGB2 (CD18) is the one Tier-1 candidate whose Astral CSF measurement is ## substantially incomplete: it is quantified in 700/978 MS (71.6%) bu...
556359975f67bde45f9c605552eba3c83466a40fa27fed3f0ab57fa89ba18409
R
9,074
263
#' @include GeneSetAnalysis.R #' NULL #' @param parent ID or name of the parent (top-level) gene set in the GO/Reactome database. #' This restricts the analysis to a subset of gene sets. Default: NULL. #' @param dataset (GO) Alias for 'parent'. Default: NULL. #' @param root (GO) Specifies which root category to use: #...
8ecd2c2f478a3d09bb4208ac0501859a549e95eeb2f9a6a22521b2491e59d1d1
R
9,121
275
--- title: "Quick Start-Up Guide" author: "Yichao Hua" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Quick Start-Up Guide} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} --- ## Quick Start-Up Guide {#quick-start-up-guide} This quick start-up guide provi...
e28a268127413340420d7f82a78b0e57829e37f4495e7de934f012f1b375b2a0
R
9,129
239
# write all source data to file rm(list=ls()) # Load packages ---- library("here") library("magrittr") library("tidyverse") library("sgof") library("openxlsx") # results dir ---- resdir = here("sourceData") loadResults = function(files) { df_models = lapply(files, function(f) { read_table(f) |> mutate(src = ...
c50b8733d8127c9d2a9b9ada050be1d04a63f577b0ab94f2c8c29572a5b23ee8
R
9,149
332
--- title: "Survey the expression of beat/side othorlogs in clonal raider ants Ooceraea biroi" output: html_notebook --- # Load the packages. ```{r} library(tidyverse) library(magrittr) library(ggridges) library(RColorBrewer) library(viridis) library(gplots) library(pheatmap) library(grid) library(gridExtra) libr...
3d1c94f8ab318382895203a138109f215ca650accbbdb16bb34f3aa3b10bb6ca
R
9,150
224
# Internal output-table builders and writer for run_eqtl_finemapping_files(). # # All functions in this file are internal (not exported). #' @keywords internal #' @noRd get_scalar <- function(row, col, default = NA) { if (col %in% names(row)) row[[col]][1] else default } #' @keywords internal #' @noRd get_opt_colum...
3e68880fdbf06e04ca1f778b654d333d7ae8b1fc6b0c84489c6bab2ce91c5005
R
9,150
269
--- title: "R Notebook" output: html_notebook --- <!-- # ED Fig 2i - Frequency of actin waves per axon and minor neurite, # before and after polarization (DIV-3 polarized neurons). ## What this file does For each DIV-3 polarized neuron movie: 1. Reads soma-actin + actin-wave-frame CSVs. 2. Classifies wave-receiving...
bc4ad1c2ac5073068eeb3e4f96cc887afcd32b97e56dd0838d54b0175fdbea3f
R
9,150
153
setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/") # Functions ------------------------------------------------------------------------------------- file.edit("chen_loubiere_2025_git/function/augmentation_function_tiling_sliding_window.R") # For ATAC-Seq peaks file.edit("chen_loubiere_2025_git/function/comput...
f7289c8b62639081e87410b5bf4a82c5eebf4946bd1681253a50e1907333c6a9
R
9,152
309
--- title: "R Notebook" output: html_notebook --- <!-- # Para-aminoblebbistatin somatic PA-Rac1: neurite length-difference comparison ## What this file does Reads per-cell neurite-length CSVs from PA-Rac1 photoactivation at the soma in WT neurons treated with 40 uM para-aminoblebbistatin (`csv_file` from `Path_1`, l...
e345a6589aa3eaa13c67a47230be30124d5cca185b00eae661946574d1b21974
R
9,163
298
#!/usr/bin/env Rscript # Author_and_contribution: Niklas Mueller-Boetticher; created template # Author_and_contribution: Lucie Pfeiferova; functions for Giotto HMRF spatial domain exploring # Author_and_contribution: Søren Helweg Dam; created environment setup script, updated environment yaml, added configs, tidied co...
e9f0076f21cc44930a16bc077aaff52c5257caa81bd91cab0e25029c4c9bab0d
R
9,163
268
#' @include generics.R #' NULL #' @param seu A Seurat object. Only applicable when using the Seurat method. #' @param features Features to be plotted, which can include gene expression or any other data that can be retrieved using the `FetchData()` function. Only applicable for the Seurat method. #' @param group.by A ...
d6acdbe734fcc1c6efd22e7d814e5cc304adedd4558749d21f11fa5ef4bc6a05
R
9,239
207
# 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...
5eedbb09ca51d7f03da48b8a3f3782a25e462e6a9c0d76f7ae263b9a4ef88215
R
9,264
246
# ============================================================================== # Script: 4_segmentation_stats.R # Manuscript relevance: 3.1, Table S1, Table S4 # ============================================================================== # PURPOSE: # Summarize the input to / output of the linear segmentation pip...
978f756dd6924825dde5f254e57fc821d5c300d754960a121ca5929b2df76ed8
R
9,281
287
######################################################################## # Common functions for RWRtoolkit. ######################################################################## load_network <- function(path_to_edgelist, type = NULL, name = NULL, ...
e04f7c54c2e2bccf196da7f93bb305a634ff3d76978a0087c5a89e4a2543dbe6
R
9,281
193
#' @title Run harmony pipeline on a Seurat Object #' @description This function performs normalization, feature selection, scaling, #' PCA, batch correction using Harmony, and optional UMAP and clustering on a Seurat object. #' It is useful for integrating data across batches or technical sources. #' #' @param SeuratOb...
b758adfdc7ada60cd09f8d71b0903ed7e6e2714899bfa299d4397d3b499824aa
R
9,307
345
--- title: "R Notebook" output: html_notebook --- <!-- # EB3 integrated tip intensity per neurite (before / CK-666 / washout) ## What this file does Reads ComDet trajectory CSVs (`Tra_file` from `Path_1`, lines 49, 63; subfolder enumeration at line 242) and saved `df_list.RData` cache (line 250) for the neurite-tip ...
dee2fb3ad1469fc8e1392a8512df375e1665e60c9a89a03c954deeaab89e2939
R
9,313
214
context("geom_text_repel_just") my.cars <- mtcars[c(TRUE, FALSE, FALSE, FALSE), ] my.cars$car.names <- rownames(my.cars) p <- ggplot(my.cars, aes(wt, mpg, label = car.names)) + geom_point(colour = "red") + expand_limits(x = c(1, 7), y = c(12, 24)) test_that("center with rotation", { vdiffr::expect_doppelganger...