sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
7581c5b9a78b1d87b276002cc06378524dc37a2601ab6dc9e0371068bdde5fef
R
13,917
457
--- title: "SpNeigh analysis of human healthy liver MERFISH data" author: - name: Jinming Cheng affiliation: - &duk_nus Centre for Quantitative Medicine, Duke-NUS Medical School, Singapore, 169857, Singapore # email: jinming.cheng@outlook.com date: "`r f...
9c960d080dce02bb2bdd5f561bd4d5498b38bb3ee0634a372a679ab35d75a33d
R
13,928
366
#!/usr/bin/env Rscript source("banc/banc-startup.R") version <- "746" # File paths save.path <- '/n/data1/hms/neurobio/wilson/connectomes/banc' dir.create(save.path) #################### ### GET SYNAPSES ### #################### # csv info desired_columns <- c('id', 'size', 'pre_root_id', 'post_root_id', 'ctr_x', 'c...
b51e11dbc8ae1b4892ce622eceec35eed587b63ca77cd5f135f50ab91c0db9c0
R
13,945
354
## Private (for now) helper functions flywire_cloudvolume_url <- function(cloudvolume.url=NULL, graphene=TRUE) { if(is.null(cloudvolume.url)) { u=getOption("fafbseg.cloudvolume.url") # the current option points to a graphene URL (should be flywire or zetta) so use that cloudvolume.url <- if(grepl("graphe...
d9915cf1e42d0581293d30191ebd251934a939fe3cece5481cf1a683610749dd
R
13,982
328
# ------------------------------------------------------------------- # Organoid vs EV Combined Proteomics Pipeline (R) # ------------------------------------------------------------------- # This script imports batch‑1 and batch‑2 proteomics exports, attaches # clinical metadata, creates unified sample labels, merges ...
fd054bd7c879742b7e9ae7b1e9bd3f0247758d01db288c8defdedbd9f1b33e1a
R
14,011
293
################################## # Examine distributions of the CARE IDH-mutant cell states across genetic alterations while controlling for grade # Author: Kevin Johnson # Date Updated: 2026.04.03 ################################## # Reproduce the following figures: 4a library(tidyverse) library(ggpubr) library(En...
de92ace82b9f87e42fd168110ace21f1d129fae861fa3c86be48a7116af0f425
R
14,014
550
--- title: "Get association between DNAm residuals and RNA residuals in ROSMAP data" subtitle: "We correlate probes and genes on opposite strands" author: - David Lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r format(Sys.time(), '%d %B %Y')`" output: rmarkdown::html_document: hi...
70b29064b7656c243742678394c2479ce8711a7d4231168854717940499607a3
R
14,027
270
library(metacell) # devtools::load_all('~/src/metacell.flow') library(metacell.flow) suppressPackageStartupMessages(library(ComplexHeatmap)) # wd <- '/home/feshap/raid/proj/mmcortex' wd <- '.' # setwd(wd) db_path <- file.path(wd, 'scdb') scdb_init(db_path, force_reinit = T) scdb_flow_init() SEED <- 1337 K ...
0e9d57ee5128e18dcf180050f6fc5a7889c2cf5cec048a994cb4337066153e86
R
14,076
273
#load the libraries library(enrichR) library(dplyr) #load in data this set is without the ENS genes both.genes <- read.csv("D:/PEA/List.of.genes.csv") #organize data ADvsNC.genes <- both.genes$CONvsAD.genes ADCHCHD10vsAD.genes <- both.genes$ADvsADD10.genes #first try with AD vs NC neuron DMR genes result...
12ed5e5c84d94278fa32e8ad6b3b3b30ab300d5790fce6cebbc49e60dd35983d
R
14,086
250
# ---------------------------------------------------------------- # The following script loads and processes data from: # # Kim, Minsuk, et al. "Fecal metabolomic signatures in colorectal # adenoma patients are associated with gut microbiota and early # events of colorectal cancer pathogenesis." # MBio 11.1 (20...
caf5d0c8d4ad04543e5ae1f2e66a4e6d87170370fec9ceb05f3968dc9d7758bc
R
14,093
314
#!/usr/bin/env Rscript --vanilla # Script for importing and processing transcript-level quantifications. # Written by Lorena Pantano, later modified by Jonathan Manning, and released # under the MIT license. # Loading required libraries library(SummarizedExperiment) library(tximport) ################################...
20b8d9dbbe192a5ac93ae955fb9414105e4cc430144c2c1c37e3f3b5dee4301c
R
14,104
293
# ------------------------------------------------------------------------------ # NeuroConnectivity - Profiling # # Author: Marlies Verschuuren # Modified by: Marlies Verschuuren # Creation date: 2023-12-01 # Last Modified: 2023-12-20 # ------------------------------------------------------------------------------ #-...
1bf4f35736753a77650ec3e0aabd9ebdcbcbdb9558ebe15fabda290cb5bf75da
R
14,126
291
# R code for "Brain structure and function in Homo naledi" # (Cofran et al., Brain Structure & Function) # Estimate missing landmarks for LES1 endocast # geometric morphometric analyses # comparing LES1 to recent humans and fossil hominins # First, download landmark data Neubauer et al. 2018 dataset: < https:...
34df8f1643716717675ba716d7ccd5058eaf8b80c86d0fb3e76f6aebc737f778
R
14,133
415
############################################ # Dyadic LME (frequentist) with df corrections # - outcome: dz = atanh(STTC_rebound) - atanh(STTC_late) # - fixed effect: probe (optrode vs contra) # - random effects: (1 + probe | mouse) + multi-membership (unit_i + unit_j) # - inference: Satterthwaite df and Kenward...
bbeaf3a5eaff24113cd7580ed25ada806d4b45b73ea10f4137d3bfda74350fc5
R
14,138
329
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Wrangling Mo's connectivity data with dn taxono...
5c24f60dbcf815a90d98732fae10328b7caaa502a4f26c6526b94bf2ee53195e
R
14,149
398
# Behavior Analysis - Paper Figures # Figure overview: # - Fig. 2 (main): Normalized bar plots pairing each vehicle with its # drug (saline_lira/lira_sd, veh_sd/dan_sd, saline_orfo/orfo, # saline_licl/LiCl) for select behaviors (and more behaviors in extended). # Each drug group is scaled to its o...
099828f6fbc24d43216eef5d73a7f1f9fd182d77eb839a0dc3ce634b6b5071d7
R
14,151
521
--- title: "Getting Started with SpNeigh" author: - name: Jinming Cheng affiliation: - &duk_nus Centre for Quantitative Medicine, Duke-NUS Medical School, Singapore, 169857, Singapore # email: jinming.cheng@outlook.com date: "`r format(Sys.time(), '%d %B...
a67e30a117198ebfb86b9a8c5e80259ec0d1a399a99a3b1567bdf9f029fbea9b
R
14,162
414
library(tidyverse) library(glmnet) library(ggplot2) # ============================================================================ # FUNCTION 1: Load and scale mean results # ============================================================================ create_combined_scaled_results <- function(metrics_config, base_di...
9af012f1df6e20250cf4ed6cc8a9334a9daf8ccde229664838d6b9bbadf23c86
R
14,176
355
library(ggplot2) library(dplyr) library(svglite) #### Read outlier files #### outlier_dir <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/06.Selection/03.PCA_Outliers" # Try to read the combined all outliers file first (most efficient) all_outliers_file <- paste0(outlier_dir, "/03.ALL_Outliers_PCA.txt") if (file.exists...
ca5116125e5e43a0a564dc96a95d307c9c3d17f0d62f0e47fe28a911b3412f57
R
14,177
411
## Run this on JHPCE at ## /dcs04/lieber/lcolladotor/with10x_LIBD001/HumanPilot/Analysis/spatialLIBD_files library("SingleCellExperiment") library("here") library("sessioninfo") ## Output directory dir.create(here( "Analysis", "spatialLIBD_files" ), showWarnings = FALSE) ## Load data load( here( ...
4841a59ce8d0e4bceee4944b05fe0d15f39e11d2c2dc5b182db5788f75db78c2
R
14,181
311
library(bancr) # Deformetrica folder deform.folder <- "/Users/abates/projects/flyconnectome/bancpipeline/deformetrica/mirror" deform.folder.points <- file.path(deform.folder,"Points") deform.folder.meshes <- file.path(deform.folder,"NeuronMesh") deform.folder.skeletons <- file.path(deform.folder,"Neuron") deform.folde...
e2bfa6c546b6c254400652f19bb3acd1fcf2d61cfa59f43c41b9694c5a052ea9
R
14,182
379
#' banc-cx-fix — Fix fafb_/hemibrain_ matches for central-complex neurons. #' #' CX neurons often have good `cell_type` but poor `fafb_cell_type` / #' `fafb_match` and stale `hemibrain_cell_type` / `hemibrain_match`. This #' script picks the best matching FAFB id and hemibrain bodyid per #' cell_type using NBLAST score...
6bb50579628364c9370826871081d1953d436788a6c43a6a51e0fdd84e52db95
R
14,196
363
#!/usr/bin/env Rscript ############################################################################### ## Script: 3.6.viz_alluvial_ggalluvial.R ## Purpose: Classical alluvial diagram showing trajectory flow from early ## defects through mechanisms to late outcomes ## Output: 03_Results/02_Analysis/Plots/Trajec...
1c100c6400ef3e35711a3313e3c22ea69e468b4fb265fda1854411da3794d3c3
R
14,200
377
required_packages <- c( "dplyr", "UpSetR", "data.table", "VennDiagram", "ggpubr", "tidyr", "ggplot2", "ggalluvial", "readr", "pheatmap", "stringr" ) load_required_packages <- function(packages) { missing_packages <- packages[!vapply(packages, requireNamespace, logical(1), quietly = TRUE)] if ...
238fa35c69e251ff927fa92da847f64062660c0f4ddc1761120ff8a14f91f664
R
14,210
367
f = "/Users/danielesilvestro/Dropbox (Personal)/SpeciesConcept/empirical_fossil_clades/pyrate_mcmc_logs/CetaceaBD1-1_mcmc.log" f = "/Users/danielesilvestro/Dropbox (Personal)/SpeciesConcept/tree_fossil_pyrate/pyrate_mcmc_logs/Ruminant_occurrences_crown_1BD1-1_mcmc.log" f = "/Users/danielesilvestro/Dropbox (Personal)/Sp...
9f92a509e8b45fc4197cbff3467026fabc5e87bb2b6f3aeb0428ea9ab3e97c9d
R
14,244
335
library(ArchR) library(parallel) addArchRThreads(threads = 20) addArchRGenome("hg38") library(ComplexHeatmap) library(ggsignif) library("RColorBrewer") projdir <- "projrmSubset_subPeak" proj <- loadArchRProject(projdir) #Load in co-accessible peaks (for cell types) proj$subC_Dx <- paste(proj$subClusters, proj$Clini...
5d5180a72d4a669dc336bb5e71a41717ff2b5a9d14bcdf0d58f4e89a83aa9719
R
14,251
427
#' Plot spatial cell coordinates with cluster boundaries #' #' Plots spatial cell locations and overlays cluster or population boundaries #' if available. #' If `boundary` is not provided and `one_cluster` is specified, the boundary #' will be automatically generated using the `getBoundary()` function. #' This function...
8480f72466234f82f0c00ec2a5174fb0f2656e2a6b132271605b1fde1708035e
R
14,256
453
--- title: "S2: analysis of pupil sizes 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 = 'center', f...
bc73e6cb9b8df60275506b46cb3e36b295a11493dc808706f83a975122560657
R
14,261
228
library("here") library("sessioninfo") outdir <- "spatialLIBD_files" pkgname <- "spatialLIBD" meta <- data.frame( Title = c( "spatialDLPFC_Visium_spe", "spatialDLPFC_Visium_example_subset", "spatialDLPFC_Visium_pseudobulk_spe", "spatialDLPFC_Visium_modeling_results", "spa...
10cdcab0a2e0b435f466b981a8da1aece7b650dd5b9d512a480776c0007339ee
R
14,295
403
```{r setup, echo=FALSE, warning=FALSE, message=FALSE} rm(list=ls()) library(tidyverse) library(ggpubr) library(ggthemes) library(RColorBrewer) library(rstatix) library(ggnewscale) library(patchwork) library(ggbeeswarm) knitr::opts_knit$set(root.dir = "~/Dropbox/NSC_aging_lipidomics/") knitr::opts_chunk$set( ...
8208f989bd55afe0af3cf0f01b44e8c87ea66abc5d9c4a2f6dec022df0fd9676
R
14,303
353
library(ggplot2) library(dplyr) library(svglite) #### Read outlier files #### outlier_dir <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/06.Selection/05.TPM_PCA_Outliers" # Try to read the combined all outliers file first (most efficient) all_outliers_file <- paste0(outlier_dir, "/05.ALL_Outliers_TPM_PCA_Common.txt") i...
facd06b250dc818dd7ad57ad319fb014f2195459ab3c42747a9f518e0dfda0ef
R
14,304
455
# # sleuth: inspect your RNA-Seq with a pack of kallistos # # Copyright (C) 2015 Harold Pimentel, Nicolas Bray, Pall Melsted, Lior Pachter # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
1a97c6e618e89f53ec5860f02d09e06cd1b37f4fcd43af7ab893af5b22cdd1fd
R
14,310
291
#' banc-update-abdominal-neuromere-types — Push FAbG abdominal-neuromere types into SeaTable. #' #' Loads the annotated xlsx files from the FAbG project (Jiayi) and pushes #' cell_type / sexually_dimorphic / status updates to BANC SeaTable. Only #' rows with `FAbG_match` populated (and not `Not in AbG` / `BANC_unmatche...
cd31845aeee23fe7e8b7b8ec3f85b69f4f95cbc89f4d9862bfc034b028d3618a
R
14,350
405
--- title: "Fast, Windows‑safe coverage from transcript intervals" output: html_notebook --- ```{r} library(data.table) # Windows-safe parallelism by group with multisession library("future.apply", quietly = TRUE) library("future", quietly = TRUE) ``` # Fast coverage from [start, end] intervals (inclusive) # - dt:...
b0738efd99adf0d3be8864cbb7594c469ef6148e0baca711742350ff587dbb49
R
14,354
402
# # Control F and then replace "Factor1" with Factor_ rm(list = ls()) # BiocManager::install("edgeR") ?effsize::cohen.d library(tidyverse) library(edgeR) library(corrr) library(tibble) library(ggpubr) library(readr) library(circlize) library(beepr) library(ggplot2) library(dplyr) library(effsize) library(here) condi...
1a7b9755c8226ac68eaba09d1e76e32e6f433360580e0b842024eb2a129a7740
R
14,377
432
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # For testing out figures for Figure 3/4 of the b...
f4175cfca08cd9e2d9d762728a36ac84f8c7680e0555258fc552eda70f06471c
R
14,379
365
gatePlot <- function (outputId) { HTML(paste("<div id=\"", outputId, "\" class=\"shiny-gateplot\"><canvas id=\"gatePlotCanvas\"></canvas></div>", sep="")) } render_concatenate_ui <- function(working.directory, ...) {renderUI({ fluidPage( fluidRow( column(12, #selectizeInput(...
5dd8ef83f491eb684bd151a75fb0f6ae28fa37749d349d83eeeebf55c85468a2
R
14,386
482
library(numDeriv) fitKd = function(conc, resp, bidirectional = FALSE, verbose = FALSE, nofit = FALSE, force_sd = F){ logc = log10(conc) fenv <- environment() pars <- paste0(c("tp", "ga", "b", "er")) sds <- paste0(c("tp", "ga", "b", "er"), "_sd") myparams = c("success", "aic", "cov", "rme", "modl", pars...
7464051c9834c887c14bde19ab4180847441e02a1b86250756d7ca2295c248df
R
14,393
464
--- title: "tumor_analysis_inferCNV_P16_Post" output: html_document date: "2025-12-12" --- ```{r} library(Seurat) library(dplyr) library(ggplot2) library(readr) library(infercnv) ``` # Define functions This outputs annotations files for cell ranger cell ids and seurat clusters and returns a gene expression matrix ``...
887d3152ef3111e6cbc1d9737dca06d61214281ec7a4f5988d1c409febe90e9b
R
14,408
294
# ---------------------------------------------------------------- # The following script loads and processes data from: # # Mars, Ruben AT, et al. "Longitudinal multi-omics reveals # subset-specific mechanisms underlying irritable bowel syndrome." # Cell 182.6 (2020): 1460-1473. # # The output tables are: # 1) m...
3747a202b4dfff763aacb7eab78e7aa029a4ca78522307a00ae110bc5d3a4195
R
14,420
404
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # get neuron to neuropil synapses ##############...
bacd0cb501310e2f547ab0a92e61fcd46971a852d5590beaf5d84c6acdbb236e
R
14,446
253
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/ed8fb3e5-656e-43f1-9e5f-a763a4c61121 #### ##...
b77f2e9907b5045317c0c96953e086012a41c99f5dec7c0812eb6d921cf77d5c
R
14,448
252
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/def460b5-2f2b-4ab2-bc0b-a734ca869cb1 #### ##...
bb38c920b5d83c9fd8b7483bc19df971286cc429d173ae1e4d60e0396e0b19c7
R
14,449
253
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/bba53b25-29fe-4c55-9564-8ad4fcb6ec62 #### ##...
95f302767866aae89a9889f6db38720c16dd7aa706a1ba8a092222e210e6041a
R
14,451
253
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/9e44d795-e4b3-4a66-a10a-cd15c6dea754 #### ##...
4715caa3ef0ab57c2eaef478fa5386936c06cae93c2b76e114473908eda91d83
R
14,452
320
--- title: "Steps taken to generate Figure 2 of Koeber et al, Nature 2026" author: Alhafidz Hamdan output: html_document date: "2026-02-01" editor_options: chunk_output_type: console --- # This document details the methods/steps used to generate figures used in Figure 2 (Koeber et al. Nature, 2026): ## Load require...
00fee7162d0e4fe78c92588353a5e07d9e1b3155bc0506431b1aa318f908399f
R
14,453
348
# see https://dvidtools.readthedocs.io/en/latest/ # https://github.com/flyconnectome/dvid_tools # https://emdata5.janelia.org/api/help/ #' Interface to the python dvid_tools module from Philipp Schlegel #' #' @param user Default DVID user names #' @param node default DVID node to use for queries (see #' \code{\link{...
8e330e6fdb46de94413c15931b9b38ee22a0521184d84f5bf15d82c63598f8a0
R
14,462
240
here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS5.R") library(tidyverse) library(CroCoNet) library(ggsignif) library(patchwork) library(cowplot) library(here) dir_cor.kIM <- here("data/neural_differentiation_dataset/CroCoNet_analysis/") dir_cor.adj <- here("data/neural_differentiation_dataset/CroCoNet_ana...
224f2134950b2f4631c29a3db268d60d144e2ba9516275ce65f2dd6a2052933d
R
14,513
352
library(rstudioapi) library(dplyr) library(tidyr) library(stringr) library(ggplot2) library(pafr) library(gggenomes) library(GenomicRanges) library(IRanges) library(purrr) library(tibble) library(clue) setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) # --- 1. Compute scaffold pairing ---------------------...
9ff08cdc70ec9fa923025aac6fb03e09caa032b74b5634352a32c164466d8c87
R
14,563
477
################################################################### #### CAREmut study utils - scoring cells and generating null distributions ################################################################### generate_null_dist <- function(umi_data_list, md, sigs, genes_subset = NULL, n_iter = 20, n_cells = 10000, v...
1bde8374a9509225fc9e5da1ade897e3ffb11612d69030a0de4083b39beb4339
R
14,572
256
--- title: "acesinabcd_setup" author: "FB" date: "2024-03-11" output: html_document: default word_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Setup file for creating adversity scores in ABCD Running this code will create an RDS file including all relevant variables...
9661149cfd9055af0e1e6560a34f63c527e97f58afe415c020ecf07350679962
R
14,581
337
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") if (!requireNamespace("sva", quietly = TRUE)) BiocManager::install("sva") if (!requireNamespace("bladderbatch", quietly = TRUE)) BiocManager::install("bladderbatch") library(ggplot2) library(stats) library(dplyr) library(sva) # ...
f3a65ded8339a0f3edb2ff57330efae4bef27de9f4e347d8219295ad5a747b0a
R
14,597
302
# Load required libraries library(ggplot2) library(ggrepel) library(dplyr) library(tibble) # To use rownames_to_column ########## Human gene count ########## # Define Target Comparison Target_comparison <- 'FILTERED_1_MTLEALL_NL' Target_group_name <- '1' # File path for the DESeq results file_path <- paste0("/home...
f148897d2eaff5f2fc1dda34c1d2fbf7488aff69ed91b95ec22ef06eff276c28
R
14,631
397
# R 4.2.2 # XH Sep 9 2025 library(ComplexHeatmap) library(dplyr) library(ggplot2) library(data.table) library(enrichR) library(memes) library(colorRamp2) outp <- "/geschwindlabshares/RexachGroup/Xia_Data/atac_cellrangerOut/project0318/cisTopic" peakmat <- readRDS(file.path(outp, "Microglia_peaks_by_cells.rds")) meta <...
540a2fc0cba85dcd5ea22a6326c8ebea8f00d9a35352268d12f8798efb3c6686
R
14,632
574
--- title: "Run coMethDMR of Rosmap and BDR DNA methylation data" author: - David Lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r format(Sys.time(), '%d %B %Y')`" output: rmarkdown::html_document: highlight: breezedark theme: lumen toc: true number_sections: true ...
32d5804c4f224b127ffd9e504820437eb5f43f055aeeb5601d696f3b49a69166
R
14,636
358
# Support for queries from canned flywire connectivity datasets flywire_connectome_basedir <- function(d=getOption('fafbseg.flywire_connectome_dir', NULL), create=NA, check_contents=!create) { if(is.null(d)) { if(is.na(create)) create=TRUE d=fafbseg_userdir('flywire_co...
5dd2af0c500a88961c38c232c245d0c6a8c4bfee38fc460978daa200aa9b8eca
R
14,642
453
# ============================================================================== # Script 05: Figure 1F - Alteration Frequency Barplots # ============================================================================== # Description: Creates barplots comparing alteration frequencies of key genes # across ICL...
c0eeed4848c3ac636fffcf04a6763c59a12e6a8a42f18b58f907752bbed9863e
R
14,685
424
############################################################################### ## Temporal Trajectory: MitoCarta Pathway Recovery (D35→D65) ## ## Separation of Concerns: Focused on mitochondrial pathway dynamics ## ############################################################################### ##...
812c63693ec11fa11217be5ac91f61b1e79352f2f0a24c683f873fe410d0aa0e
R
14,694
291
library(MOFA2) library(reshape2) library(stringr) library(circlize) library(RColorBrewer) library(ComplexHeatmap) library(tidyverse) # Function to add asterisks to significant terms my_cell_fun = function(j, i, x, y, width, height, fill, table_1) { if(!is.na(table_1[i, j]) & abs(table_1[i, j]) > -log10(0....
9b9117d01b75fcf718b054d5c016484fb250b275aec609412ab2637f0a3dfebe
R
14,694
373
#' Spatial registration: pseudobulk #' #' Pseudo-bulk the gene expression, filter lowly-expressed genes, and normalize. #' This is the first step for spatial registration and for statistical modeling. #' #' @param sce A #' [SingleCellExperiment-class][SingleCellExperiment::SingleCellExperiment-class] #' object or one t...
373d84b07bbf9767fab15eb9b22518ed9f651514557870d6b5060aa96d7e325a
R
14,706
305
# =============================================================== # Gene-panel across datasets -> tables + heatmaps (padj-based) # Numbers shown in every cell; stars only if padj < 0.05 # Text: black & larger (significant) / gray & smaller (non-significant) # Dedup for bulk genes + final (cell_type, gene) uniquenes...
f8ee96c5ab4e4158fe378642e01d0bc5af60f93f86a23ff9ed9cdc5b4dab8a71
R
14,712
445
library(Seurat) library(ggplot2) library(scCustomize) library(patchwork) library(RColorBrewer) library(viridis) # load data --------------------------------------------------------------- data <- readRDS("diet_nodomap_cleaned.RDS") DefaultAssay(data) = "originalexp" View(data@meta.data) data <- SetIdent(data, value ...
7aec288d8805b535f4efd3e70596e31ba2062f7aff569673f0c0107dae2837d7
R
14,735
385
########################################################################################## # Imputation Methods ########################################################################################## #' Add Imputation Weights to an ArchRProject #' #' This function computes imputations weights that describe each ce...
368e99c6798600b346b3454db01cec409ad0dc1ddb15b9d79582bc930d926f2b
R
14,738
403
#' Sample spatial gene visualization #' #' This function visualizes the gene expression stored in `assays(spe)` or any #' continuous variable stored in `colData(spe)` for one given sample at the #' spot-level using (by default) the histology information on the background. #' To visualize clusters (or any discrete varia...
c7d76b6fb5465bb192c7e986f7844d3d7d2ce569b389f1823be7261103d755c5
R
14,739
234
--- title: "An Introduction to the MONSTER Package" author: "Daniel Schlauch" date: "2017-09-22" output: rmarkdown::html_document vignette: > %\VignetteIndexEntry{MONSTER} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, com...
ffee361ec59f82e8bb898500537b316a6bdce912dbbb9e4d23becdeab8870b43
R
14,758
454
--- title: "MRS × Time Mixed Models, Spaghetti Plots, Comparison of baseline vars by MRS tertiles" author: "LW" date: "`r format(Sys.Date(), '%Y-%m-%d')`" output: html_document: toc: true toc_float: true df_print: paged code_folding: show encoding: UTF-8 --- ```{r setup, include=FALS...
232045431a9bd879d1e546d2cda5efaeba4bcdd9bf21bde5ccfbe59fe1c17a7b
R
14,762
380
checkGenoInput_LDmat = function(bgenFile = "", bgenFileIndex = "", vcfFile = "", vcfFileIndex = "", vcfField = "DS", vcfFilters = "", savFile = "", savFileIndex = "", sampleFile = "", ...
c3fe7f6d497eede442b2142e7dd5e108cf86361662a7e388b50b8e608f1ed228
R
14,813
276
--- title: "neural_figures" output: html_document date: "2025-07-24" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load ```{r} library(ggplot2) library(dplyr) library(Seurat) library(scCustomize) library(xSelectCells) ``` #devtools::install_github('vikkki/xSelectCells@main', force = TRUE) Lo...
342165b2ba5a641a93863bc0494ebebb0262c377700e258c28f1250e9fd90d94
R
14,814
313
--- title: "N-back Preprocessing" date:"24/02/2022" output: html_document --- ## N-back RMarkdown (February 24, 2022; Version 0.1) This is an RMarkdown to allow for reproducible and accurate preprocessing of the N-back Psychopy task data created by Michael Colwell (michael.colwell@psych.ox.ac.uk / ORCID 0000-...
5b9e9a1b6a21677f4d3775dc51c12ed1edad5a9a617e33147902062364466b99
R
14,818
380
Libraries ```{r} library(data.table) library(psych) library(GPArotation) library(corpcor) library(EFAtools) library(lavaan) library(lavaanPlot) library(esemComp) library(ggplot2) ``` Set working directory ```{r} setwd('/UK_BB/brainbody/cognition/folds/') ``` Upload train and test sets generated and s...
88f8a129ad204c0ccc5024e2f2a9ee15413a60918923265b355b715cc69352e7
R
14,818
418
# Global RNA-seq differential expression analysis # Requirements: # - Working directory contains: # quants/ # per-sample Salmon quant directories # tx_id.txt # transcript IDs from reference # gene_id.txt # corresponding gene IDs # sampleInfo.csv # or sampleInfo_2.csv, with...
befa851a98450a162746ba5cf7b6d6e10cb978690c9c3d99b10c05614a2083c4
R
14,828
329
# ============================================================================== # Script 01: Master Data Loading Orchestrator # ============================================================================== # This script orchestrates all data loading in the correct order # as defined in Main_Data_Analysis.Rmd # # Exec...
0481379fd0ff2650665e74b7952406dd5c869396341d9c99f558593dd6692143
R
14,833
442
#### Section: Lineplot Construction #### plot_anova_lineplot_meanse <- function(data, info, layout_values, line_colors = NULL, base_size = 14, ...
067fc421dda2a9ea458c382a0adab9de93fc5ca2e4d82ea01132bbb8d45c30b2
R
14,841
313
#' banc-tracing-status — Status updates + roughly-proofread sensory marking (curation). #' #' Per-task curation script split out from the old #' `banc/utilities/banc-tracing.R`. Updates status from external tracing #' sheets, applies super_class corrections, cleans up orphans, marks #' sensory neurons roughly-proofread...
44e373714a07ad09e3ba7d0c46b0978b711a4d96fd5c07165a323875eb556da2
R
14,842
246
here::i_am("scripts/1.neural_differentiation_dataset/1.3.CroCoNet_analysis/1.3.5.cor_kIM_VS_cor_adj.R") library(tidyverse) library(CroCoNet) library(ggsignif) library(patchwork) library(cowplot) library(here) dir_cor.kIM <- here("data/neural_differentiation_dataset/CroCoNet_analysis/") dir_cor.adj <- here("data/neura...
34396928f2fa6d229f79522f8080a5199bdf9b93feb2a58b8f3f059c15e910ca
R
14,873
391
############################################################# ###### File Name: ROSMAPMARS_Freeze2_Harmonization_Script_20231020.R ###### DATE: 2023-10-20 ###### Authors: Jeremy Pasteris (Gary Beecham, PI) ###### Purpose: This script is intended to transform data received from ROSMAPMARS and delineate the exact way...
ea34f8bd72a0d4b6d51e8cf3309551f86c030e9f86668d5444a6e985e57c59d0
R
14,909
412
# ============================================================================= # CHCHD10 Interactome – Step 1 (v5) # # PURPOSE # Read Table 3 MaxLFQ, clean column headers, apply CHCHD10 IP presence rules, # and generate candidate interactor tables. # # INPUT # D:/Case_project/CHCHD10/CHCHD10_interactome/...
74c99e49c4ea2acdd00beba91c3f495e55bacf3658f5a3484f60f54026e3cce4
R
14,913
441
--- title: "Fig5" output: github_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, warning = FALSE) ``` ## Fig. 5: statistics and panel figures Panel A) the variance explained by the first principal component (PC1) for neurodevelopmental and psychiatric disorders (NPDs), their associated c...
cf1c5eff285352a8579a860c030d98c4d94bbbd40b80d5609ac231244f8dd887
R
14,926
371
# R4.4 # Load required libraries pacman::p_load(data.table, dplyr, biomaRt, GenomicRanges, Biostrings, BSgenome, stringr) # BiocManager::install(c( # "BSgenome.Hsapiens.UCSC.hg38", # "BSgenome.Mmusculus.UCSC.mm39" # )) # pacman::p_load(BSgenome.Hsapiens.UCSC.hg38...
675282c44308afe8b079b944a7b92b06fa0f439d275bc6cd98be8a8625c7cc0b
R
14,935
352
# ========================= Excitatory sets 1/2/3: normalize-if-needed + DEG (step-logged) ========================= # MODE: FILTERED WILCOXON DEG # This script runs FindMarkers with Seurat-style thresholds to focus on robust DEGs: # • logfc.threshold = 0.25 → keep only genes with ≥0.25 log2 fold-change # • min....
07ba91d3ca5a417eecae2789114cd29e9d84d1d15b35fd523e974d9216bd6781
R
14,940
299
library(dplyr) library(ggplot2) human_l2fc_df <- read.table("/home/joonho345/1_Epilepsy_RNA/RNA_Human/11.Sample_variables/02.deseq/DESeq_ALL.txt", sep = "\t", header = TRUE, row.names = 1, fill = TRUE) #Human_groups <- c('HS', 'withoutHS', 'childhood', 'adolescence', 'adult', 'X20', 'X40',...
fc1e079803bd99abad80990150a6bb54b84fcef86dc138b98ecc8dd269134b5c
R
14,957
401
root="C:/Users/Jun/Documents/R/AA_wSignal/" pre=2 #for peri-event histogram in seconds post=2 #for peri-event histogram in seconds preheat=10 #for heatmap in seconds postheat=30 #for heatmap in seconds sps=0.1258291 #signals/second tdir=paste(root,"rtrack",sep="") tfiles=list.files(tdir) outpath=paste...
9e5b4dc99f6d55066adbd9fb48c776dda622c121c3b78105834d1cb51c77868d
R
14,973
309
setOldClass("igraph") #' @include class-SOSet.R #' @import igraph #' @rdname SOTK #' @export #' setClass( "SOTK", slots = c( SOSet = "SOSet", # NMF objects/results and correlation matrix in SOSet class sample2metagene = "list", # assign samples to metagene based on thei...
d7c270dba9557b0211e8629e2d1a57aa02de10cfa687b900a995efa0b84b9180
R
14,978
336
#' Plots symmetric AUROC heatmap, clustering cell types by similarity. #' #' @param aurocs A square AUROC matrix as returned by MetaNeighborUS. #' @param cex Size factor for row and column labels. #' @param margins Size of margins (for row and column labels). #' @param ... Additional graphical parameters that are passe...
c4291dd2f0b40f4c09dec77966c3811c41af5a3a8d99306d80f0fb0213f9aea7
R
14,982
479
library(dplyr) library(tibble) library(readr) library(lme4) library(rstatix) library(ggplot2) library(ggpubr) library(tidyverse) library(patchwork) df <- read_csv("data/TREC_KREC_combine_Baby_4.csv") df$SNP <- factor(df$SNP) df$SNP_merge <- factor(df$SNP_merge) df$group <- factor(df$group) df$sex <- factor(df$sex) df...
e9449c15e33a1dfadf5cb21f05baa24611aeb2c87890f5381bec02835dc10b9d
R
14,987
290
############################################## # SCRIPT TO DISPLAY THE TOP FEATURE WEIGHTS # ############################################## library(MOFA2) library(readxl) library(dplyr) library(patchwork) library(ggplot2) library(stringr) # Retrieving MOFA load("C:/Users/User/Documents/Drive_PC/Lucas/GitHub...
1068bf90e027b157be11abcfb505bf15cc9af0d3f7cbfd694d10c36e60b765c6
R
14,991
334
here::i_am("scripts/2.validations/2.7.POU5F1_LTR7_enrichment/2.7.8.plot_regions_near_SPP1_and_SCGB3A2.R") library(tidyverse) library(plyranges) library(data.table) library(Gviz) library(cowplot) library(patchwork) library(rtracklayer) library(scales) wd <- here("data/validations/POU5F1_LTR7_enrichment/") fig_dir <- h...
5709457098a3a435cb1ac1dabf7a0b6c8819575ba7b5ed15c3016f23666d4b2f
R
14,996
390
#' Create a genome annotation object for ArchR #' #' This function will create a genome annotation object that can be used for creating ArrowFiles or an ArchRProject, etc. #' #' @param genome Either (i) a string that is a valid `BSgenome` or (ii) a `BSgenome` object (ie "hg38" or "BSgenome.Hsapiens.UCSC.hg38"). #' @p...
d0963611ca7a317a4c1c0e7cba9fcf33304366be13765a406176984ab7d5c122
R
14,997
161
#' Choose or (temporarily) use a FAFB autosegmentation #' #' @details Each released segmentation implies a number of global options. This #' package comes with multiple different default scene urls specified via #' \code{\link{choose_segmentation}} or \code{\link{with_segmentation}}. This #' is the easiest way to...
838f14a84586cb1309c0c4797b0b17183715d83b48d72d6586aaf4e537ef35f1
R
15,008
383
# This script performs WGCNA on vcar # Get a vector of genes recognised previously as expressed in species vcar_dds <- read_rds("~/2023-species_comparisons/DGE_pipelines/vcar_dds_filtered_052024.rds") vcar_anno <- read.csv("~/2023-species_comparisons/tables/annotation/vcar_anno.csv") vcar_all_genes <- rownames(vca...
b99379b312b9612c72bd79d8f25c09a5a73fa31da38565c7c67a418d61e28203
R
15,009
305
# Load required libraries library(ggplot2) library(ggrepel) library(dplyr) library(tibble) # To use rownames_to_column ########## Human gene count ########## # Define Target Comparison Target_comparison <- 'FILTERED_1_MTLEALL_NL' Target_group_name <- '1' # File path for the DESeq results file_path <- paste0("/home/...
1570a97fc9d9d74c9b35b19d567ac48513cae12d2979e472e8e95be7265d9ac1
R
15,019
337
#' banc-v3-synapse-sample — Regenerate the v3 synapse spatial sample CSV. #' #' Standalone replacement for the v3 sample block in #' `banc-calculate-completion.R`, which hit the SLURM-only arrow C++ URI bug #' ("Invalid: Unrecognized filesystem type in URI: file:///_") on the 15 GB #' spatial parquet. Uses narrow parqu...
34a54b15eec806a87ac651d2d13f9b5f9dd6b2572e6ee586fec9a36f09dcf13d
R
15,068
363
#' banc-calculate-connectivity — Build the versioned BANC synapse parquet + simple edgelist. #' #' v3 pulls CAVE-ingested synapses from GCS (not the local v3 parquet — see #' Notes); v2 pulls the human-readable CSV.gz. Both branches dedupe autapses, #' filter by size and SeaTable inclusion set. #' #' @section Reads: #'...
59f316995fa1ad15143ef1d0bd63b8274ea1fd156d071c4b1bd27b0b06cca92a
R
15,068
375
# =============================================================== # 🧪 Visualization Module — LM / LMM # =============================================================== visualize_lm_ui <- function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( class = "ta-sidebar", width = 4, h4("Step 4 — Vi...
4414663a1e155b10c1d54453446c9830883247cb5fff72ab638ba43c23190ec4
R
15,080
352
library(Matrix) library(data.table) library(Rfast) # pyconf = reticulate::py_discover_config() # if(pyconf$python != "C:/Users/tysheff/.conda/envs/R_keras/python.exe") reticulate::use_condaenv("R_keras") library(keras) source("R/combined_features.R") source("R/ml_tuner.R") source("R/combined_preprocess.R") source("R/co...
980685786f481b8f2fb8e0c46e56c8aac5c11e5f18c48f6ff231c3c33dc96151
R
15,088
397
# n-choice uniformly varying start point (0-A) Wald # race, with t0, v, A, b (boundary) parameterixaiton # pigt, digt, rwaldt Copyright (C) 2013 Trisha Van Zandt distributed with: # Logan, Van Zandt, Verbruggen, and Wagenmakers (2014). On the ability to # inhibit thought and action: General and special theories...
d592e8af4b9425db7837bbb1ad2b4e9735ff4929ddb145d40370bd6eb8544978
R
15,093
390
library(ggplot2) library(dplyr) library(svglite) #### Read outlier files #### outlier_dir <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/06.Selection/01.TPM_Outliers" # Try to read the combined all outliers file first (most efficient) all_outliers_file <- paste0(outlier_dir, "/01.ALL_Outliers_All_Genes.txt") if (file.e...
b380bb7e31841300cc58a98a0ddb8ea37d010bd0fd1e28be38c7493143c8be3a
R
15,109
445
--- title: "PILT_Comp_Analysis_FENCOG" author: "Michael Colwell" date: '2023-04-09' output: html_document --- ##PILT pre-processing script This is the computational modelling analysis for the Probabilistic Instrumental Learning Task (PILT), modified for the PEACE study by Michael Colwell (michael.colwell@psych.ox.ac....
80bcdbdbcdcae3e28dec508cc1ea9c2a939d088e946cd4514290c929266f7c78
R
15,158
362
##################################################################### # Helper Functions for cis-eQTL Analysis ##################################################################### #' Generate stratified fold IDs based on diagnosis #' @description Creates cross-validation fold assignments while maintaining balanc...
e94943739b63ab53acbc9b3e11e27da6f55004608180e457be3ee04acdd6aa0d
R
15,196
388
here::i_am("scripts/2.validations/2.8.POU5F1_CRISPRi/2.8.9.stemness_scores_and_knockdown_efficiencies.R") library(tidyverse) library(foreach) library(doParallel) library(here) wd <- here("data/validations/POU5F1_CRISPRi_processed_data/") ## Subsetting POU5F1-perturbed and control cells -----------------------------...
49b7174c8ae7d8787de3419d04ee19c07b6c38fdc5303983d5e16c797f4c3274
R
15,199
344
library(CroCoNet) library(foreach) library(tidyverse) library(scran) library(transformGamPoi) library(ape) library(SingleCellExperiment) library(foreach) ## Genes ---------------------------------------------------------- # list of regulators regulators <- sort(c("SOX2", "POU5F1", "ONECUT2", "TCF4", "BNC2", "TEAD1"...