sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
0478da579973eddbd9ff5574bfa839c7a5b1f8983c88569017ca9f31849409c1
R
4,160
124
#!/usr/bin/env Rscript # -*-coding: utf-8 -*- #----------------------------------------------- # Title: scRNA of the naive human DRG from Renthal lab # Author: Amanda Zacharias # Date: 2025-07-22 # Email: 16amz1@queensu.ca # Notes ----------------------------------------------- # module load StdEnv/2023 r/4.5.0 # Opti...
b2f9b17c763aa4eafa9ff79039a83c18fa4fecd3d3cd6f5453452a6093a33d21
R
4,161
135
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
d1a32a4cffadf49864e28da36ca8f753eb7a9822aa6395076fd307de899274b9
R
4,165
117
#' banc-dcv-density — Push per-neuron soma DCV count + density to SeaTable. #' #' Reads the per-neuron DCV-in-soma parquet from GCS, joins to SeaTable on #' `nucleus_id`, and pushes `soma_dcv_count` (3D detection count) and #' `soma_dcv_density` (dcv_voxels / soma_voxels). No `root_id` needed. #' #' @section Reads: #' ...
2b5ec5c9cecbe824244424b98c77acb3bcd2445ef1fe689beb148734dfa258fa
R
4,166
114
######################################################################################## ### Metabolomics Heatmap Generation ######################################################################################## # Clean workspace rm(list=ls()) # Define required packages required_packages <- c("pheatmap","dendexten...
c9df7e565a919c9d614641af16c1c9b97c40cc8b7d54b04575a0fab90b969668
R
4,169
106
## Did you miss the previous step? The one about setting up Git and GitHub rstudioapi::navigateToFile(usethis::proj_path("dev", "02_git_github_setup.R")) ## *********************************************************** ## Setup the core files for your Bioconductor-friendly package ## ************************************...
292cd8f4353dc0aaae81f26427a068853145bbda73ab00b8ef2a9ee6a69b99ae
R
4,175
144
tax_glom_fast2 <- function(ps, rank=NULL, rank_level=NULL, ignore_lineage=T, ignore_lineage_below_rank=T) { require(data.table) ranks <- rank_names(ps) if (is.null(rank) && is.null(rank_level)) { stop("Either 'rank' or 'rank_level' must be provided."...
6ea965f3f46fef08e024e5aef30cc302fc148497d0a54f2e1d77ad103e1aa505
R
4,184
107
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...
75a4d6a540fdc2d89e18643e50038fc0105077c4f711f260d5b3b321ab436df3
R
4,184
114
library(DESeq2) library(ggplot2) library(pasilla) ### Choose one matrix to analyze ### ### raw data dds_data <- adjusted_df_M_KAI_IA_IPSI_A_AC dds_coldata <- coldata_df_M_KAI_IA_IPSI_A_AC Target_comparison <- 'M_KAI_IA_IPSI_A_AC' contrast_vector <- c("Treatment_Lateral","KAI_AMG_IPSI","CTL_SAL_AMG_IPSI") dds_data <-...
0a4121f422951fcd21f95884e25abffad7b1f1e5ba3051a16cd6ea44889527eb
R
4,185
131
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Make DRG dataframe cleaner helper # Author: Christina Meier # Date: 2025-05-22 # Email: 19cm51@queensu.ca #------------------------------------------------- # Notes ------------------------------------------ # module load StdEnv/2023 r/4...
f6cd39d2c11ab6917f5e0c75f793496430dc2d0f0cb431adb727fcd07180dd93
R
4,206
187
--- title: "Evaluate gene sets by cell type-specific gene expression" author: "Wei Sun" date: "`r Sys.Date()`" output: html_document: theme: journal highlight: tango toc: true toc_depth: 3 toc_float: collapsed: true smooth_scroll: false number_sections: false df_print: paged par...
ec6616cace96149bc4e92d33b78e4e1176e4642ac39a6b728b587aed2bdcb93b
R
4,209
136
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### # Parameter settings ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### setwd(file.path(getwd(), "R")) source("00_directorySettings.R") # load baseDir <- "/WORKING_DIR" outDir <- file.path(baseDir, "results", "GeneLists") ##### ##### ##### ##### ###...
848b490f15c85e2847d3262168d7d1fa59ef39c0d72d202bd6e9027c19291cd7
R
4,210
108
library(Seurat) library(SeuratData) library(ggplot2) library(patchwork) library(dplyr) library(data.table) slide_seq = readRDS("C:/Users/Haoting/Downloads/seurat.rds") orig_count = slide_seq@assays$RNA@counts ## read location file locations <- read.csv("C:/Users/Haoting/Downloads/MatchedBeadLocation.csv") ...
9b24309087b4f8fd9833b908d4d7b02960942747e4bcf21f5dd8f557045ac9c3
R
4,214
125
# Figure 1D: PCA Biplot of Fibroblast Lifespan Data # Shows 339 samples colored by treatment condition library(here) library(ggplot2) library(dplyr) library(tidyr) # Source the data processing script to get the datasets # NOTE: Must source BEFORE defining out_dir because Intro1 cleans up the environment source(here("...
caa24ff6369c7a12ba9ce15871a894ac85899401381e1375e6bb810826d0e1cd
R
4,214
134
library(survival) library(knitr) library(kableExtra) library(tidyverse) ####### LOAD DATA ######## #mydata <- readRDS("/Volumes/TOSHIBA/work_mac/Documents/collab_yr2/Hamed_SNO_0524/july24/matched_data.rds") #1vs4 matching mydata <- readRDS("/Volumes/TOSHIBA/work_mac/Documents/collab_yr2/Hamed_SNO_0524/nature_comm/clea...
f13bf36a5d7037241071f08559d7555ea5cf5a87c952acd4ecac0e1c61447582
R
4,217
122
#### Section: Boxplot Construction #### plot_anova_boxplot <- function(data, info, layout_values = list(), line_colors = NULL, base_size = 14, share_y_axis = FALSE,...
d302a3757a4e65964eed8ca3cab8aa22c0cfd6bc3034e169860cabe80ea88dc6
R
4,228
128
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
9250430726a34fa185c591ac7f79c637b5548c46255796e43418e6fa1c89976e
R
4,229
123
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Write pass 2 scripts for stringtie # Author: Amanda Zacharias # Date: 2023-06-30 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.0...
1fe1759ca6728f2ba82b2437571cb7e84fad7ae7785a3777fbe5d99ae4314d04
R
4,239
117
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### # Parameter settings ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### setwd(file.path(getwd(), "R")) source("00_directorySettings.R") # load baseDir <- "/WORKING_DIR" source("00_settings.R") dataDir <- file.path(baseDir, "data") nmfDir <- file.path...
4798e68426d1be1b0b651b74e8ff4cb4cb26347b178e2c998976e23fc919974a
R
4,243
102
# Purpose: Average CP within frequency bands × time epochs, plot Pre vs Post with error bars. # Notes: Expects CP matrices shaped [time x frequency]. suppressPackageStartupMessages({ library(ggplot2) library(dplyr) library(tidyr) library(readr) }) ## ---- PATHS (EDIT HERE) ---- freq_path <- "D:/N...
dd81219b93cd4761b5a30ec0a4e2e0b0e684e806560775f6ee4385cbcb49413a
R
4,249
116
#' Creates a heatmap visualizing gene expression correlations #' #' Generates a heatmap representing Pearson correlation coefficients between #' query and database expression profiles. Includes optional faceting and annotation. #' #' @param ann An object containing correlation data (`ann@results$marker_free$corr`). #' ...
2d826874686cb7310bec170ea3f858a1b2de0775e738c0815318b6c2d644a749
R
4,251
107
library(ggrepel) library(ggplot2) PCA_function <- function(data, groups, useLabels = FALSE, labels = "", pcs = c(1,2), type = 'scores', scale = TRUE, legendName = "Cog task", absolute_loadings = FALSE) { data[is.na(data)] <- 0 # Vector to calculate colors based on the number of groups colores <- rainbow(lengt...
a27d416ab6a6b9bb590c24c028ada2714ae8a558a2d19d5e3d95a4555a4d9144
R
4,254
114
setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggpubr) library(ggrepel) library(ggbreak) source("./Scripts/Function_scripts/Pre-processing_functions.R") load("./Output_Data/Invitro_lpd.mol.pct.Rdata") load("./Output_Data/GPMV_lpd.mol.pct.Rdata") load("./Output_Data/Lipids.GPMV.Inv...
a6725e913e52967768e2d1c42fddcd7d78ca9a63e9014f07341648933b50ea8a
R
4,255
82
install.packages("easypackages") library("easypackages") libraries("readxl", "tidyr", "dplyr", "ggplot2") Supplementary_Data_S5_feedback <- read_excel("Supplementary Data S5.xlsx", sheet = "Partial motif count") %>% filter(grepl("D", Motif)) Supplementary_Data_S5_feedfo...
6658d1c1e1d371ccfa0c52204e73ab0753d5d311e7e03997c49a09ef79db3ffa
R
4,260
99
XGBoostHyperparameters <- R6::R6Class( "optimize_xgboost_hyperparameters", list( plink_location = NULL, cv_folds = NULL, XGBmatrix = NULL, early_stopping_rounds = NULL, eval_metric = NULL, booster = NULL, objective = NULL, design_steps = NULL, opt_steps = ...
a8478578b158d1841de404c8f5394d6572bfba05cfe882016330d1c480995f67
R
4,261
89
## ----setup, include=FALSE---------------------------------------------------------------------------------------- #knitr::opts_chunk$set(echo = TRUE) # setwd("/Users/warri/OneDrive/Documents/Denver/Research/Data/ashad_n110") #sessionInfo() # RDAC R packages location '/home/rcorcoran/R/x86_64-pc-linux-gnu-libr...
a2f0e94b9399de693af7e5202d184ebb3d2d42a070f42646c72eb53ade786335
R
4,263
95
#' banc-hemibrain-mesh-transform — Transform hemibrain meshes into BANC space. #' #' For each hemibrain bodyid, fetches the OBJ mesh and applies the #' JRCFIB2018F → JRC2018F → BANC registration chain. Saves the #' transformed OBJ. #' #' @section Reads: #' - `<banc.meta.save.path>/hemibrain_meta.csv` #' - hemibrain...
b4e044a28d8bd9f186e174f31ed30baa47435eccede68a882655d7298934a1f2
R
4,266
106
# conda activate R411 # Activate the environment # conda activate R411 # Load necessary libraries pacman::p_load(data.table, stringr, dplyr, readxl, feather, biomaRt, tidyverse, openxlsx, ggplot2, VennDiagram, janitor, gridExtra) library(GenomicRanges) library(Biostrings) library(BSgenome) library(BSgenome....
f7260eb72e52341db3a1b03be18fa8dbdd16d33774ebebd9255ac52d767246a4
R
4,270
91
#' Turn PANDA network into a CONDOR object #' #' \strong{CONDOR} (COmplex Network Description Of Regulators) implements methods for clustering biapartite networks #' and estimatiing the contribution of each node to its community's modularity, #' (Platig et al. (2016), \doi{10.1371/journal.pcbi.1005033}) #' This functi...
28365e0c1008b3dee7dd3043d6f908d2db2d2aaac1bc1d5012692cf15919b8f0
R
4,274
124
library(VariantAnnotation) #setwd("/fastscratch/verhaak-lab/GLASS-WG") ## Parse snakemake f1f = snakemake@input[["freebayes1"]] # "results/mutect2/freebayes/batch1/GLSS-MD-LP10-R1-01D-WGS-CYN7CI.normalized.sorted.vcf.gz" # f2f = snakemake@input[["freebayes2"]] # "results/mutect2/freebayes/batch2/GLSS-MD-LP10-R1-01D-W...
66e79237f5b5bb0772f2d6da9818c9e806a86fd350c77c297e9798ded119e257
R
4,277
107
################################## # Report quality metrics for snRNA that ended up in the final analyses # Author: Kevin Johnson ################################## library(tidyverse) library(EnvStats) library(cowplot) library(ggpubr) proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut/" fig_dir <- file.pa...
9d8643ac107fdb28c2a3885707060ade3d7008f882d9607ae6daeb5d71d4a7d7
R
4,278
114
# ============================================================================ # Figure 1G: Hedges' g Effect Sizes — Each Condition vs Control_No_Tx # ============================================================================ # Computes Hedges' g (bias-corrected Cohen's d) for each experimental # condition compared t...
91b41e25c026f782a9ac547444a7785ca6ab251a01ad097a69f705c8b29d01f9
R
4,291
124
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
f5bf0796ad1f3372de5bc311db8edb8eaa440479a8d46e4a9f3b5250f94bfab6
R
4,294
126
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
369246a4ee2864582b8d19347b2968f2d698a55c46da0fd05dce60a43ad5527e
R
4,296
102
#' This function finds the most upstream overlapping feature (usually CDS) from a genome annotation (feature.df) for #' each exon and subsequently each transcript. The default is fully overlapping features, but #' the 'type', 'maxgap' and 'minoverlap' arguments can be used to change that. #' #' @export #' #' require...
df20973ca9b640c71335596208c569eb1dc92338cb234d89aee74003519261c4
R
4,300
118
library("tximport") library("AnnotationHub") library("ensembldb") library( "biomaRt" ) library("dplyr") dir <- "/input_path" outdir <- "/output_path" #example change sample name as needed fam1_111 <- list.files(path = dir, pattern= "fam1iPSC_111", full.names = FALSE) fam1_156 ...
9ebfe33a5e2a623c94f0f8297283279f848599a93c6a429b1064f1aa5c07da79
R
4,302
97
#' @docType methods #' @rdname mr_lasso #' setMethod(mr_lasso, "MRInput", function(object, distribution = "normal", alpha = 0.05, lambda = numeric(0)){ Bx = abs(object@betaX) By = object@betaY*sign(object@betaX) ...
709ae601d718ceea679f5303025ea43677c4a51882ea35b972a6c454cee3b07b
R
4,305
138
library(dplyr) library(tibble) # Function to perform hypergeometric test perform_hypergeometric_test <- function(male_deg_list, female_deg_list, male_combined, female_combined, cluster_name) { # Get the total number of genes tested f...
76fdb89ec12e6045a9ed6d48acbb98a1ae318c0d5b26396274cbac73c28c7504
R
4,306
115
# Phase 1: 使用TCMNP包批量获取8味活血止血双效药材的活性成分和靶点 # herb_target() 接受中文名,筛选OB>=30, DL>=0.18 library(TCMNP) data_dir <- "c:/Users/huizh/Desktop/拟发表论文/活血止血/data" results_dir <- "c:/Users/huizh/Desktop/拟发表论文/活血止血/results" # 8味药材 herbs_cn <- c("三七", "蒲黄", "茜草", "五灵脂", "花蕊石", "降香", "血竭", "儿茶") cat("==============================...
125bb23b1396dbd7e08756e3e31f8c5e981b4e2461405ed3c1d8dc9d6023436b
R
4,315
114
#' Query FANC tables in the CAVE annotation system #' #' @param ... Additional arguments passed to #' \code{\link[fafbseg]{flywire_cave_query}} #' @inheritParams fanc_partner_summary #' @inheritParams fafbseg::flywire_cave_query #' #' @return A data.frame #' #' @family fanc-cave #' @export #' @seealso \code{\link[faf...
b84307e402fabff8ec018030968836abab7737f9ebde89cf770464c2b1e015a2
R
4,315
90
here::i_am("scripts/2.validations/2.1.regulator_interactions_and_module_overlaps/2.1.3.test_association.R") library(tidyverse) library(here) library(igraph) library(ggraph) wd <- here("data/validations/regulator_interactions_and_module_overlaps/") dir.create(paste0(wd, "figures/")) ## Module overlaps for interactin...
1c96b1d5519771608f8a5a95cc31ba448a1a75ce0988eaf4e7fea61bff846c55
R
4,319
131
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Make heatmap gene counts across samples # Author: Amanda Zacharias # Date: 2023-07-13 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs...
a32519f64d4db161499d55f5bf4f07e89ffa36176b912c017408c8fb5d3d5cfe
R
4,320
134
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
e57a25997564279e6a9f3394c84cc273a9d4d8e6db3b398a0b46d7420603bc41
R
4,322
108
library(ggplot2) rm(list=ls()) options(digits = 10) # by default, print results to ten decimal digits set.seed(1823) #for replication - the year Trinity College was founded! #replace the empty quotes with the file path to the location where you downloaded the files from Zenodo below path = "" chance = rep((1/6), ti...
a31aac9f99b612d91e4a599e3a09fbbd56be122e4c1ae6adc42b1f53bee158a8
R
4,326
115
#' Spatial registration: compute ANOVA statistics #' #' This function computes the gene ANOVA F-statistics (at least one group is #' different from the rest). These F-statistics can be used for spatial #' registration with `layer_stat_cor()` and related functions. Although, they #' are more typically used for identifyi...
09b275b016728bc0d11061ac07433a9fcf7ef03e4aacdb3d6024f2dba97d1e25
R
4,330
108
#--Permutation test for "whether A disease peak set overrepresent/downrepresent methylated peaks (over - LOH; down - GOH)" args <- commandArgs() group <- args[6] print(group) library(dplyr) library(ArchR) library("stringr") library(ggplot2) library(ggpubr) library(reshape2) library(ggsignif) outp <- "sn_mC" peakMC <...
1e34ba1aa38d6b6f8136b0fe081cacdc96f358e948ead46067cd78767289304e
R
4,330
118
setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(stringi) library(ggpubr) library(patchwork) source("./Scripts/Function_scripts/Effect_size_functions.R") source("./Scripts/Function_scripts/Pre-processing_functions.R") ## ====In vitro==== load("./Output_data/Invitro_conc.lipid.qNSC.Rda...
484231df1105e16f399428bd73b1c97e51f1e73686568289cb6bfb31fb59af84
R
4,331
109
# --- 1. Check and Install Required Packages --- # This block ensures that all necessary packages are installed before running the script. cat("Checking for required packages...\n") required_packages <- c("vroom", "readxl", "tidyr", "openxlsx","edgeR") new_packages <- required_packages[!required_packages %in% installed...
9b2b2611a11e8cc7db48ef4c30df16d1cc89a97735b4793d61dced96cc9f8f19
R
4,331
114
# -------------- Function for parsing xml HMDB object -------------- # The "store" slot within any hmdb object is not very convenient, # it's an xml converted to a list. Here I turn it into a readable # string, which can be later explored with simple regular expressions. hmdb.store.to.string <- function(root) { if...
ea064dddde381a61ca198d020324998b099898c26ec8ac10ea4e5667f5b404bc
R
4,332
127
```{r} library(dplyr) library(tidyr) library(purrr) library(lme4) library(broom.mixed) # Baseline group comparisons (2×2 repeated-measures ANOVA analog via LMM) # Outcome: SCFA concentration (per acid) # Fixed effects: group (HC vs SAD), time (BL1 vs BL2), and their interaction # Random effects: random intercept for ...
d32e08dc7bc4ae6bffcf01661b08504e7a2e72783eb56b8243a6a707e7d0f88c
R
4,334
126
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
d5a26d45897163712b03a4e16df88e2b820a9cb5dbd21e5332a2c8856d809daf
R
4,334
95
## Side chain analysis across 2 in vitro studies ## Remove LPC-O and LPE-O with 1 or 2 double bonds, as well as LPC-P and LPE-P with 0 or 1 double bond due to annotation ambiguity. setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggpubr) source("./Scripts/Function_scripts/Effect_size_f...
e42a94f46041bbe1db1fc5c1f35161222f785559d96cb1fa7842d40b35b9c193
R
4,335
128
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Find neurons connected to DNg27 - to find coraz...
5c382312816d32521f1eef122bcbae1b02baa17cd9fb88bec3ed3f34e38a632d
R
4,338
114
--- title: "Seurat_neural_clusters" output: html_document date: "2025-07-09" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(ggplot2) library(dplyr) library(Seurat) library(scCustomize) ``` Load dataset ```{r} neural <- LoadSeuratRds(file = "neural_final.rds") ``` Looking at ba...
44a0194ddfa118004c89242ef1e74e3a78917f5ed666edaff59bfeacd155958d
R
4,340
135
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
18024f7f0b2e489fe97a80c84dd4c2aa563ccf614f6b109710bb1fd02eef5557
R
4,344
127
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
ee1d36157778cd22cd66ca188d934607adb185335d1bf2fdcf529f9110b741ee
R
4,349
87
#!/usr/bin/env Rscript # Copyright 2023-2023 Chun-Hui Gao <gaospecial@gmail.com> # # This file is free software: you may copy, redistribute and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 2 of the License, or (at your # option) any ...
01b695fba2ccffcd63fc70ea76f76d049cff245194f89955e5d13d8505b55ad1
R
4,351
131
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Write individual bash scripts # Author: Amanda Zacharias & Christina Meier # Date: 2023-08-11 & 2025-08-11 # Email: 19cm51@queensu.ca #------------------------------------------------- # Notes ------------------------------------------ #...
48d495bf81a50811a564f975e1228c18a7e427448916b784edf7ff4f3f45ba90
R
4,353
124
--- title: "Fig_S4E_tumor_cell_type_composition" output: html_document date: "2026-02-17" --- ```{r} library(Seurat) library(tidyr) library(ggplot2) library(ggpubr) library(dplyr) library(harmony) library(purrr) library(cowplot) library(rstatix) library(ggbeeswarm) library(ggbreak) ``` # Set up and adjust metadata ...
c0ec0b000a581bc3d1152cd25d1542f110adcef13dafb99b0d8683618e0551e3
R
4,356
106
### Validation on young PM lipid supplementation by lipidomics setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggthemes) library(ggpubr) source("./Scripts/Function_scripts/Effect_size_functions.R") source("./Scripts/Function_scripts/Pre-processing_functions.R") ##==== Effect size betw...
fa283e5557232a3e126e91fb8ca438c6010d18efc73ecdda358d22b95ad6f321
R
4,356
154
# set up library(reshape2) library(dplyr) library(ggplot2) library(pheatmap) library(tibble) library(gridExtra) #### Helper functions - dataframe handling #### # Normalization function used in ChromHMM normalize_column <- function(y) { (y - min(y)) / (max(y) - min(y)) } # Filter and sort a df by columns filter_sor...
01df02a435e4b3fbd9e4f08631399784936a3bb6b5329ff8b89e3e5d23f3cc84
R
4,367
131
#' Compute Spatial Enrichment Index (SEI) for Each Gene #' #' Calculates the spatial enrichment index (SEI) for each gene based on #' a user-supplied set of spatial weights. The SEI reflects the extent to #' which gene expression is enriched in spatially weighted regions of #' the tissue (e.g., near boundaries or centr...
541322ba09af011de0eac9af019cbb8f0b58e111ff3f186f1218ecfd3f4fad67
R
4,372
90
####################################################### # Determination of samples that were mismatch per GATK fingerprinting tool # Date: 2018.12.05 # Author: Kevin J. ####################################################### # Current location of files: workingdir = 'Volumes/verhaak-lab/GLASS-analysis/results/fingerpr...
016dd9cd298f8910daaafe73f30fe0160a98cdc207cb0cd4878eb2bc41b02c4d
R
4,374
91
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 RjnmfC <- function(Xs, Xu, k, alpha, lambda, epsilon, maxiter, verbose) { .Call('_conos_RjnmfC', PACKAGE = 'conos', Xs, Xu, k, alpha, lambda, epsilon, maxiter, verbose) } adjustedRandcpp <...
e81659d16cceccb3ae80af388acc0af04bce03f0bcc72126e24576bbc762e0ea
R
4,380
152
library(Seurat) library(ggplot2) library(scCustomize) library(patchwork) library(RColorBrewer) library(viridis) library(dplyr) library(stringr) #load spatial seurat object data <- readRDS("nodose_st_RCTD_251025_metadata_updated.RDS") DefaultAssay(data) <- "RNA" View(data@meta.data) ##Reorder levels by cell types cell...
f342379ddb42f864fc529d6fc92e37149e58d29993f1f12128e1301763a0043e
R
4,380
128
#' Runs the neighbor voting algorithm. #' #' The function performs cell type identity prediction based on 'guilt by #' association' using cross validation. Performance is evaluated by calculating #' the AUROC for each cell type. #' #' @param exp_labels A vector that indicates the dataset source of #' each sample...
f486d9ce6fb0ce5d3a8fdeeb52403b59e0f3f839f162524ba489f78157f60e31
R
4,380
132
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
2a84d1b33fe552ef451aef66556a31eca134e12e2550cd5294d3f7c09f02ae87
R
4,384
102
--- title: "Motor_Neurons" output: html_document date: "2025-08-21" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ```{r} library(ggplot2) library(dplyr) library(Seurat) library(scCustomize) neural <- LoadSeuratRds(file = "neural_final.rds") ``` # Load dataset and level Samples ```{r} DimPlot...
146a2f4591c35ad559800b5e5db4f6c423eed7b595c050da654ca12d8903d636
R
4,386
126
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
36da980fd78f526c7f6ac2f36ba16343e8df23731ae2f577d6db84563a3eee48
R
4,388
143
here::i_am("scripts/2.validations/2.8.POU5F1_CRISPRi/2.8.9.DE_analysis.R") library(tidyverse) library(SingleCellExperiment) library(foreach) library(doParallel) library(limma) library(scran) library(scater) library(variancePartition) library(ggrepel) library(ggsignif) library(patchwork) library(Seurat) library(here) l...
d697a1f622c542f7fd9b15eb499f3a8a336b8a5d7a1f0a3beab8fd954572d356
R
4,392
165
#!/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("--pc_...
45af239be1ad629b0d80afe8ed2abdbde87adbad05e7a4d0119c502f63c894e9
R
4,394
188
library(readr) events_gen <- function(sub,ses){ sub <- as.character(sub) ses2 <- sprintf("%02d", ses) ses <- as.character(ses) ses2 <- as.character(ses2) for (r in 1:2){ #Reset dataframes mid.events <- sr.events <- as.data.frame(matrix(NA,0,4)) #Generate folders,...
2e48e756aec7bde04403639284ac0528a4a3a69ee9e48911285ff1c86f418284
R
4,399
144
# Load Arguments args.split <- function(x) { x <- stringr::str_replace_all(string = x, pattern = " +", replacement="") x <- unique(stringr::str_split(string = x, pattern = ",", simplify = TRUE)[1,]) return(x) } dft.args <- list() dft.args[["iter"]] <- FALSE dft.args[["input"]] <- "/home/whe/project/multiom...
99c3b361932b2c6b1fb94ddf5287034c2ee385abc42023e7a01a29d898d30c94
R
4,400
101
## ##Load regNet package ## #- See https://github.com/seifemi/regNet for details how to install regNet. library( regNet ) ## ##Set the following paths according to your system ## #- Must be modified to fit to your own system #- Central project path prefix for regNet to store outputs of regNet centralProjectPathPrefix...
863a44a7812af48238c7952011d311410095128cd244e733f86f2cc0750d22a5
R
4,404
90
#!/usr/bin/env Rscript args <- commandArgs(trailingOnly = TRUE) # args order: depth file, variants file, Name, GeneLocs file GeneLocs <- TRUE if(length(args) < 4 || args[4] == "" || is.na(args[4])) GeneLocs <- FALSE library(tidyr) library(dplyr) library(tibble) library(ggplot2) library(stringr) library(ggrepel...
6d432fac3bd42ee8a561880b3866a917cd4df3e434318662efa8947ada4aa135
R
4,411
118
#Create a new ArchRproject with samples (14 individual-QC-filter samples + 72 remainning) library(ArchR) library(parallel) addArchRThreads(threads = 10) addArchRGenome("hg38") outp <- "path_to_outdir" setwd(outp) # create new arrow files for some samples mysample <- read.csv("/home/xhan/atac/archrproject0318/list.qc...
1224f8d053144c276ac4efe02d6f20a70dd10259937e54c13b6d06949a4e4eb0
R
4,414
120
--- title: "Fig_3B_C_tumorcell_umap" output: html_document date: "2026-01-23" --- # Set up and adjust metadata ```{r} srt_merge <- readRDS("~/path/to/tumor/seurat/object") #srt_merge <- readRDS("~/processed_data/tumors_normalized_scaled_dimreduction_annotated_refined_miller_with_malig_states_srt_revision.rds") srt_mer...
b2571b562559cfc8950c29572a638d6980d1e9e6a2025b1c61399cd0450cfe16
R
4,415
106
library(Seurat) library(ggplot2) data_dir<-'/cephfs/scratch/bruening_scratch/gdowsett/data/nodomap/' source(paste0(data_dir, "utility_functions.R")) source(paste0(data_dir, "plotting_functions.R")) load_plot_params() load_colors() getLongPalette = colorRampPalette(long_palette_strong) getOkabeItoPalette = colorRampPal...
cb0d435581d31a355457611ed292712e26b061b8ea916d2086d69bfac5cd124c
R
4,415
167
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Double check that all DNs have assigned type #...
4d0a2da6bf7ad511b7455fe86ff89ec6fcd9ef7d894ec61d16f32850f5677fd5
R
4,417
108
##### Combining Tany-seq and Hypomap Data ##### #To observe the sources of the original data in both dataset table(tanyseq$Origin) table(tany_hypomap$Dataset) #In hypomap we have already have Campbell and Chen databases. These are removed from Tany-seq. tanyseq <- subset(x=tanyseq, subset = Origin %in% c("Blac...
b0cbd2dd1accb4fe36d56f886aeb9da8996bc7069f70716ad25b770b0e67c4e8
R
4,418
135
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
79bfa2da67e52e42068d49d3d7d42c6041f56b5b2b8ee6344bdea15a765db96c
R
4,419
119
#!/usr/bin/env Rscript #' Author: Sumaiya Nazeen (sumaiya_nazeen@hms.harvard.edu) #' This program runs NERINE for a given network and observed mutation counts #' in a specific variant category for a case-control cohort #' #' @param case_count_file file containing case frequency table #' @param control_count_file file ...
e54a3be7e6978f7f9bfcb4b248e0971c69bceeb613b79253b9d8e338aec0af02
R
4,420
97
#De-convolute spot-level spatial data with scRNA-seq reference library(spacexr) library(Seurat) library(ggplot2) #Set up reference ref <- readRDS("/cephfs/scratch/bruening_scratch/gdowsett/data/nodomap/nodomap_cleaned_20251025.RDS") DefaultAssay(ref) <- "originalexp" Idents(ref) <- "cluster_number" #Extract counts/clu...
e31a854a18c9a9059c486901d9ce53ed69dd11f68e679aa641b8a05bd5dafc82
R
4,421
107
# Purpose: Plot CP heatmaps (Pre vs Post) with fixed contour levels and a 0.51 outline. # Notes: Expects CP matrices shaped [time x frequency] with 36 time bins and 149 freq bins (cols 4:152). suppressPackageStartupMessages({ library(ggplot2) library(dplyr) library(tidyr) library(readr) }) ## ---- P...
39a94af52280459a73bc3f357268bd70c074bf45702f7ed1dfd8b150aa3b69ea
R
4,423
120
# ============================================================================== # Script 16: Figure 3B - Chromosomal Topography of Translocation Breakpoints # ============================================================================== # Description: Generates translocation breakpoint heatmap showing chromosomal # ...
8b4eafc26a6615114fc8c43f57c561b4dfed5844372a056a29cb13f1c78cd349
R
4,423
93
####################################################### # Determination of samples that were mismatch per DNA fingerprinting tool # Date: 2022.05.28 # Author: Kevin J. ####################################################### # Current location of files: workingdir = '/projects/verhaak-lab/USERS/johnsk/glass4/results/fi...
a59a9675fa1bf0864650afc0afe3d417ddef62ab09f638a2deb89c0e48c4f152
R
4,423
135
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
d70c11c85a86ee66e58ac17dba9882bb237bf3530744aafc984e74ef3bce48e7
R
4,423
129
#!/usr/bin/env Rscript # ============================================================================ # TsImpute Benchmark on scMixology 3cl Dataset # ============================================================================ setwd("/projects/radlab/Wan//NSF/CoMemEmpirical/") options(Seurat.object.assay.version =...
52c14d6edb5b94253d1ffbc84117198068d4fb7ac47da83799aa711e939b0241
R
4,426
102
--- title: "Using CONDOR for community detection in bipartite graphs" author: "John Platig" date: '2015-09-28' output: html_document: df_print: paged rmarkdown::html_vignette: default pdf_document: default vignette: | %\VignetteIndexEntry{CONDOR} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{U...
1b367618cce110bf562b9604f6a46241c2a19643e3cfe408e15f8ca76d491ea3
R
4,429
122
# ============================================================================== # Load Copy Number Variation (CNV) Data # ============================================================================== # This script loads and prepares CNV data from CytoSNP arrays # # Author: Osama Shiraz Shah # ========================...
c0a48d224ab411373992ef3f89a490aa544b7659e83d859da84c11a8e56f94f4
R
4,433
102
############################################################## # Script: 02_load_normalize_batchcorrect.R # Purpose: Load, clean, normalize, impute, and batch-correct # proteomics data for IMP-1088 analysis ############################################################## ####################################...
63383a5bd39067fa405b957fa9caeefe58403074a26f8ceda9dfe8df38ed9ab0
R
4,435
93
####################################################### # Determination of samples that were mismatch per DNA fingerprinting tool # Date: 2022.05.28 # Author: Kevin J. ####################################################### # Current location of files: workingdir = '/projects/verhaak-lab/USERS/johnsk/glass4/results/fi...
e83da276c1187f677bd3f190e7bd3845852ff181d5fac86617a69566337edd60
R
4,435
128
--- title: "YARN: Robust Multi-Tissue RNA-Seq Preprocessing and Normalization" author: "Joseph N. Paulson & John Quackenbush" date: "`r Sys.Date()`" output: rmarkdown::pdf_document vignette: > %\VignetteIndexEntry{YARN: Robust Multi-Tissue RNA-Seq Preprocessing and Normalization} %\VignetteEngine{knitr::rmarkdown} ...
d29e8f79bd76d8877286d24132bc299160a9b2f8773aa5d6ce91e7d9fbd7e3ab
R
4,436
191
--- title: "Find association between significant, Aging-associated CpGs or DMRs and epigenetic clocks" subtitle: "Read and pre-filter ROSMAP data" author: - David Lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r format(Sys.time(), '%d %B %Y')`" output: rmarkdown::html_document: hi...
28d253ed6d714eb9c53624a6a8683f8a73fef096f1b0aa272dada2c83d61eba0
R
4,441
206
--- title: "Evaluate gene sets identified by SDAN" author: "Wei Sun" date: "`r Sys.Date()`" output: html_document: theme: journal highlight: tango toc: true toc_depth: 3 toc_float: collapsed: true smooth_scroll: false number_sections: false df_print: paged --- ```{r setup, incl...
dd0ae559af7516048b724159ee203c0639d0c4ebca027a470c47cc498aa9aadd
R
4,442
93
####################################################### # Determination of samples that were mismatch per DNA fingerprinting tool # Date: 2022.03.20 # Author: Kevin J. ####################################################### # Current location of files: workingdir = '/projects/verhaak-lab/USERS/johnsk/glass4/results/fi...
0c0e00e1587c2a995933ba3a57912fa8c1dd182a68cd6b9d79f0cf282fc2d733
R
4,443
95
context("test LIONESS result") test_that("lionessPy() function works", { # test 1: check test error message when empty inputs expect_error(lionessPy()) unlink("lioness_output", recursive=TRUE) # input file path system("curl -O https://netzoo.s3.us-east-2.amazonaws.com/netZooR/example_datasets/expr4...
e5af3c0b5248f7707d795286f219b9c2946f4799b5963a87169a30e31e755fff
R
4,448
107
### Example Analysis Code - Mitric, Beerens et al., 2026. ### Threat intensity shapes cortical engram architecture supporting remote memory retrieval. Nature Communications ## FIG 6 - structural analysis #### set up R # clear existing workspace objects rm(list = ls()) graphics.off() # set working directory to whe...
bb0212e0125479b3e03537b7619f748c0382028e7b5a0e1f9a3118aafa6bd0d6
R
4,453
128
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
34f79aa6d264ddec273c45eba4595462b38b60a181376644221e743fe0717f0e
R
4,458
99
#' Add Harmony Batch Corrected Reduced Dims to an ArchRProject #' #' This function will add the Harmony batch-corrected reduced dimensions to an ArchRProject. #' #' @param ArchRProj An `ArchRProject` object containing the dimensionality reduction matrix passed by `reducedDims`. #' @param reducedDims The name of the `...
ed11f05903242699f9044d7ec7e7592d058d7d19eb0bbed4ba2559cf5541f378
R
4,458
54
#!/usr/bin/env Rscript library(Matrix) library(Seurat) library(tidyverse) library(readxl) library(Augur) source("scRNAseq_funs.R") ##################################################################################################################################################################################### ## ...