sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
caac52cf04119ca9fa8f16fe98880305ce4ed7ea2a288d8aab6f07c67162afff
R
5,153
70
#' Filter modules based on their tree representations #' #' Filters modules using two tree-based statistics (the total tree length and within-species diversity) by comparing the values of the actual modules to the values of the random modules. #' #' The within-species diversity measures the variability of module connec...
d5a23c58571d77b2132773e402467b3a922d2be0a14dddd909dc9d1fbae9f702
R
5,159
151
############################################################## # Script: 03_DE_analysis.R # Purpose: SVA correction and differential expression analysis # using limma for IMP-1088 proteomics data ############################################################## # ======================== # Load required p...
fa916ac5da15eae00ea032f6265711e2499eb2d3a48b6cfc6d61d1975c759424
R
5,168
137
#' Create SQLite database for prediction models #' @param brain.region Brain region name #' @param file_input_summ Directory containing summary files #' @param file_input_weights Directory containing weights files #' @param drv_file_path Directory for database files #' @param dataset_training Dataset identifier #...
f0643d6b8ff3a079d286fa8ffcc61d4e51c73755cdcd67f9d2c2093761a96610
R
5,170
104
## ----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-librar...
6f19123d4d4be0ea44d7d80a761d11c80ce7bf5687a3740d0fb409e096f5e34d
R
5,172
125
#' Normalizes and merges downsampled query and database expression data #' #' This function performs normalization and merging on the downsampled query and database expression data stored within an `ann` object. It assumes the data is gene expression for RNA-seq (assay_db = "RNA"). #' #' @param ann An object containing...
d9f29b99843d15f57a16b5cfefe55becb86db931f9ca036ebd0e492327089258
R
5,175
125
--- title: "XGBoost result plotter" author: "Joonatan Palmu" date: "`r format(Sys.time(), '%d.%m.%Y')`" editor_options: chunk_output_type: console --- # Init ```{r options, include = FALSE} knitr::opts_chunk$set(include = TRUE, echo = TRUE, message = FALSE, results='asis', cache=FALSE, warning=FALSE, collapse = TR...
b9ccc56738509adde22aa65bacc6f2744f7a1dedef90980df52d7854e727de0b
R
5,178
112
library(ggplot2) rm(list=ls()) options(digits = 4) # by default, print results to four 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 = "" load("CDVMBG_BRM_TargPre...
6de69340d0003226fc5e8800c490c37f969f4f29ede5c57dfde390f4268fe125
R
5,179
157
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Cluster DNs, use various distances and explore ...
037cceb462755b44ec3a340b755c7ee13f982b9e530fbcf24f82f45d559b2b59
R
5,180
140
# Load libraries library(ChIPseeker) library(org.Hs.eg.db) library(GenomicFeatures) library(dplyr) library(rtracklayer) library(clusterProfiler) library(stringr) library(ggplot2) library(purrr) txdb_ensembl <- makeTxDbFromEnsembl(organism="Homo sapiens", release='113') # Load CpG island annotation (see https://github....
ba36f3edf3d712374d95be2b4e333ac785c8fd1940d0759957ce4d7cd5877ef9
R
5,203
155
#------------------------------------------------------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...
fb2b6cc2e1663bdd89423ec0c9fb3bcaf67dcad64c029595abcb225fb45ea32a
R
5,206
142
render_paneleditor_ui <- function(working.directory, ...) {renderUI({ fluidPage( fluidRow( column(6, textInput("paneleditorui_output_folder", label = "Output folder name", value = "renamed") ), column(3, actionButton("paneleditorui_load_...
437424008d2b01f5ab8a46004531339aa63752507de24af8d74f7d505de56f1a
R
5,213
141
#------------------------------------------------------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...
3352de0fa63876e6ad1c8d197f397ca8a37c4d6a094cc1e3ad03b449ef70f717
R
5,215
157
#------------------------------------------------------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...
6334ed291ad95da41f125f37b4a176e8eab24a5c6d0816643bdc527da5f0190f
R
5,216
119
# 加载必需R包(未安装请先运行安装命令) if (!requireNamespace(c("readxl", "ggplot2", "dplyr", "tidyr", "scales"), quietly = TRUE)) { install.packages(c("readxl", "ggplot2", "dplyr", "tidyr", "scales")) } library(readxl) # 读取Excel文件 library(ggplot2) # 绘图核心 library(dplyr) # 数据处理 library(tidyr) # 数据重塑 library(scales)...
874a7417913e239cd7d4de23a773834058efe48a0baa112f0b80f160685412e2
R
5,217
224
test_that("Test computeCentroidWeights", { coords <- readRDS(system.file("extdata", "MouseBrainCoords.rds", package = "SpNeigh" )) cells_c2 <- subset(coords, cluster == 2)$cell weights <- computeCentroidWeights(data = coords, cell_ids = cells_c2) expect_true(is.vector(weights)) expec...
4957c2d50927fcfde2930f25b19b6c68611a5c0b1f103f9fa101ebb3394bc70f
R
5,220
188
library(MicrobiotaProcess) library(phyloseq) library(tidyverse) library(ggtree) library(ggtreeExtra) library(patchwork) library(ggnewscale) library(vegan) library(coin) pdf("all_plots.pdf", width = 11.69, height = 11.69) # ------------------------------------------------------------------------- # colors # ---------...
5e58fe2898f644cc7fc9cbe6778407fb6e97e983c452a7c7cf26060e12f42b7f
R
5,223
120
#!/usr/bin/env Rscript #' banc-publish-segment-properties — Refresh per-dataset segment_properties JSON only. #' #' Sources just the helper functions from `banc-ngl-upload.R`, reads each #' compiled_data feather from GCS (FANC uses local CSV), builds the #' tag-rich `segment_properties` JSON, and pushes to the per-data...
e2d63e84ee8f4401e04b067a2bb0179417d407bc838aeaff79b956a902876da7
R
5,226
110
#' Creation of SAHA object for analysis #' #' The `SAHA` class is used to store and manage data throughout the SAHA analysis workflow. It holds information about query and database data, matched markers for different analyses, and final analysis results. #' #' @slot query A list containing data frames for both marker (...
24ea95a8fb4cc3b6d6eb65843b67964389a076c9e224760cf9236ff36b186c82
R
5,228
203
#single-cell analysis package library(Seurat) # plotting and data science packages library(tidyverse) library(cowplot) library(patchwork) # co-expression network analysis packages: library(WGCNA) library(hdWGCNA) # using the cowplot theme for ggplot theme_set(theme_cowplot()) # set random seed for reproducibility s...
e35ba4f2a3d9c5e407efb2a651a2a1920cb8ba0af015f5c5e7de2fcd50bdff9e
R
5,236
146
### In vitro #2 - Analysis on overlapping sets of lipids that are increased or decreased in each KO compared to control rm(list = ls()) library(tidyverse) library(ggthemes) library("scales") library(ggpubr) library(UpSetR) setwd(rstudioapi::getActiveProject()) source("./Scripts/Function_scripts/Effect_size_functions...
4e1411d88074f8bb0022131a214668a0cde58887d21961ef297b280598e7fde9
R
5,240
190
OrderDataBySd <- function(exp_mat){ # compute sds for each row sds <- matrixStats::rowSds(exp_mat) sdsSorted <- order(sds, decreasing = TRUE) # order by most variable probes on top exp_mat[sdsSorted ,] } calculate_dnam_pca <- function(dnam_data, pc_count = 20) { beta_data <- SummarizedExperiment::assays...
1ed6b4adcf0d5fd9d5c0a6f1b84e9951fca18ad93c5e68ae7705ef68eb85b68c
R
5,246
167
--- title: "tumor_preprocessing_8_manual_annotations_miller_myeloid.rmd" output: html_document date: "2025-12-18" --- ```{r} library(Seurat) library(readr) library(tibble) library(dplyr) library(viridis) library(presto) # used to greatly improve FindAllMarkers efficiency ``` # define funcitons ```{r} # Define a func...
8570a3cd0ec255e4c4547926658b9d2281983950fbf3e8021a81ab5b6a75e88d
R
5,250
235
--- title: "Check genes associated with case-control status" 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 params: gr...
aa83becb784fbc7eac05476dfea1d8483db0b68ba561d4815a3b0dbf25c244ec
R
5,255
144
flyem_dataset <- function(dataset) { cds=clio_datasets() dataset=match.arg(dataset, names(cds)) cds[[dataset]] } #' Choose active male VNC / FlyEM dataset #' #' @description \code{choose_malevnc_dataset} chooses the dataset that will be #' used by the male VNC package. #' @details For \code{choose_malevnc_data...
f3c7bb6975e8281cdfac10e33bca35c02baa910331e6b886efa6478b98c0bbcd
R
5,255
113
#!/usr/bin/env Rscript #------------------------------------------------- # Title: combine all the single data metadatas # Author: Christina Meier # Date: 2025-06-02 # Email: 19cm51@queensu.ca #------------------------------------------------- # Notes ------------------------------------------ # module load StdEnv/2023...
7e17bdbf3f7ff94bbacaba7940201b5ac079f36c0e122e0ad80ae7139ded4e2d
R
5,260
125
################################################################################ ## Gene Ontology pathway enrichment of plasma differentially expressed proteins ## ## Companion code for: ## van Weperen et al. "Spinal nociceptive denervation impedes chronic autonomic ## remodeling after myocardial infarction" ## ## ...
f2b4b25a14f76df7c0cc06eb246a7115aca4eba2887fac88a2c86aa775551ddb
R
5,260
233
--- title: "Check genes associated with case-control status" 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 params: ce...
b4774d1bdee65a77a386fddc935e2c4dce3627df967aeda96bd4000d1d895e4a
R
5,278
125
library(Seurat) library(BPCells) library(tibble) library(dplyr) library(ggplot2) library(ggrepel) library(patchwork) library(scater) DGE_folder <- "./Pollard_lab_SSE/" mat <- ReadParseBio(DGE_folder) # Check to see if empty gene names are present, add name if so. table(rownames(mat) == "") rownames(mat)[rownames(mat...
2b4330e5b6f9b30603aaff30cc015a97d4ec6c2fe92c37061d3ccc3f7f542abf
R
5,279
63
rm(list = ls()); setwd('/sc/arion/projects/DiseaseGeneCell/Huang_lab_project/ADASE/') outdir <- 'ASE_individual_analysis/ASE_Var_RegionVsChrBand/ASE_Var_RegionVsChrBand' # All sample in analysis clinical information clinicals <- as.data.frame(readxl::read_xlsx('data/SampleInAnalysis/SampleInAnalysis_TenReads.xlsx'...
cc91f289ce75cffdfbc158062be17f643565ef85bce4face7ea6e8ca46233409
R
5,280
135
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 .emc2_build_info <- function() { invisible(.Call(`_EMC2_emc2_build_info`)) } EMC2_call_custom_trend <- function(trend_pars, input, funptrSEXP) { .Call(`_EMC2_EMC2_call_custom_trend`, t...
dac2237b116e4633944648bd2c40b7352feb3a3dc6612d0fd2c09bb7dbf15175
R
5,287
144
################################## # Preparing the snRNAseq data from CAREmut dataset for NMF # Author: Kevin Johnson # Date: 2026.03.23 ################################## library(tidyverse) library(RColorBrewer) library(viridis) library(Seurat) library(harmony) library(Matrix) library(ggpubr) library(openxlsx) librar...
af78c21fc276091bc3bda94de43edbf90bdae020ab0bf00ee0280a8f7c9deec6
R
5,288
155
library(AnnotationDbi) library(org.Hs.eg.db) library(clusterProfiler) library(dplyr) library(ggplot2) library(ReactomePA) library(data.table) line_of_interest = "3110_uqcrc2" df <- read.csv("C:/Users/Jiawan/Dropbox/Jiawan/Analysis/Deseq2/comparison/CRISPRa_fam3_new_result/3110_uqcrc2_versus_3110_ev/npc_3110_uqcrc2_ver...
dbb6341d285c92dd51d336b2a6dacdf770b288a88da39573c6c8f8783aeb834e
R
5,291
251
########################################################################################## # SparseMatrix Utilities ########################################################################################## .normalizeCols <- function(mat = NULL, colSm = NULL, scaleTo = NULL){ if(is.null(colSm)){ colSm <- M...
c84f38f7846f28158c8a1c65665a01565e4b58a28ea19273aa5be7d32da65dcb
R
5,298
186
library(testthat) library(openxlsx) library(dplyr) library(readxl) library(tidyr) library(zoo) library(purrr) source("../R/module_upload_helpers.R") test_that("convert_wide_to_long behaves correctly across 20 Excel scenarios", { dir.create("test_excels", showWarnings = FALSE) write_test_excel <- function(da...
b2a417649c632035bd0fbfdfa14cd0b15c821dde7734373f383aa448245eda1b
R
5,299
118
## ##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...
a9098007c5ebf4f35a4b2c30fc36a732345dcca19c8cfd483184bf7d0dd52bec
R
5,300
147
# ============================================================================ # Figure 1A: Venn Diagram - FIGURE GENERATION SCRIPT # ============================================================================ # This script generates the Venn diagram showing overlap between three # ISR gene list sources: GO Consortium...
f5dac9b60781d0e4ddd4921e8e77b28613d6dae44c47d898120b79ba8cab1170
R
5,301
150
calc_ll_R <- function(p_vector, model, dadm){ if(!is.null(model$transform)){ pars <- get_pars_matrix_oo(p_vector, dadm, model) } else{ pars <- p_vector } ll <- model$log_likelihood(pars, dadm, model) return(ll) } log_likelihood_race <- function(pars,dadm,model,min_ll=log(1e-10)) # Race model summe...
5a6c4ee4ce71ba92ceda006f3fa1e80c3eace3ba360c75a4fa786598d9b0dcd2
R
5,306
155
# Description: Plot a prognostic curve under the dynamic progression of the # disease in reference patients library(dplyr) library(mstate) library(ggplot2) library(patchwork) msT2dComp2ndEd <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\integComp2ndEd\\msT2dComp2ndEd.rds" %>% readRDS(.) cfull2ndE...
a543fcfd2ef2ee1737d300cb3f277000d042a667e2d9dfab9be98169643be6a6
R
5,313
158
#------------------------------------------------------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...
199ce17d2e85050dc8266e84a56971345d3f0c6a7c0b7f85ff942419e8803dcd
R
5,320
133
##################################################################### # INGENE Prediction Helper Functions ##################################################################### # Helper functions for applying trained INGENE models to new data and # averaging predictions across networks ###########################...
f59d94341e424932cd2dc0a05d0fe192caf7a35702d26aa62589009ff0811192
R
5,320
143
#------------------------------------------------------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...
858e0d050ebaa5b26b64648c4b22bc5e2d73ad08606f685d939c3e7cb68c73dd
R
5,323
70
## Annotate human insert ------------------------------------------------ # get human plasmid sequence (txt created based on /data/share/lab/lab specific overview and lists/Plasmid Sequences/p216_pAAVS1-TetOn-zKRAB-dCas9-P2A-mCherry/) plasmid_seq_human <- read_tsv("pAAVS1-TetOn-zKRAB-dCas9-P2A-mCherry.txt", col_nam...
269621ff349316a8ff0adfc0ef690c92b67751b2df23f6d054a1404cba00ff0e
R
5,335
278
# Tests for arrow # change in random number generation in R3.6, this ensures tests will pass under older and newer Rs # (this was implemented in Seurat's testthat) library(ArchR) library(testthat) library(Matrix) suppressWarnings(RNGversion(vstr = "3.5.3")) set.seed(1) #Context context("test_arrow") #Fragments fragm...
be3a78295b5111fd38c4dec2e195e1232455674501807d86e1d39304ff841c25
R
5,354
115
#' @title importArboreto #' @description Import output from Arboreto/GRNBoost (https://arboreto.readthedocs.io) #' @param fileName File name of the link/adjacency list #' @param reorder Whether to sort the links by decreasing weight/importance #' @seealso pySCENIC (https://pyscenic.readthedocs.io) #' @examples #' GRNB...
3e7338342c02d0bb75bc70ff14c7b135cc599bc3c2323c63de91e164ddbf461a
R
5,355
239
--- title: "Ambra Villani's microglia RNA-seq, custom plots" author: "Izaskun Mallona, Mark D. Robinson's lab, UZH" date: "`r format(Sys.time(), '%d %B, %Y')`" output: html_document: toc: true toc_float: true code_folding: hide code_download: true number_sections: true df_print: kable them...
f37b850da84a7da681376845427d29fbab1b29d5bb1cc69e7019d74b7c30d1b1
R
5,357
182
--- title: "Getting Started with influencer" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Getting Started with influencer} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/fi...
84e1763bc0b1e814fdcd00e747a1eaa0c2a0fb87096bb2801985eef11a7899de
R
5,361
156
#------------------------------------------------------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...
9b3afb704c7f50afe3dc3406c796354a856efc86f280eec8a3c1526e2f37494f
R
5,361
168
--- title: "Fig4_NKcells" output: html_document date: "2025-04-22" --- ```{r} library(Seurat) library(tidyr) library(dplyr) library(tibble) library(ggplot2) library(ggnewscale) library(gghalves) library(ggpubr) # needs cmake library(scales) library(harmony) library(patchwork) library(stringr) library(forcats) ``` # ...
c681aa922ba958e71e6b5029dea847396b5617da2f938f046f8b8248214e7bc6
R
5,364
122
#' banc-malecns-mesh-transform — Transform maleCNS meshes into BANC space (navis TPS). #' #' For each maleCNS bodyid, fetches the OBJ mesh and applies the #' JRCFIB2022M → BANC TPS transform via Python `navis` + `flybrains` #' (no R-native registration exists yet for this chain). #' #' @section Reads: #' - `<banc.met...
f18165b96b45ddfd639c96811ca6d80bc5166eda1b571db6b22c608fe59a38d5
R
5,369
162
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(Seurat) library(harmony) }) # ============================================================ # Purpose # ============================================================ # This script integrates per-sample Seurat objects (after QC) using: # LogNormalize ...
914ed5d5949e44257d7273a336fb4ec1226f1ebeaaff9c54d3ae5920a800a72e
R
5,370
134
#!/usr/bin/env Rscript packs <- c("qqman","optparse","data.table","R.utils") for (p in packs) { if( !require(p, character.only = T)) { print(p) install.packages( p, repos = c(CRAN = "http://cran.r-project.org") ) } } option_list = list( make_option(c("-f", "--file"), type="character", default=NULL, ...
b3d5f386c507394304f6f935db8573dd14373aa6dc1d1a50a059386e30440ae4
R
5,381
172
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### # GeoMx parameters corMet = "spearman" corrCoefThre <- 0.5 # correlation coefficient threshold values to include seed <- 1118 niter <- 1000 # graph layout iteration commWeight <- 100 # graph layout weights on community info cohortWeight <- 1 # graph layout wei...
fda2445ebf695f1f9e1fc9387bd9e2eb84865c1185fa1dc6365a912e9eaa924b
R
5,383
141
#' Annotated spatially-registered clusters #' #' Once you have computed the enrichment t-statistics for your sc/snRNA-seq data #' using `registration_wrapper()` and related functions, you can then use #' `layer_stat_cor()` and `layer_stat_cor_plot()` to perform the spatial #' registartion of your sc/snRNA-seq data. Thi...
edb25744faefacfb8ee3a1e3b9f0dc166a833a05e38d83538ad27d2c4982fcd9
R
5,389
150
#------------------------------------------------------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...
10408a99b3e9ad8e0c76a0463cfb359c310df525d3fddd0322cb0be66408e34d
R
5,391
165
# Hai Wang # Ensemble Learning library(data.table) library(dplyr) # load the main table data <- fread('../5_prepare_data/data4.csv',header=T,sep=',',stringsAsFactors=F,nThread=40) data$V1 <- NULL data$index_main <- 0:(nrow(data)-1) data$median <- log10(data$median+1) # load indices i20001000 <- read.csv('2000%1000.c...
151825780bf0de7d4ffec048800fdaab0e83984875f79e536cd312bd80f31a42
R
5,398
156
# Description: This script is used to plot the incidence probability of a patient. # In the selection of patients, we selected four levels effective value for comparison library(dplyr) library(mstate) library(patchwork) library(ggplot2) msT2dComp2ndEd <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\in...
7196703970f1b76b45f8f229c9d606ddd8a19fc40bdcb57277035eca927286a5
R
5,414
161
# Contains a collection of utility functions # #' Make cluster names in format 'study_id|cell_type' #' #' @param study_id Character vector containing study ids. #' @param cell_type Character vector containing cell type names # (must be same length as study_id). #' #' @return Character vector containing cluster names ...
217e2eda9f172234d24909a9ed2605528ce2f1f574794ab1147be3832eb15d0b
R
5,422
154
# ============================================================== # Script: Inhibitory neurons — merge clinical, QC, and DEG (wilcox) # Criteria: logfc.threshold=0, min.pct=0, min.cells.feature = 1 # Output: saves CSV # ============================================================== suppressPackageStartupMessages({ li...
37086f418577561c6ec7358780f7f68379bff6b301a309bfa2f42dc7356fd3a1
R
5,422
146
################################## # Preparing the snRNAseq data from CAREmut dataset for NMF in the undifferentiated malignant population # Author: Kevin Johnson # Date: 2026.04.01 ################################## library(tidyverse) library(Seurat) library(Matrix) ## Specify directories: proj_dir <- "/vast/pal...
ffc584e2d109a7cbb4cfada193499b5a4fb2a917aa85170f4e83c5be2b6e2817
R
5,423
158
library(tidyverse) library(readr) library(ggplot2) library(ggpubr) library(rstatix) library(wesanderson) raw <- read_csv("data/TREC_KREC_combine_Baby_4.csv") data <- raw %>% filter(!is.na(age_bin)) %>% mutate(age_bin = factor(age_bin, levels = c( "CB", "0-3 Days", "4-14 Days", "15-30 Days",...
17f23f172e20a3aa8c7e6175cad6573edc811881c77e3b0810f7fc7341a6d94c
R
5,426
185
# Helper functions #' Look up corresponding values from a lookup table #' #' @param list A string vector - keys #' @param table A tibble - the lookup table #' @param col_1 An integer - column index of the keys #' @param col_2 An integer - column index of the values #' #' @return A string vector. #' @export #' vlo...
0c025785827c36599cc3c74433e91f2412839b304f2875dad59eb74e3cc271d5
R
5,427
117
library(ggplot2) rm(list=ls()) options(digits = 4) # by default, print results to four 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 = "" setwd(paste(path, "/data...
575b0e19662246e82283abc4e96549b3c655e3edb02aae1ce92f4f26c30c1a1e
R
5,427
234
--- title: "Single cell Cme-CUT&Tag data analysis" output: html_notebook --- ```{r setup, include=FALSE} knitr::opts_chunk$set(warning = FALSE, message = FALSE, results = "markup") ``` # Load libraries ```{r, results = "hide"} library(EnsDb.Hsapiens.v86) # Annotation database library(Seurat) library(Signac) libr...
b45bdff6bd218eb76925f16baa005ab429b57dfdf93e531ebd4ddd2a6e9beeff
R
5,427
142
test_that("R and Python implementations give similar results", { # Skip if Python environment is not available skip_if_no_python <- function() { python_available <- tryCatch({ # Use r-reticulate environment reticulate::use_condaenv("r-reticulate", required = TRUE) ic_module <- reticulate::impo...
b205f3de26643e69081db072650ef3f587eeb37fcdf56b7f0367d3595ceffa92
R
5,428
132
#!/usr/bin/Rscript --slave # LSR_example_code.R # 16th January 2026 # Modified: 16th January 2026 # Author: Richard G. Carson (richard.carson@tcd.ie) ################# # Read the data file data <- read.csv("example_data.csv", header=TRUE, stringsAsFactors=FALSE) # Ensure data are numeric data["mep_amplitude"] <- ...
af901afffa8cb33b005c75fe99030166eaad157b7e80e1c04990f8f6b7e67d61
R
5,435
132
############################## ## Visualize experimental PDGFRAi analyses ## Author: Kevin Johnson ############################## # Listed as 637451 in the data but should be 673451 library(tidyverse) library(ggpubr) library(EnvStats) library(openxlsx) proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut" fig_...
8dcd59fd4b5a4109a73dd1ad556d0180b247d20c6872613370c910e7d176a2b9
R
5,439
155
library(dplyr) library(ArchR) library("stringr") library(ggplot2) library(ggpubr) library(reshape2) library(ggsignif) outp <- "sn_mC" colors.dx <- ArchR::ArchRPalettes$circus[1:4] names(colors.dx) <- c("Control","AD","bvFTD","PSP_S") #---load 50 subCs projmeta <- readRDS("projATAC_50subC_meta_584904.rds") my_subcs <- ...
19431e2b04df62e9daf803648ef47cceb694bc6fabd07bdf0748d1b7b3da01d4
R
5,443
136
#' banc-lr-nblast-images — Render per-query left-right BANC mirror NBLAST review PNGs. #' #' Restricted to BANC neurons with a strong FAFB or MANC NBLAST match. #' #' @section Reads: #' - per-query mirror NBLAST CSVs, BANC meshes #' #' @section Writes: #' - `<banc.nblast.mirror.save.path>/images/todo/*.png` #' #' @...
efd700d2e782dd2a90f86c2ac76ad6919de6f402f202a24a75307d305e3cea13
R
5,443
110
suppressMessages(suppressWarnings({ library(Seurat) library(ggplot2) library(igraph) library(reshape2) library(tidyverse) library(ggpubr) library(rstatix) })) parser = argparse::ArgumentParser(description="Test paralog/ohnolog shift") parser$add_argument('-I','--input', help='input process...
38c23db57134ff2eee410bc31196e333fa4f78c280c8aab8c65d6390baff681e
R
5,444
135
context("Model") library("carrier") testthat_model_name <- basename(tempfile("model_")) teardown({ mlflow_clear_test_dir(testthat_model_name) }) test_that("mlflow model creation time format", { mlflow_clear_test_dir(testthat_model_name) model <- lm(Sepal.Width ~ Sepal.Length, iris) fn <- crate(~ stats::pred...
60cde36915a6aacf4b0e031011f69c29fa92ac26ab7c57604ea4e7915027ebaf
R
5,445
207
--- title: 'Epilepsy - plotting' author: "Jon Thompson, Pers lab" date: "`r Sys.time()`" params: date: !r substr(gsub("-","",as.character(Sys.Date())),3,1000) randomSeed: !r 12345 pValThreshold: !r 0.05 padjMethod: "bonferroni" output: html_notebook: df_print: paged number_sections: yes toc: yes toc_dept...
164c66b07c208bab1b7559fe073058d93a1fbb02de4716be210250ce99f2424a
R
5,448
115
## ##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...
6594d893bb1888b2511403a468e42166bc0390ce56b74626a79b5e9e3f3a629f
R
5,451
186
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
765d47891e92b86543ba22d14fd1ebf4e7e113faec5d73c2fe8a014decd950ad
R
5,453
90
library(ggExtra) library(ggplot2) library(tidyr) library(MetaNeighbor) library(conflicted) library(magrittr) library(reshape2) library(dplyr) library(here) library(readr) conflict_prefer("count", "dplyr") conflict_prefer("select", "dplyr") conflict_prefer("filter", "dplyr") here() Sys.setenv("VROOM_CONNECTION_SIZE"=10...
fe7e1f9b385288cd7273fd7ddbdafc737d4a1ca3a231b155c4a158bca9f9cc43
R
5,460
124
library(MetaNeighbor) library(SingleCellExperiment) library(magrittr) library(dplyr) library(S4Vectors) library(here) library(readr) library(tibble) library(conflicted) conflicts_prefer(base::setdiff) conflicts_prefer(base::intersect) conflicts_prefer(dplyr::filter) conflicts_prefer(dplyr::rename) conflicts_prefer(dply...
1a36570d69aba095103e1772d7e3b69c564ee60d04f66aa1bb9f64bc759eeb72
R
5,463
219
library(data.table) library(readxl) library(Matrix) library(tidyr) library(ggplot2) library(viridis) library(ggpointdensity) library(ggpubr) theme_set(theme_classic()) # cell_type = "cd8" args = commandArgs(trailingOnly=TRUE) args for(i in 1:length(args)){ eval(parse(text=args[[i]])) } cell_type data_dir = ".....
f2c9b4d144d278902fe41a9a8d3d72fad4616cee15c616c54a1485be2611678f
R
5,463
145
library(Scillus) library(Seurat) library(magrittr) library(tidyverse) a <- list.files("./test/GSE128531_RAW", full.names = TRUE) m <- tibble::tibble(file = a, sample = factor(stringr::str_remove(basename(a), ".csv.gz")), group = factor(rep(c("CTCL", "Normal"), each = 3), leve...
2b04a88cca0f791f9dc8a6167c13354873359f239a7d751f85e4bb76b3680d4f
R
5,467
121
library(Seurat) library(SeuratData) library(ggplot2) library(patchwork) library(dplyr) library(spacexr) library(jsonlite) library(png) VisiumData<-read.VisiumSpatialRNA("location") spatial = Load10X_Spatial(data.dir = paste0("location")) barcodes <- colnames(VisiumData@counts) plot1 <- VlnPlot(spatial, featu...
252435b9f9ec9e410ec467478e0cebcc08d6f8c36845501eb155eb54e21436f8
R
5,468
160
# Load required libraries library(DBI) library(RSQLite) library(purrr) library(dplyr) library(limma) library(parallel) library(tidyr) library(magrittr) library(data.table) # Set working directory to project root # setwd("path/to/project/root") ############### ## PARAMS ############### mod...
71373806180833b7f4d7830ddeac82059f46888d525efb293764bd08635ed945
R
5,470
155
#' Run MitoCarta GSEA Analysis and Visualization #' #' @param tbl Differential expression results table #' @param contrast Name of the contrast for plot labeling #' @param T2G Term to gene mapping dataframe #' @param T2N Term to name mapping dataframe #' @param n_pathways Number of top pathways to display (default: 30)...
3a472d45a9bae2a4079341b2fbd44bfb3830da24e2e5cdf02a8088e92a0f0048
R
5,474
155
#------------------------------------------------------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...
d106eea9726394eeb798e934281b3ba17e5ffa3671445aa22759b63175178dc7
R
5,481
148
##################################################################### # Create Prediction Database Pipeline ##################################################################### # This script creates SQLite databases from the training results # It performs the following steps: # 1. Processes summary and weights fi...
6adeca52808cdfc35d12391d569e4f48a4419b38d4518b5cb9f4f5694cdc56cf
R
5,482
136
library(ggplot2) library(ggpubr) library(extrafont) library(dplyr) library(svglite) #### Read TPM matrix #### tpm_file <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/03.Normalization/adjusted_merged_matrix_1_TPM.txt" Target_matrix <- read.table(tpm_file, sep = "\t", header = TRUE, row.names = 1, check.names = FALSE) ##...
01fb85c7c3f8d1e2bf09eb8ec28d0732570be51474c18aa4f44b2fe26da011df
R
5,490
177
################################################################################ # Volcano plot # # - No hard-coded absolute/local paths # - Input/output provided via command-line arguments # - Highlights user-specified genes with custom colors # - Labels: top N significant genes + highlighted genes # # Usage: # Rscr...
4b3a64b664a2382c5cd27d0253fead2b5863261fbceb6209b918dded86c17a71
R
5,490
148
#' Create SQLite database for prediction models #' @param brain.region Brain region name #' @param file_input_summ Directory containing summary files #' @param file_input_weights Directory containing weights files #' @param drv_file_path Directory for database files #' @param net.names Vector of network names #' ...
0f3561b8652a5bf7e09c72a47be88fe4a4c2dc2d2949e8a0e3225942c2e84558
R
5,494
146
#!/usr/bin/Rscript # plot umi/cell or gene/cell args <- commandArgs(); # print(args) dir <- args[6] Name <- args[7] suppressMessages(library(matrixStats)) suppressMessages(library(reshape2)) suppressMessages(library(Matrix)) suppressMessages(library(dplyr)) suppressMessages(library(data.table)) suppressMessages(libra...
4a10ac1b418f358f2202da9c2259b814202968f58ff07d0c5356d036703046d3
R
5,499
182
#!/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 clustered RData") parser$add_argument("-g", "--...
f82f648300a0fa46e9121bfd1fb049ff91506006b353f0764b383d3ef7dfb487
R
5,500
162
#------------------------------------------------------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...
fe34c4b05c85f8d97c499ff37a609516801ad2a362dd80d85b26239001174ee0
R
5,503
81
--- title: "An Introduction to the pandaR Package" author: "Daniel Schlauch, Albert Young, Joseph N. Paulson" date: "2016-05-01" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{An Introduction to the pandaR Package} %\VignetteEngine{knitr::rmarkdown} \usepackage[utf8]{inputenc} --- ## Introduc...
5595931404c6b9516d833b0ba2cf2146507fc28b3defbead56ce9f3330903943
R
5,506
179
#' get plot data #' #' @param venn a Venn object #' @param nsets This parameter will be set automatically. #' @param shape_id apply filter to internal shapes. i.e. shape_id = "601" #' @param type apply filter to internal shapes. i.e. type = "polygon" #' #' @details #' #' This function will conduct set operations and co...
9ead2ef9290036402a91443a9d628600d82aa02205ef2e775d308579fb427e64
R
5,507
122
## ============================================================================ ## LEfSe (Linear discriminant analysis Effect Size) differential abundance ## - Builds a microeco microtable from feature counts, taxonomy, and metadata ## - Runs LEfSe with the standard Kruskal-Wallis screen + LDA effect-size step ## - Exp...
e7cdef432e119ebd66d788f78a6f5160b3c7a6c245c08dd5762d017b580cf607
R
5,510
245
--- title: 'Epilepsy 10x samples - preprocess for WGCNA' author: "Jon Thompson, Pers lab" date: "`r Sys.time()`" output: html_notebook: df_print: paged number_sections: yes toc: yes toc_depth: 3 toc_float: yes html_document: df_print: paged --- # Setup ## reference conos vignette https://github.com/hms-dbmi/...
1e8b09ba2cf1fa3cf18d931d44d70dfd246a290164e2cc29e6d0c9c77d76352b
R
5,511
230
--- title: "Prepare scRNA-seq data from Yost et al. 2019" 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 setu...
68a2f521c1344fdf1454f1788d30b8696996915ed74525bd602b3484c8e586ff
R
5,514
142
###基因集打分总----------------- ###活性基因集-------------- Neuronal_activation <- toupper(c("Arc", "Btg2", "Coq10b", "Crem", "Dusp1", "Dusp5", "Egr1", "Egr3", "Fbxo33", "Fos", "Fosl2", "Gadd45g", "Gmeb2", "Grasp", "Junb", "Nr4a1", "Nr4a2", "Nr4a3", "Per1", "Rgs2", ...
b7ef230a71e01471334d4a797470ff901fe3c865595bea230e8c71f4821bc8af
R
5,516
143
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Cmd + Shift + B' # Check Package: ...
ac8a5002cb3b06ca88af32cc1fe462cbcb44b0a0cac671453ece73fc9327d02d
R
5,518
141
# ============================================================================= # 06_run_fMRI.R # fMRI connectivity ~ Age*EXT + covariates: lm per edge, bootstrap CI, omega², heatmap # ============================================================================= # # For each between-network connectivity edge, fits lm(e...
9b7180e6e99e20c23eec8f919ec66e9e281fdeb4b7438a5a2705850d93ee9b84
R
5,519
136
# ============================================================================= # 04_run_clinical.R # Clinical models: GFAP and NfL ~ Age*EXT + covariates (Gamma GLM, log link) # Interaction plots, Johnson-Neyman, regression tables, post-hoc power. # =====================================================================...
c45513e02a81cc196fbb76fb47ec1cf73ac99acaba1ac82f454411b63f3324de
R
5,521
120
#' @title tsneAUC #' @description Calculates the t-SNE based on the regulon activity. (i.e. binary/continuous AUC) #' @param scenicOptions Fields used: #' @param aucType "AUC" for continuous AUC, or "Binary" . By default it uses the value in \code{getSettings(scenicOptions,"defaultTsne/dims")} #' @param nPcs Number of...
c6996038d5fcbbea1c84d8236d845bf1ae0f4e81bd1c3c094f1683913b45ed5e
R
5,522
149
#' @export GetPagoda <- function (cm, n.cores = 30, clustering.type = "leiden", embeding.type = "tSNE", verbose=TRUE, n.pcs=100, distance="cosine", trim=5, n.odgenes=1000, graph.k=30, od.genes=NULL, clustering.resolution=2, build.graph=TRUE, var.scale=TRUE, min.dist=0.5, sp...
1288cf428d9fd5dcc334a5814bc1b36a47c1354d05bd8190a98d1666db7e24ec
R
5,523
135
library(ggplot2) library(here) library(readr) library(readxl) library(tidyr) library(magrittr) library(conflicted) library(dplyr) library(org.Mm.eg.db) #from bioconductor library(GO.db) #from bioconductor conflicted::conflict_prefer("select", "dplyr") conflicted::conflict_prefer("filter", "dplyr") conflicted::co...