sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
55fa5195e5a7488c0fc5fcf9ff9363cbe97ae2e08d798a6130f4826491ac27c6
R
10,251
283
############# Baseline by non-parametric bootstrap ######### # Import portrait divergence functions from github: https://github.com/bagrow/network-portrait-divergence # Packages library(abind) library(tidyverse) library(foreach) library(doParallel) library(reticulate) # Working directory #setwd("~/FC-Network-Replicab...
525014c8d703b9abcdac7c5cc5eb920ffd43d247767d3b8b2149477d946fec10
R
10,266
238
library(ggsegGlasser) library(ggsegSchaefer) library(ggseg) library(dplyr) library(ggseg3d) library(R.matlab) library(ggplot2) library(cifti) library(stringr) library(factoextra) library(matrixStats) library(scales) library(Hmisc) library(tidyr) library(cocor) # atlas data. schaefer200x17_label <- read.csv("G:/datase...
a55a990d4ab1d3e871a541254541348ea6c9615655accd03f9d34152fd34558e
R
10,268
261
library(SCENIC) packageVersion("SCENIC") library(AUCell) library(RcisTarget) library(GENIE3) library(zoo) library(mixtools) library(rbokeh) library(DT) library(NMF) library(pheatmap) library(R2HTML) library(Rtsne) library(doMC) library(doRNG) library(scRNAseq) library(SCopeLoomR) library(SCENIC) library(Seurat) ###数据准备...
b74aa7e4d7c8c3455ff6ffccb830d426611e84f6b4f7f8a76de69dd4d5d2b98e
R
10,269
249
library(readxl) library(dplyr) library(ComplexHeatmap) library(circlize) library(tidyr) library(ggplot2) library(outliers) aMgNp7_raw <- read_excel("AtlasV7/Axons/MgNp7_AtlasV7Axons.xls", sheet = "Sheet1") aMgNp8_raw <- read_excel("AtlasV7/Axons/MgNp8_AtlasV7Axons.xls", ...
a2294bc182f40591dd80698a0ccae7800c71749615e40cdc73c99b8983c30791
R
10,283
273
##################################################################### # MODULE testing data Prediction Pipeline - Network Averaging ##################################################################### # This script implements the final step of the MODULE pipeline where # predictions from multiple networks are comb...
c2346576ff42ab1bffc1f48f2599775a33944a9128d0a8427d25e2e599e5f661
R
10,289
288
################################################################################ # Figure 3C with Individual Points # Creates multi-panel grid of all tissue scatter plots (AGE vs Factor1) # with individual sample points colored by DTHPLCE and copies individual # tissue plots to the journal guidelines folder ###########...
0637a4fe9ea67b2e87591c7027a9f16ca33de96c3a00c7f0203b8fefb1d8ff6c
R
10,300
307
#!/usr/bin/env Rscript # Independently decode VCF GT calls and calculate signed reference-dosage # correlations using base R only. decode_reference_dosage <- function(sample_field) { genotype <- sub(":.*$", "", sample_field) alleles <- strsplit(genotype, "[/|]")[[1]] if (length(alleles) != 2L || any(allel...
1ccd0502128c8c50d95af7ebc4e286eed2bbabf203d87d6079c9d8de56674cf6
R
10,310
251
# Phase 6: GEO Dual-Disease Comparison # UC (GI bleeding proxy) vs Ischemic Stroke — target expression direction comparison # # GI: GSE66407 (gut biopsies, UC/CD/controls, 368 samples, Ensembl IDs) # Stroke: GSE16561 (whole blood, ischemic stroke vs controls, 63 samples, Illumina) library(GEOquery) library(limma) libr...
9be67bc52aae5225a9213abb6c735378af18d8098044f81f81a92230d11f9bcb
R
10,319
292
rm(list = ls()) library(Seurat) library(Matrix) library(ggplot2) library(plyr) library(tidyverse) library(tidyr) library(dplyr) library(ggpubr) library(reshape2) library(rio) library(data.table) library(harmony) library(GeneOverlap) library(readr) source('~/SCRIPTS/utility_functions.R') set.seed(1234) # Subset non-spn...
e6cdd5c26b32535b0d8389ea8a31e44d048492089798fe4e066c45e2de6d7846
R
10,321
287
#' Find the root identifier of a FANC neuron #' #' @inheritParams fafbseg::flywire_rootid #' @param ... Additional arguments passed to \code{pbapply::pbsapply} and #' eventually to Python \code{cv$CloudVolume} object. #' @return A vector of root ids (by default character) #' @export #' @family fanc-ids #' @seealso \c...
1f6cd72e892a3e524db458eb420a49c539775c033a1587bb496940a92c97f4f9
R
10,322
401
l0norm <- function(x) { return(sum(x > 1e-10)) } l1norm <- function(x) { return(sum(abs(x))) } l2norm <- function(x) { return(sqrt(sum(x*x))) } l2norm_squared <- function(x) { return(sum(x*x)) } # this function accepts missing values # # in daisy from cluster: # If the metric is "euclidean", # and n_g is t...
e1c093ad44ddbfcb67c34708e1c70f0f09083b2e3fa3afb65a50f65e636f39a5
R
10,327
283
##################################################################### # Genotype Data Processing Pipeline - Optimized for cis-eQTL analysis # Brain Region Specific Version ##################################################################### # This script loads and processes genotype data from PLINK format, # conv...
aa1505b1ed73e5b67d8c494ecfa09fc404d55658a6690d501601decfe68d085d
R
10,328
255
#!/usr/bin/env Rscript # Read in quietly to avoid outputting "Loading required package: Rcpp" to stderr. library(castor, quietly = TRUE) Args <- commandArgs(TRUE) # Read in command-line arguments. full_tree <- read_tree(file=Args[1], check_label_uniqueness = TRUE) full_tree$edge.length[which(full_tree$edge.length ==...
f218cc828b89b343d8ade011a16171b3f7eb8f6102d3e5e294c7b62b5fc85b55
R
10,329
242
#' banc-nblast-native — BANC self-NBLAST in native space (no mirroring). #' #' Surfaces ipsilateral sister cells, partial duplicates, and within-side #' morphology clusters that `banc-nblast-lr.R` (mirror) cannot find. #' Resumable. #' #' @section Reads: #' - SeaTable `banc_meta`, BANC L2 skeletons #' #' @section Wri...
8dacb5a651734e906ae2554cedcc7652743a264aacfa1294736da728299ac8b2
R
10,340
213
######################################################################################################################### ### This function is used for predicting DNA methylation age in cortical samples ### ### It was built using cortical DNA methylation array data (Illumina 450K)...
f4712a6f72e4f5859338af058101b6062cf98455ff3e5efcaff9f74e0c2169a9
R
10,342
291
--- title: "GAM Model partial effect graphs + heatmaps" author: "Neslihan Yildiz Ozhan" date: "2024-01-16" output: html_document --- ```{r} #NIH Toolbox visualization library(ggplot2) library(mgcv) library(dplyr) library(gratia) data <- read.csv("~/Desktop/ABCD/abcd_coi.csv") # z-score scale data <- data %>% mutat...
ee53e6ad81a2f211a4173a923d767ef976926292d382c6d2ea2831f3eaf26090
R
10,360
218
setwd(choose.dir()) #set the environment library(tidyverse) library(dplyr) library(pracma) library(ggforce) library(purrr) #### Load file (Spike List) - only set to do one file at a time #### MEAdata <- read.csv(choose.files(default = "", caption = "Select files", multi ...
630c2506f0de4c07555b59e66cda58ec6a11702f6288b0a641aaf9607f9ef50d
R
10,382
280
#!/usr/bin/env Rscript # ============================================================================== # Benchmark Script for tsImpute on Simulated Data # ============================================================================== # Runs tsImpute + KMeans clustering on simulated scRNA-seq data. # Calculates all 5 m...
ebe3d5cf8e778833bc0afeae0b72fbacc4cf040110e9a56cbd0cdeffda022b3e
R
10,390
196
################################## # Analyze malignant cell abundance across tumor types and grade # Author: Kevin Johnson ################################## library(tidyverse) library(RColorBrewer) library(viridis) library(ggpubr) library(openxlsx) library(EnvStats) library(ggrepel) library(cowplot) proj_dir <- "...
9b6aa5a6957949fc9d98bb6f0f0963634ada88be548d93a7b74b0c0095f481b8
R
10,393
263
--- title: "Effect Estimation Statistical Analyses" output: html_document --- ```{r, echo=TRUE} knitr::opts_chunk$set(echo = TRUE) library(lmerTest) library(dplyr) library(readr) library(emmeans) library(multcomp) library(tidyr) ``` ```{r} extract_stats <- function(m, coef_names) { model.df = data.frame(coef_names,...
ba238d22a5581bfc74a5dd0903e33f4f3e8e7b34fe65e28707e964d40133c46f
R
10,398
287
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
f7b614ee1bd5f6050825c0387e93c44a7b6b325c1af32dc109f9e046f9951d49
R
10,409
275
# Summarized topics with SNPs info (to one table or visualization) library(ComplexHeatmap) library(dplyr) library(ggplot2) library(data.table) library(colorRamp2) library(ggplotify) library(patchwork) library(gridExtra) outp <- "/geschwindlabshares/RexachGroup/Xia_Data/atac_cellrangerOut/project0318/cisTopic" add <- ...
ac738f1ad343ec9632ca5508eb9f5aba48ca7f2fd1136ffbdb9d5ea46eb42077
R
10,417
346
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(ggraph) library(igraph) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) # Data I/O ----...
3db44c69afb9189640470bb2740915775422a9ef3c57117c410a2eff2323e4e0
R
10,419
128
#!/usr/bin/env Rscript library(Matrix) library(Seurat) library(tidyverse) library(readxl) library(Augur) source("scRNAseq_funs.R") RowSD <- function(x, rmNAs = TRUE) { if(isTRUE(rmNAs)) { sqrt(rowSums((x - rowMeans(x, na.rm = rmNAs))^2, na.rm = rmNAs)/(sum(!is.na(x)) - 1)) } else ( sqrt(rowS...
cbdb02f0aec8c296e1eaa4895f1c93761acd02c7637453d1c89b82882061bc13
R
10,433
287
#' banc-cx-review-images — Generate comparison PNGs for CX connectivity mismatches. #' #' For each row in `cx_connectivity_mismatches.csv`, render a three-mesh #' comparison PNG: BANC neuron (blue), curated SeaTable-type FAFB neurons #' (red), connectivity-matched FAFB neuron (green). Uses `fafb_match` where #' availab...
1574fad671b880ec130a781116ca0b05f2e633a2f2a4b903b2412883ef4ac57c
R
10,435
223
#' @import ggplot2 plotSimilarityStat <- function(plot.df, y.lims, fill.color, text.angle=60, size=0.3, width=0.25) { ggplot(dplyr::filter(plot.df, !SameCondition), aes(x=Type, y=DiffStat)) + geom_boxplot(fill=fill.color, outlier.alpha=0, show.legend=F) + geom_hline(aes(yintercept=split(DiffStat, Type) %>% s...
21aff9a467f3af981ef204f4a2778622f5bfefc28ef9dc39dcfb584c3bc43ae5
R
10,435
205
library(tidyr) library(mgcv) library(gratia) library(tidyverse) library(dplyr) library(numDeriv) # colnames(gam.data)[202] <- "sex" # colnames(gam.data)[203] <- "subj_id" # colnames(gam.data)[204] <- "mean_fd" # colnames(gam.data)[205] <- "mean_gs" # colnames(gam.data)[206] <- "mean_br" # colnames(gam.data)[207] <- "m...
52169462c88f65b52e048c0002a909ff3e11e132cad526f7205d5c3bafd29279
R
10,452
325
library(dplyr) library(plyr) library(Seurat) library(ggpubr) library(reshape2) library(tidyr) library(tidyverse) library(DropletQC) source('~/SCRIPTS/utility_functions.R') set.seed(1234) ##### ## LOAD COUNT MATRIX ##### # Set the samples and read them with QC samplePath = '/home2/gkonop/project/03_MATRIX_FROM_CELLBE...
d6bfe112832a020fda336babcea4d09f120ab7010b63755b9c75132049a6d989
R
10,459
342
# =============================================================== # 🧪 Visualization Module — One-way ANOVA (Apply-button version) # =============================================================== visualize_oneway_ui <- function(id) { ns <- NS(id) sidebarLayout( sidebarPanel( class = "ta-sidebar", ...
209a071024ad7206be6dd666d39a99bf8feca4572aae284c3010ddf23004c485
R
10,469
203
#' Run Python implementation PANDA in R #' #' \strong{PANDA}(Passing Attributes between Networks for Data Assimilation) is a message-passing model #' to reconstruct gene regulatory network, which integrates multiple sources of biological data-including protein-protein interaction data, #' gene expression data, and tr...
fff3cc17460b277e65429d229093fe5c6dbd852e529ae9a695683109492a4495
R
10,477
231
#' @import dplyr NULL fTest <- function(de.genes, n.all.genes, gene.set, ...) { # Where k is randomly drawn sample # See https://www.pathwaycommons.org/guide/primers/statistics/fishers_exact_test/ n <- length(intersect(de.genes, gene.set)) n.de.in.gs <- length(intersect(de.genes, gene.set)) c.table <- matrix(...
0a546183a3a6e6f6c2ecec7dc76f49883ce2f83a87b05ef337243129433d0f28
R
10,483
243
require(igraph) require(tidygenomics) require(fuzzyjoin) require(data.table) make_read_plot_data <- function(DT, prime3_cluster_window = 25, cluster.TR.overlaps=T, cluster_neighbours = T, optimal_overlap = T, is.transcript.pos=T, add.intr...
2ec9ff8e547bb2d813dcb50a8bd30947c9a1fb90029685f044b74045308857ad
R
10,484
275
##################################################################### # INGENE Training Pipeline ##################################################################### # This script implements the INGENE (Inter-Network Gene Expression) approach # for training gene expression prediction models. # # Key Features: #...
3d87421e26d814c29b5ceedf30ac7cf752d55e1a25542133438a07ea2e2df4b5
R
10,506
413
#!/usr/bin/env Rscript suppressPackageStartupMessages(library("argparse")) # create parser object parser <- ArgumentParser() # specify our desired options # by default ArgumentParser will add an help option parser$add_argument("-i", "--input", required=TRUE, help="load preprocessed RData") parser$add_argument("--pat...
7325960c4d8f4195240be84da86bc2af4e3237444b85231644e3d8cf20e39afc
R
10,511
301
# # Step.00 ---------------------------------------------------------------------- rm(list = ls()) gc(reset = T) source('script/Functions/Functions.R') # unload packages pkgs[which(load.packages == F)] rpid = Sys.getpid() options(future.globals.maxSize = 1000 * 1024^3) ##################################################...
d09a9932e8b51b5be288db510d9a51cfff5584d0cc03bdd369a73b9927fe4545
R
10,520
222
--- title: "Code of runSCENIC_3_scoreCells()" subtitle: Workflow run by runSCENIC_3_scoreCells() output: BiocStyle::html_document: number_sections: no toc: yes toc_float: false css: corrected.css html_notebook: toc: yes pdf_document: toc: yes package: '`r pkg_ver("SCENIC")`' vignette: > ...
0f2a536ca66b0016ce7b11a58e643770bdb6663064bc32008b44c56a4dffd35b
R
10,590
33
cran_mirror <- Sys.getenv("R_CRAN_MIRROR", "http://cran.rstudio.com/") options(repos = cran_mirror) if (!require("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("methylKit") library(BiocManager) library(stringi) library(pacman) library(methylKit) library(ade4) library(FactoMi...
c2712dd0d3138583f96cca3cfef9a7f6edcb41c2cecd54f653a2c6188772f611
R
10,655
296
# ============================================================================== # Script 08: Figure 2C - CDH1 Exonic Deletions Analysis # ============================================================================== # Description: Analyzes CDH1 exonic deletions from WES data and generates # a heatmap vis...
be1a20e9abf7eb48011507380ad7a2e961e18c4fa231edcd9c839ef6e1f86465
R
10,660
250
#Data preparation library(haven) library(readxl) library(writexl) library(stringr) library(dplyr) #load spss file with the actigraphy inclusion criteria inclusion <- read_sav('~/Life-ADULT/pv801/actigraphy data/PV0801_T01408_MRT_15days_before.sav') colnames(inclusion)[1] <- c("SIC") #load full file with LIFE data li...
0022cc1d9404b49d13b619d06061de78c455d0894b637df88cccae0aef7979d3
R
10,673
216
#' Return neuron metadata from Cambridge seatables #' #' @description This function is a generic building block for access to #' experimental/in progress neuron metadata. It is intended for internal use #' and the end user or developer is responsible for choosing the active CAVE #' dataset (see \code{\link{choose...
37f6586eaa11ced0fc08d4909e8b1c2c6a220a817f2d1c7fda5db97dd202a3de
R
10,679
232
# required packages packages = c('rmatio', 'circlize', 'RColorBrewer', 'BiocManager', 'optparse', 'ComplexHeatmap') # load required packages invisible(lapply(packages, library, character.only = TRUE)) # options for the R script # Args : # output_directory : path to the output folder where the disconnectom...
db2cbf2411b7e00e5cca7da69a23f79afe5200efe3c7654def5b6009c08a2483
R
10,679
285
library(shiny) library(ggplot2) library(purrr) library(shinythemes) library(shinyWidgets) library(MHCbinding) library(DT) library(dplyr) library(waiter) waiter_set_theme(html = spin_rotating_plane(), color = "#333e48") input_tabs <- tabsetPanel( id = "upload", type = "hidden", tabPanel("Peptides (paste)", ...
4a5c02ae36a2074ebe53551e96826ef9e9f27f9e4bc5e2ea1b43b15e56c70a0e
R
10,697
225
# Load necessary libraries library(dplyr) library(ggplot2) library(ggrepel) #### Get H_gene_set_W from 00.Geneset.R #### if (!exists("H_gene_set_W")) { source("/home/joonho345/1_Epilepsy_RNA/00.Geneset.R") if (!exists("H_gene_set_W")) { stop("ERROR: H_gene_set_W not found. Please run 00.Geneset.R first or ensu...
b81b44f13f8359bd3673258a4fb9ab4d7f1f5e25d6465f3ea829b000ecd1fa71
R
10,701
199
library(tibble) library(readxl) library(dplyr) library(reshape2) library(tidyr) library(ggplot2) library(readr) library(here) library(magrittr) library(conflicted) library(eulerr) conflicts_prefer(base::intersect) conflicts_prefer(dplyr::filter) #for writing files out base_folder <- here("results","full_run_ZengAWS.16...
bf6c0a66bce61d41511732e942f97fd7b5af62d63194b727246aa831ad364aa8
R
10,711
287
library(rhdf5) library(data.table) library(dplyr) library(ArchR) library(parallel) library(preprocessCore) addArchRThreads(threads = 20) addArchRGenome("hg38") library(BSgenome.Hsapiens.UCSC.hg38) projdir <- "projrmSubset_subPeak" projmeta <- readRDS("projATAC_50subC_meta_584904.rds") finalSubCs <- sort(unique(projmet...
7553b742c1d89b5159985dafc807e169557f72504d6235ba723b3abf07dfbac9
R
10,712
191
library("here") library("sessioninfo") outdir <- "spatialLIBD_files" pkgname <- "spatialLIBD" meta <- data.frame( Title = c( "Human_Pilot_DLPFC_Visium_spatialLIBD_spot_level_SCE", "Human_Pilot_DLPFC_Visium_spatialLIBD_layer_level_SCE", "Human_Pilot_DLPFC_Visium_spatialLIBD_modeling_resul...
888815bf6d4e9e141c568b08ee79ef8bb731c50ec213a9b6a94343dda02909c7
R
10,723
264
#' banc-alignment-fill-super-class — Fill empty `super_class` from NTAC/alignment consensus. #' #' For BANC neurons where SeaTable `super_class` is blank, the alignment-implied #' and NTAC-implied super_classes agree, and the predicted super_class lies in #' a safe whitelist (optic_lobe_intrinsic / central_brain_intrin...
dc6b1d6efafbc5589884637e89df36ada0986c2450624bb809a113c5dd4dabf1
R
10,725
482
--- title: "Get correlation between PHC_MEM and DNAm_residual or PHC_pTau" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: pa...
ab3e8fbe292cd901b0b6c4d1843bdbb8ca9719b3f9f38be11241e6d039c900b4
R
10,743
281
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # startup code ################# ##### PATHS ###...
71b2c74ddd042ea258a4b9b9f580135b0ae22f252a2a620ee0f7db54e4e5e1d4
R
10,759
309
#Figure 2d and Supplementary Figure 3d # Load necessary libraries library(tidyverse) library(ggplot2) expr_data <- npc_counts_tpm #input tpm gene_row <- expr_data %>% filter(X == "ENSG00000204175") #input gene of interest # Create long format data for plotting plot_data <- data.frame( Expression = as.numeric(gene_...
4df668f002fc88dfb6034e840df90ddd7c167efa7559cbe993fb23e06bcd1a85
R
10,768
274
library(lightgbm) library(dplyr) library(stringr) library(ROCR) library(pROC) library(ggplot2) library(treeshap) library(shapviz) library(tidyverse) library(patchwork) library(segmented) PIDgroup <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\grouping\\PIDgroup.rds" %>% readRDS(.) trait3 <- ...
79fccf161c3aa24e5fae709090e5f2ea94a29ac8dcfa21c048de3bf251a9a754
R
10,769
316
############################################################## # Script: 05_visualization.R # Purpose: Generate heatmap ############################################################## # ======================== # Load libraries # ======================== library(tidyverse) library(ComplexHeatmap) librar...
cf31d92fe202a317cb081011b616dada34e7276c7754eea63d653245cd1752b7
R
10,772
303
# =============================================================== # 🧪 Pairwise Correlation — GGPairs Visualization Module # =============================================================== pairwise_correlation_visualize_ggpairs_ui <- function(id, base_size_value = NULL) { ns <- NS(id) base_size_value <- suppre...
e90e23ddf7512e90c99e114cfe8ab6220511aef26162a63e568671bbf65f6022
R
10,773
355
# =============================================================== # 🧪 Table Analyzer — PCA Module # =============================================================== pca_ui <- function(id) { ns <- NS(id) list( config = tagList( uiOutput(ns("vars_ui")), tags$details( tags$summary(strong("Adva...
5632717ecffb889b7e3da0fb5bc29e07c464ea9591ec9bff49c524217df7f8d1
R
10,807
232
#' @rdname SOSet #' @export #' setClass( "SOSet", # Spatial Omics Set representation = representation( NMFobjL = "list", # nmf objects/results, e.g., list(dataA = nmfObjResA, dataB = nmfObjResB) NMFrankL = "list", # select rank(s) to include in the correlation network, e....
6d3562771c775beb39b2240aba0ab43bfc01d7ab759b2a4448bb3cfd701d1e8b
R
10,810
273
#' banc-alignment-fill-cell-type — Fill empty cell_type from NTAC/alignment consensus. #' #' For BANC neurons where alignment and NTAC agree on a cell_type and #' (a) the existing cell_type is blank or `auto:*`, (b) the super_class is #' populated and matches the alignment-predicted super_class, and (c) the #' super_cl...
cde3ab041daa3410b0d12127081ffb7bb43c2ba4a3d7b4850e99d3095f088655
R
10,810
486
--- title: "Get correlation between PHC_MEM and DNAm_residual or PHC_pTau" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: pa...
56894ffab311bbfdb1608cbb3c1e7ecdd7cbdad5039f50d610f716fbc5c5c86f
R
10,818
486
--- title: "Get correlation between PHC_MEM and DNAm_residual or PHC_pTau" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: pa...
d9409173e7e9cd12313f1681b36390f5fae37ca5722e013b98501d9d4d3729eb
R
10,830
264
#Rscript /media/StorageOne/HTS/VirusMeta/SAM_BAM/virus_positivity_OR.R '/media/StorageOne/HTS/VirusMeta' '/media/StorageOne/HTS/Projects/2011_G5_96ALL-HiSeq' '/media/StorageOne/HTS/Projects/2011_G5_96ALL-HiSeq/PB/virus_final_index.csv' '/media/StorageOne/HTS/Projects/2011_G5_96ALL-HiSeq/case_control_id.txt' '/media/Sto...
9f577cec2790eb33a5235def717aee05bda844ed71e6401d0a7026a762fe461d
R
10,831
307
# Code for E-BLUP model adapted from Jarquin et al. 2014 and used in the following manuscript: # "Tailoring AI and ML Models for Genotype-by-Environment Prediction Leveraging Environmental Covariates: A European Rye Example" # Code written by: # Wera Eckhoff, University of Hohenheim, PhD student, wera.eckhoff@gmail.com...
c51c33d46ec59b50846d33e8cfa9e0b92d15a2222a9851824b1d2944fb981de0
R
10,847
240
#' Plot the tree representations of modules #' #' Plots the tree representations of one or more modules. #' #' The module trees are reconstructed based on pairwise preservation scores between replicates, both within and across species (see \code{\link{reconstructTrees}}). The tips of the resulting tree represent the re...
40af84be92d5841926b85acb7f0fb3a9918b3cd2ebc0ac49aa05faa218e19f49
R
10,854
203
--- title: "Building PANDA and LIONESS Regulatory Networks from GTEx Gene Expression Data in R" author: Deborah Weighill date: "2019-11-06" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Building PANDA and LIONESS Regulatory Networks from GTEx Gene Expression Data in R} %\VignetteEngine{knitr::rm...
7bd27bd3ee305072250e204b041a11779afd897c7b41da69a074d5ed47e73382
R
10,856
272
flywire_sirepo_url <- function(repo) { paste0("https://github.com/", repo) } flywire_sirepo_dir <- function(..., repo='flyconnectome/flywire_annotations', create_basedir=FALSE) { udd=fafbseg_userdir() if(create_basedir && !file.exists(udd)) dir.create(udd, showWarnings = FALSE,...
298547627ad2249c9c4b4be4979f2699df48f7513c9dcebda5c5dce5e16d73a3
R
10,862
309
#!/usr/bin/env Rscript suppressPackageStartupMessages({ if(!require(data.table)){ install.packages("data.table"); library(data.table) } if(!require(tidyverse)){ install.packages("tidyverse"); library(tidyverse) } if(!require(optparse)){ install.packages("optparse"); library(optparse) } }) #######################...
ae916c70c25bfda400384fb065ccd2f26c10b85f8c22d838de49fd59d2fb8af1
R
10,866
247
################################ ### Make BANC NT predictions ### ################################ source("banc/banc-startup.R") poss.nts <- c("acetylcholine","gaba","glutamate","dopamine","histamine","octopamine","serotonin","tyramine") bancsynapses.nts <- "/n/data3_vast/hms/neurobio/htem2/users/kd193/banc_neurotransm...
8317e9aeb01f2524bcdf4fd95f1b2cfe2d1e5e3b33d377e7b02132b2e1a8fb80
R
10,878
165
# ============================================================================= # Figure 6 — Output Log Generator # ============================================================================= # Run this AFTER executing fig6_models6and7_behavior.R (sections 1–6). # It captures all model summaries, emtrends, and Holm-c...
e164221a2af4153f4f3e526b0b426c0c4992511b57372624bfdfb69d62a760b1
R
10,880
288
--- title: "Spatial Correlation Statistical Analyses" output: html_document --- ```{r, echo=TRUE} knitr::opts_chunk$set(echo = TRUE) library(lmerTest) library(dplyr) library(readr) library(emmeans) library(multcomp) library(tidyr) ``` ```{r} extract_stats <- function(m, coef_names) { model.df = data.frame(coef_name...
b23cc928de4f0940abef5e36cecbd585f7a8acabc93141d85b6d73f9103d2f36
R
10,885
314
#!/usr/bin/env Rscript # ============================================================================ # ## 06_mgngtus_power.R ## MGNGTUS Nomiki's data: compute post-hoc sensitivity/power. ## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025. rm(list = ls()) # ============================...
fa2f2262a1ac3023b3c473a99ea9dcb8a6911df2894456e2acf8a6637fbd6964
R
10,917
328
#' Differential expression analysis between two groups of cells using limma #' #' Performs differential expression analysis between two groups of cells #' using the `limma` linear modeling framework. #' Supports optional observation-level weights (e.g., spatial weights) #' and filters genes by minimum expression thresh...
9d5b3315e0b4bdf98c6e7667c1153c50475348b6b11dd38bb87989ec9d7f5814
R
10,931
272
--- title: "Sptial Omics Toolkit" author: Heewon Seo date: "`r format(Sys.Date(), '%m/%d/%Y')`" abstract: > The Spatial Omics Toolkit (SOTK) is an R package containing a comprehensive set of functions to identify biological modules from spatial transcriptomics profiles. Multiple profiles across different cohorts or p...
f990c477573c33b51d375a61e52a75c10717e61e5b2bf89197751ba9e4a10aff
R
10,932
286
#' banc-sjcabs — Export per-neuron SWCs, region cut-outs, neuropil meshes for collaborator share. #' #' @section Reads: #' - `banc_<ver>_meta.feather`, `banc_<ver>_synapses_enriched.parquet`, #' `banc_<ver>_simple_edgelist.feather`, `banc_<ver>_edgelist_split.feather` #' #' @section Writes (under versioned save p...
b6763569cbc0066468592dc7b12c2f04ff34348615358a8b868a397c216d7c44
R
10,935
328
#' Differential expression analysis between two groups of cells using limma #' #' Performs differential expression analysis between two groups of cells #' using the `limma` linear modeling framework. #' Supports optional observation-level weights (e.g., spatial weights) #' and filters genes by minimum expression thresh...
10f5ae1753d4b97d57f2b3c0e5ff5a307d190d41f1b64f535fee6dee720b13aa
R
10,949
297
#!/usr/bin/Rscript #' Combine Association Results and Calculate Genome-Wide FDR #' #' This script combines association results across all chromosomes and parts, #' then calculates genome-wide False Discovery Rate (FDR). #' #' CRITICAL: FDR must be calculated on ALL tests genome-wide to be valid. #' Per-chromosome or...
4955340ed6b37a7b2f73b2c9f2add91e5461f1dff9c9156375293574c16cc0e8
R
10,967
225
# ---------------------------------------------------------------- # The following script loads and processes data from: # # Erawijantari et al. Influence of gastrectomy for gastric cancer # treatment on faecal microbiome and metabolome profiles. # Gut. 2020 Aug;69(8):1404-1415. doi: 10.1136/gutjnl-2019-319188. #...
f3beb7f236e573ff3ae6708959ca83815ac8ccc319412beec5b4eb749bf38a0c
R
10,972
313
#################################################################### # Tile Matrix Methods #################################################################### #' Add TileMatrix to ArrowFiles or an ArchRProject #' #' This function, for each sample, will independently compute counts for each tile #' #' @param input An...
ec548baf148f5cde04e9eb312dbe2c946132ff21f4a1517c6de882a3b13ea4ae
R
10,977
293
#' Get predicted dense core vesicle locations in the flywire dataset #' #' @description Preliminary dense core vesicle (DCV) detection results from the Lee group, Stephan Gerhard and Minsu Kim. #' #' @importFrom httr POST #' @inheritParams flywire_fetch #' #' @param rootid flywire rootid/rootids #' @param dataset whic...
d4f1e878527a0d268f3640f123f18bca2b70c231fae17133e8253ceea42831f2
R
10,983
245
# fake root ids at layer 10 fake_rootids <- function(n) as.character(bit64::as.integer64("720575940600000000") + seq_len(n)) # fake fetcher returning two leaves per id, except the last id which has none fake_fetcher <- function(env, empty=NULL) { function(ids) { env$calls[[length(env$calls) + 1]] <- ids sapp...
ab8eee662106796fb083ada69120d3230919fbfa8139addb0ac37c2becd20ab4
R
10,995
228
library(dplyr) library(R.matlab) library(ggsegGlasser) library(ggsegSchaefer) library(ggseg) library(ggplot2) library(ggseg3d) library(cifti) library(stringr) library(factoextra) library(matrixStats) library(scales) library(Hmisc) library(tidyr) library(cocor) library(mgcv) library(gratia) library(tidyverse) library(nu...
8c4cde45e3cbafdfa9500c9327eb61d1d3798001d245436d07b0f6da81b470cb
R
11,003
466
--- title: "Run meta analysis comparing Rosmap and BDR coMethDMR results" 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: t...
0442a838f87f85667e5b79ae4a45388dc118a397cea98c17e8be4d284389bea2
R
11,005
280
#' banc-alignment-validate — Validate optic-lobe alignment results. #' #' Read-only validation: (1) holdout accuracy on intrinsic neurons with known #' types, (2) neurotransmitter consistency vs FAFB type consensus, (3) #' mismatch detection vs existing SeaTable annotations. Does not push to #' SeaTable. #' #' @section...
45d92eee3a4e6546fb04d3a603a6611c27a04dd94dc0e22809117c8c94520a53
R
11,032
335
# ============================================================================== # Script 03 (Fig 1C): SET Signature Analysis # ============================================================================== # Description: Calculates SET scores and generates visualization heatmaps # showing ER-positive and ...
6a2d5fa8c202e41284bf65e01dd443e6c37873811593ed87301ddebeb592daad
R
11,045
298
##################################################################### # Genotype Data Processing Pipeline - Optimized for cis-eQTL analysis # Brain Region Specific Version ##################################################################### # This script loads and processes genotype data from PLINK format, # conv...
d51016635b21027200cb6e1fed65cab56619c9a312985a16cc63c9e778c3bd24
R
11,067
359
# =============================================================== # 🧪 Table Analyzer — Pairwise Correlation Module # =============================================================== ggpairs_ui <- function(id) { ns <- NS(id) list( config = tagList( uiOutput(ns("vars_ui")), tags$details( tag...
64745669361f81a69dbe23f502233dce5545767822ac8aefafc05634bd531a4e
R
11,078
447
--- title: "Run Bacon Correction" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: paged code_download: false toc_floa...
21e433a3c34fdcce153fce6a094feb418abb475453658334b3421d2a57c1d092
R
11,087
358
--- 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...
07f6c8a33200c7980da5002e23d5054e3575f397168260d2cf7abc1caeb8b124
R
11,088
276
#' banc-calculate-root-positions — Compute root / soma position per BANC neuron. #' #' Prefers nucleus position if available; otherwise picks the furthest L2 #' skeleton leaf outside neuropil + neck connective. Incremental. #' #' @section Reads: #' - SeaTable `banc_meta`, L2 SWCs #' #' @section Writes: #' - `banc_r...
38fbd553a4d2344141f3d15697fd939af3f4f76f9207b014c5403eddad291edc
R
11,090
258
#### Standard LBA ---- # # Moved to C+_ in model_LBA.cpp # # pnormP <- function (x, mean = 0, sd = 1, lower.tail = TRUE) # ifelse(abs(x) < 7, pnorm(x, mean = mean, sd = sd, lower.tail = lower.tail), # ifelse(x < 0, 0, 1)) # # dnormP <- function (x, mean = 0, sd = 1) # ifelse(abs(x) < 7, dnorm(x...
9685ab7a7bece2f95c40a54eb187a9dc88228c7e9124efc4d86547be9f0efb36
R
11,090
447
--- title: "Run Bacon Correction" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: paged code_download: false toc_floa...
2ebda32edc8aea6504caea073917ba450530f60673721f4fdfa07bff82d9f083
R
11,092
447
--- title: "Run Bacon Correction" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: paged code_download: false toc_floa...
f3cc980d5142afbcd4a21a6374aacf0f6d2cd23b394c0c01be16dc1163da9091
R
11,114
162
library(neuprintr) library(malevnc) #library(gplots) #library(viridis) library(ggplot2) library(dendsort) library(nat) #change path to this file as necessary source(file.path(getwd(), "get_partners_by_multistep_conn_fun.R")) simple_row_hierarchical_clustering <- function(mat, Rowv = NULL) { d=dist(mat,method="eucli...
eb0e5127c4a5c82db54e52a8c7183524f69d89c097071d81069de76e4ad54b92
R
11,116
232
# ============================================================================ # MASTER SCRIPT: Generate All Main Figures for ISRGDF15 Paper # ============================================================================ # # This script orchestrates the full pipeline to reproduce all main figures: # Step 1: Process ra...
e469f049d19d0e3a9642847704879d02cddb986984026a72437c1d4510ff6375
R
11,119
650
# Reproducible workflow for spatial autocorrelation, #Global Moran's I, and LISA cluster analysis # -------------------------------------------------- # 1. Required Packages # -------------------------------------------------- packages <- c( "sf", "dplyr", "spdep", "tmap", "readr", "tibble" ...
596767eafe3ce884b2ec3b1c0423c0dc1ebcb13e780a249f9bff495da2ae4409
R
11,122
310
### to check each terms which category they fit well # Define list of data names to process data_names <- c( # '02.' prefix - intersection and unique between M_KAI_IH and R_PPS 'intersection_M_KAI_IH_IPSI_R_PPS_A_up', 'unique_M_KAI_IH_IPSI_A_up', 'unique_R_PPS_A_up', 'intersection_M_KAI_IH_IPSI_R_PPS_A_down'...
74efc1212efed5a529424b63394ec57902a47d2fcb32548bf092fa632732b4f6
R
11,142
216
# Supplementary plots TAU per region library(readr) library(tidyverse) library(ggplot2) library(reshape2) library(ggrain) library(rempsyc) # Set the plot theme settheme = theme(strip.text.x = element_text(size = 10, face = "bold"), strip.text.y = element_text(size = 10, face = "bold")) + theme(axis.text.x = elemen...
aeec10c0684a1ffe46605be628284f765c541131c53dd8a328f70866d1ef6867
R
11,143
320
library(ggplot2) library(tidyr) library(dplyr) library(stringr) library(readxl) library(reshape2) library(tidyverse) setwd("") ############################ ####### ALFF ############## # Upload data data_results_ALFF <- read.csv("ALFF_results_noOUT.csv") data_subjects_ALFF <- read.csv("dataALFF_long_noOutliers.csv") ...
28a55e97f8e83a829b56d67bb3e76a6926f9079e8b444afe494792ad5344a6c7
R
11,161
344
# =============================================================== # ?? Regression shared modeling utilities # =============================================================== reg_fit_model <- function(dep, rhs, data, engine = c("lm","lmm")) { engine <- match.arg(engine) form <- as.formula(reg_formula_text(dep, rhs)...
2a51fac75dc0046262422cf1d1bbd1f280c484f4be40daa94642c0f9a7935492
R
11,175
218
############################## ### Run ArchR peak calling analysis on CAREmut multiome ATAC data longitudinal analysis of TME cell type ### Author: Kevin Johnson ############################## ## Longitudinal per-patient analysis of differential chromatin accessibility per cell type # Specify directories workdir <- "...
8886f768998c7f82c300d3d5e5dc01252344b7d1ce90e9e379bc2af2a2b17d3f
R
11,181
296
# ============================================ # Script: Nodomap_cellchat_analysis.R # Purpose: Run cellchat analysis on combined nodomap and mouse hindbrain dataset to identify possible communication between nodose ganglion neurons and hindbrain neurons. # Inputs: - mouse-hindbrain-fedfast-2023.RDS (mouse hindbrain ...
c08f2b6c304487f1846a36ae05caf4e74c4eeafcc1d16afc97eced19f567963a
R
11,186
230
library(ggExtra) library(ggplot2) library(tidyr) library(MetaNeighbor) library(conflicted) library(magrittr) library(reshape2) library(dplyr) library(here) library(readr) library(tmod) conflict_prefer("count", "dplyr") conflict_prefer("select", "dplyr") conflict_prefer("filter", "dplyr") Sys.setenv("VROOM_CONNECTION_S...
483507cad7df4d362f09ebc15e505d412b13bb79b0244df0924e8455f4c04035
R
11,211
391
######################################################### # R coloc baseline: ######################################################### # Creating the R coloc baseline output we need to compare # our python implementation against ######################################################### # loading data library(coloc) l...