sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
a7093bf1bb8625da09900b76c577bbaf40375392b2e67f1d8e5a757bbaafac16
R
5,767
156
# ------------------------------------------------------------------------------ # Title: Construction of Co-Expression Network (SigNET) # Author: Yiran Song # Date: March 18, 2025 # Description: # This script constructs a co-expression network using transcription factor (TF) # modules derived from Commot gene regulato...
d30cb87392e3c8ed761b98caf0454343a9a26e3dc9072557355de3a7857a677c
R
5,774
183
--- title: "Using fgsea package" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Using fgsea package} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- `fgsea` is an R-package for fast preranked gene set enrichment analysis (GSEA). This package allows to quickly and accurately c...
792129b755a3d549a40f9eafe461fa69ea99d1da9b0abaef9bbfcbbcb774e421
R
5,795
109
#' Performs Platform Effect Normalization: #' #' Estimates bulk cell type composition and uses this #' to estimate platform effects and normalize cell type proportions #' #' @param RCTD an \code{\linkS4class{RCTD}} object after running the \code{\link{create.RCTD}} function. #' @return Returns an \code{\linkS4class{RCT...
2c4ec925c627ff2b5493565dd9a1fe5ca25c41914891b01278f4d2fcd5d3c166
R
5,796
149
#' By Anoushka Joglekar 2019. Edited 04/2020 #' Added layer to regular exon level analysis script where hierarchical testing is allowed. #' Input args: 1. file.tsv with Exon-Gene-Inclusion-Exclusion counts #' args 2,3,4,5 (tsv from each line of config file): #' --- Shorthand comparison1 of interest, #' --- comma separa...
35fa1f1a3af3f57fb6e432826f0c00a7d7a86f324ced2b62fe88b19182cfc1d1
R
5,798
148
--- title: "Statistical analysis (supporting information)" output: word_document: reference_docx: template.docx html_document: df_print: paged --- <font size="4"> Brent J. Raiteri <br> 2025-12-12 </font> ## Rate of agreement Fixed effects were fitted using a linear mixed-effects model with and...
51bd556637b2ca572cd6a41628e612d37d760b477bba8062d94590a0ff2a49c3
R
5,819
148
--- title: "Statistical analysis (supporting information)" output: word_document: reference_docx: template.docx html_document: df_print: paged --- <font size="4"> Brent J. Raiteri <br> 2025-12-12 </font> ## Rate of agreement Fixed effects were fitted using a linear mixed-effects model with and...
fe132ebaee23e17e6bf610f6956062151ff161c3816f3be32d98a7dd6c398233
R
5,857
147
--- title: "Geographic Components" bibliography: "biblio.bib" link-citations: true output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Geographic Components} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdown} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment ...
50cabead42ea2c5bfbbdd29e8c32511b026c025d3df98ec57e4ea8a84785c11e
R
5,977
201
library(reactome.db) library(org.Mm.eg.db) library(data.table) library(fgsea) rnk.file <- "./inst/extdata/naive.vs.th1.rnk" gmt.file <- "./inst/extdata/mouse.reactome.gmt" ##### Loading pathways from Reactome mouse.universe <- keys(org.Mm.eg.db, "ENTREZID") # Selecting reactome gene sets pathways <- na.omit(select(...
7627df24167d11dea8935f9fe5f81118e2fb657eb8d61d46ca83f5954e39976c
R
6,095
146
#' Simple overrepresentation analysis based on hypergeometric test #' @param pathways List of gene sets to check. #' @param genes Set of query genes #' @param universe A universe from which `genes` were selected #' @param minSize Minimal size of a gene set to test. All pathways below the threshold are excluded. #' @par...
0d56edae24a114db366b501e5b8806350ed68ef53d9fd41ae246968b96acb93f
R
6,105
109
# install_packages.R # Auto-generated from r_packages.csv options(repos = c( CRAN = "https://cran.rstudio.com/", BioCsoft = "https://bioconductor.org/packages/3.22/bioc", BioCann = "https://bioconductor.org/packages/3.22/data/annotation", BioCexp = "https://bioconductor.org/packages/3.22/data/experiment" )) #...
0d16eceb9476f4ecc61eeb4a204dda2926a3e8c7c96324970c80f4a09421afe9
R
6,197
191
#!/usr/bin/Rscript --vanilla ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
af9875a5631cbc6c90f4bb9a7e293e9505237514279175c216f01a7adc8bddb4
R
6,227
125
#example:"c:\Program Files\Microsoft\R Open\R-4.0.2\bin\Rscript.exe" proteinGroupsPD.r "F:\promec\Animesh\Kathleen\PCA\Exosome_Shotgun_190118_KATHLENN_HCT_R5.xlsx" Sys.setenv(TZ="GMT") print("USAGE:Rscript proteinGroupsPD.r <complete path to proteinGroups.txt file>") print("default values: Abundances.Scaled.") #parse ...
c802e170540376d977cb25359a31890e51bbfd12f2a06617daf2d63323dbc69a
R
6,229
187
getwd() setwd("C:/Users/u0171728/Downloads/comparative") suppressPackageStartupMessages({ library(data.table) library(dplyr) library(tidyr) library(stringr) }) genes_of_interest <- c("ATP13A2","ATP13A3","ATP13A4","ATP13A5") drop_low_quality <- TRUE species_files <- list( human = list(genes="...
0ac92dee403d17889483c9ffc7406a69003f3277993b0e9807c2443b6f3fbab1
R
6,236
208
--- title: "Reproduction of Figure 2" output: html_document: df_print: paged toc: true toc_depth: 2 toc_float: yes number_sections: yes code_folding: show --- # Setup and Libraries ```{r message=FALSE, warning=FALSE} required_packages <- c("readr", "ggplot2", "dplyr", "stringr", "svglite", "...
775e068720defd167d220013e6ba5f5e9f5f8e21867603d2c7c6861da31858a3
R
6,263
131
remap_celltypes <- function(cell_dict_file, cell_ident) { cell_type_dict <- read.csv(file=cell_dict_file, header=TRUE, sep=",") cell_type_dict$Name <- factor(cell_type_dict$Name) rownames(cell_type_dict) = cell_type_dict[,'Cluster'] true_type_names = lapply(cell_ident, function(x) cell_type_dict[as.character(x)...
fc20eebe20b7a4fcea9cc5028e6f4dae8460ad41e90a9f65756cd40b7b0110b4
R
6,266
331
#!/usr/bin/env Rscript # ============================================================================== # 10d. Selected TF expression on Seurat UMAP embeddings # # Description: # This script visualizes expression of selected TF genes on existing Seurat UMAP # embeddings. These panels display TF gene expression and mus...
7246fb59d40d88a2c369a12e9063c1bab6b572a96b4ed9c039ecdddf94d53935
R
6,313
135
#install.packages(c("readxl","writexl","svglite","ggplot2"),repos="http://cran.us.r-project.org",lib=.libPaths()) #..\R-4.5.0\bin\Rscript.exe .\proteinGroupsQC.r "L:\promec\TIMSTOF\LARS\2023\230310 Sonali\combined\txtNoDN\proteinGroups.txt" "L:\promec\TIMSTOF\LARS\2023\230310 Sonali\combined\txtNoDN\SurvivalUpdates_ot...
3d20437e8999231d72d498b9a1e9d938dc4073b30a9c12e4d84865756766ed18
R
6,321
106
#C:\Users\animeshs\R-4.4.0\bin\x64\Rscript diffExprPhos.r L:/promec/TIMSTOF/LARS/2024/241118_Deo/phos/combined/txt/ Bio #BiocManager::install("PhosR") args = commandArgs(trailingOnly=TRUE) print(paste("supplied argument(s):", length(args))) print(args) inpD <- args[1] #inpD <-"L:/promec/TIMSTOF/LARS/2024/241118_Deo/pho...
3ccc613043eb5ba0b5b515bd66655f7abe598b5805dad4ddc839879a3468d4d0
R
6,343
188
--- output: html_notebook: fig_caption: yes toc: yes runtime: shiny --- ```{r msms} #inpF <- "L:/Animesh/IdaJ/Bafh1resMQ/msmsScans.txt" #data <- read.delim(inpF, sep = "\t", header = T) #dataID = data[, grep("Identified", names(data))] #summary(dataID) ``` ```{r protein} #inpF <- '../../comb...
81f69532600565404955bb19801c6c55d42aae68e27a0b788ba7024fe4c34807
R
6,403
118
#' constructor of \code{\linkS4class{Reference}} object #' @param counts A matrix (or dgCmatrix) representing Digital Gene Expression (DGE). Rownames should be genes #' and colnames represent barcodes/cell names. #' @param cell_types A named (by cell barcode) factor of cell type for each cell. The 'levels' of the fact...
f4a92d6e5bc2c8cb8c3d730b0e512e6bbaa50a2a08cd7ca02bad2a153022f4cd
R
6,463
178
## By Anoushka Joglekar 2019. Edited 04/2020, 07/2020 #' @import dplyr #' @importFrom magrittr %>% `%>%` <- magrittr::`%>%` args <- commandArgs(trailingOnly=TRUE) ### Initial set-up numIsoPerCluster <- data.table::fread(args[1]) ## Need to make the package seamless # enough that it takes the correct #file ...
6913306dc16e62b29c07cb646d182c9ed8ac3cb1432239db178322e20b009bf7
R
6,526
158
dtrain <- xgboost::xgb.DMatrix( data.matrix(iris[, -1L]), label = iris[, 1L], nthread = 1 ) fit <- xgboost::xgb.train(params = list(nthread = 1L), data = dtrain, nrounds = 50L) x <- shapviz(fit, X_pred = dtrain, X = iris[, -1L]) x <- c(m1 = x, m2 = x) test_that("plots work for basic example", { expect_s3_class(s...
894bfa4d5211c1351f95a955b006b6a8437b3deedf113c15cfd8e7458bab549e
R
6,553
140
#' Distribution map generation of proteins #' #' Distribution map generation of proteins #' #' @param df the quantitative protein result #' @param location the original location information #' @param target_name the protein in the map #' @param limit a logical value, if setting the value limits of protein abundance/rat...
9f6bea63553cab3b86f316bc51a3af6c396f23f137a6f4efc81fa15ad6f5b091
R
6,554
270
# ============================================================================== # 08d. Optional ClusterGVis pseudotime heatmap # # Description: # This optional script reproduces the ClusterGVis-based visualization workflow. # ClusterGVis performs a separate k-means clustering of the smoothed pseudotime # expression ma...
7bfa6fda956cfd74bccbd15f1fd2ed3214ccb4da7a4cc6fda92ab1511fa6fb15
R
6,600
213
# =============================== # Clinical plots + 3-cluster association tests # =============================== library(dplyr) library(tidyr) library(ggplot2) library(purrr) # ------------------------------- # 1) Input: metadata table # ------------------------------- # Assumes you have a data.frame called `metada...
c2a3b62221fa36a7c4d53fb104be725a295ae817a49722a57b793077c7f5be33
R
6,606
194
#' SHAP Interaction Plot #' #' @description #' Creates a beeswarm plot or a barplot of SHAP interaction values/main effects. #' #' In the beeswarm plot (`kind = "beeswarm"`), diagonals represent the main effects, #' while off-diagonals show SHAP interactions (multiplied by two due to symmetry). #' The color axis repres...
5cfb6cc8c4e0b6744ff577e09a24b0c5aef9e59d65315109b2b459b4f3461035
R
6,610
310
#install.packages("iq") suppressPackageStartupMessages({ library(data.table) library(iq) library(ggplot2) }) ############################################################ # Input files ############################################################ #wget https://ftp.pride.ebi.ac.uk/pride/data/archive/2014/09/PXD0002...
8ff9bbb50288266cb31af82f17298e825a353484eb6d9d9a8f7eca454ce20c62
R
6,631
279
--- title: "Farmand et al 2026 - NeuroFit RCT Clinical and Cognitive Outcomes Analysis Examples" output: html_document --- ```{r setup, message=FALSE, warning=FALSE} library(readxl) library(dplyr) library(tidyr) library(glmmTMB) library(nlme) library(ordinal) library(DHARMa) library(emmeans) library(ggplot2) ``` ## 1...
1f5e9de32baf11ecfa876d9c4e578bf66a1fd6354af8191ec9d413fc693963cb
R
6,649
200
# # Functions that prepare data for TU HMMs # # Details about data transformation: # # - per chromosome structure # - step size # - auxiliary position vector (in case of transformative HMM) # - strand # - chrom # - optional mappability track transform_data <- function(reads, reverse = FALSE, unmap = NULL) { positio...
8eb570acaf226b0f58cdf7cece808dd960897fdfef0a943d514c622b91f8d415
R
6,653
173
library(tidyverse) library(ggpubr) library(grid) # Define all the necessary variables analysis_dir = "/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230906_test" out_dir = "/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230906_test" data_seg <- read.csv(file.path(analysis_dir, "bundle_analysis.csv"), sep = ',') # filte...
9511c50d6faf982bd760492772856e84ab085d3905bdaac10db5ae37a3c689c2
R
6,674
168
#!/usr/bin/Rscript --vanilla ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
b5ef856309d4bc341eeeb264bee57785012fc3327d8d62b0bdb7870b6623fb08
R
6,708
171
library(tidyverse) library(ggpubr) library(grid) # Define all the necessary variables analysis_dir = "/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230906_test" out_dir = "/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230906_test" data_seg <- read.csv(file.path(analysis_dir, "branch_analysis.csv"), sep = ',') # filte...
b766e4428e4263d3a02532595f1cbd2082254324fba5581beaf809754dad0ec4
R
6,716
237
# Load required package #fit learning glm library(lme4) library(dplyr) df <- df %>% mutate( group = case_when( group_verbal %in% c("ASD", "ASD (low verbal)") ~ "ASD_all", group_verbal == "TD" ~ "TD" ), group = factor(group) # Make sure it's a factor ) # Assuming your data frame is called `d...
2b47c1fdea991f030e47c74ad8efffe52a14f1476fa2233e4d6445fa8bef9a49
R
6,782
202
--- title: "Lifestyle Factors and Whole-Brain Atrophy: Mixed-Effects Analysis" output: html_document: toc: true toc_float: toc_collapsed: true toc_depth: 3 theme: paper --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, message = FALSE, warning = FALSE) ``` # Overview This scr...
c6302404ebdcbbfd4a081db52f6d769f0211ee7cd2565713833dde0c9acab3f5
R
6,803
116
#Rscript proteinGroupsQC.r "L:/promec/TIMSTOF/LARS/2023/230310 ChunMei/combined/txt/proteinGroups.txt" "Intensity." "L:/promec/Animesh/Mathilde/Groups.xlsx" "sample" #mkdir -p /home/animeshs/promec/promec/TIMSTOF/LARS/2023/230310\ ChunMei/combined/txt #rsync -Parv ash022@login.nird-lmd.sigma2.no:TIMSTOF/LARS/2023/2303...
ab06a1f7606fa18ae149e2e1c8622c33f8eb68198521e0fe884f126eec2d9fed
R
6,819
227
# Bootstrapped learning curve fit (ASD vs TD) for hard phase # Model: y = A0 + (P - A0) * (1 - exp(L * trial)) suppressPackageStartupMessages({ library(data.table) library(dplyr) library(tidyr) library(purrr) library(minpack.lm) }) # Load data load("/Users/doq/RCode/preprocessed_data.RData") # Prepare data...
11decb98b5954c78351f2ef0ffff86420614d0fe4cfbcc211e2e3f2529cc7f61
R
6,828
189
library(tidyverse) library(ggpubr) library(ggplot2) work_dir = "/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230527_new_analysis/analysis_output/" setwd(work_dir) data_read <- na.omit(read.csv(file = "tomogram_summary_averaged.csv", sep = ',')) data_read = data_read[-c(2),] data_read <- data_read %>% separate("to...
85bd8433d22f681d4b8cdd2def7def33b0e1f2e20d9694a4e3900afad79c6fe1
R
6,888
195
#!/usr/bin/Rscript --vanilla ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
e3056a6a50871fbaf16d210e887cb230fe866621e12d91ea26ad79912a8985df
R
6,924
163
#!/usr/bin/Rscript --vanilla ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
dfb0a9aaec66e4398f5cdb1075f21cc0a0a1ee6db14b9719cf048a74c0aa2e20
R
6,942
209
#' Sets Precomputed Probabiliites as Global Variable #' #' Given a matrix, \code{Q_mat}, or log P(y|x), under the Poisson-Lognormal model. #' Sets this as a global variable for fast computations in the future. #' #' @param Q_mat_loc Matrix of precomputed probabiliites, as previously computed by \code{\link{get_Q_mat}} ...
194d6d8e41246666cedb73f5496575b705205ed6a8f484349f002d9197c522a0
R
6,946
278
# ========================================================== # 04_build_clinical_core_dataset.R # Purpose: Build clean longitudinal clinical core from ADNIMERGE2 R data files # ========================================================== library(tidyverse) library(janitor) library(lubridate) library(openxlsx) ...
d43746b4ee698c6a549f5d03bb8025e5ba5ccb5189f1fcbe0c474ea174c316a8
R
6,964
244
#' 2D SHAP Dependence Plot #' #' @description #' Scatterplot of two features, showing the sum of their SHAP values on the color scale. #' This allows to visualize the combined effect of two features, including interactions. #' A typical application are models with latitude and longitude as features (plus #' maybe other...
b22ed0fea9d1a8ff1b6292d31823db62a73e105b9d63ef795b3cde476973b987
R
7,038
155
#git checkout fe5f9e92f3fe5ca0c75e9d8acfd211feb7358066 diffExprProlfqua.r #Rscript diffExprProlfqua.r #install.packages("BiocManager") #BiocManager::install("SummarizedExperiment") #install.packages("devtools") #remotes::install_github('fgcz/prolfqua', dependencies = TRUE,force = TRUE) #https://fgcz.github.io/prolfqua/...
e5b963398dc67324762c54b3f84caab565103863f40a9b89da9a3bb4e3f67fe7
R
7,121
138
library(Matrix) library(spacexr) library(doParallel) library(ggplot2) library(xlsx) library(dplyr) library(fields) library(stringr) library(GSA) # Load in spatialRNA data and Reference data pwd = getwd() datadir <- paste0(pwd,'/data/tumor','/') resultsdir <- paste0(pwd,'/results/ResultsTumor','/') # Load RCTD which c...
e3c1f817a24508df3a54ca546ce9dbbaebe14d6b7946051bcbb4abf9bf8bad5f
R
7,172
216
#Clear working space rm(list = ls(all.names = T)) # Load packages if(!require(rstudioapi)){ install.packages("rstudioapi") library(rstudioapi)} if(!require(ggplot2)){ install.packages("ggplot2") library(ggplot2)} if(!require(ggsci)){ install.packages("ggsci") library(ggsci)} if(!require(qvalue)){ install...
d7a2140268a3bd0ce45a470b20d63c58d011efb158a37d47bee1267d50f3eb7a
R
7,195
227
dtrain <- xgboost::xgb.DMatrix( data.matrix(iris[, -1L]), label = iris[, 1L], nthread = 1 ) fit <- xgboost::xgb.train(params = list(nthread = 1L), data = dtrain, nrounds = 50L) x <- shapviz(fit, X_pred = dtrain, X = iris[, -1L]) test_that("plots work for basic example", { expect_s3_class(sv_waterfall(x, 2), "ggp...
7f6424907ed1ab10996c3ade1ea4a91c6af490867dba36bfd847fecf8141d7af
R
7,208
221
# Figure 1: Single-cell Analysis of Integrated Ventricles ----------------- # 1. Setup ---------------------------------------------------------------- # Load required libraries library(Seurat) library(dplyr) library(ggplot2) library(clustree) library(clusterProfiler) library(enrichplot) library(org.Hs.eg.db) library(...
8f1a99b95c4f4d78b2f1c31110e04cc29872d5a45d5ca1ada6457a131c7b89ec
R
7,271
360
#!/usr/bin/env Rscript # ============================================================================== # 10e. Package TF-analysis outputs into verified RDS files # # Description: # This script creates a compact TF-analysis result bundle and optionally stores # TF-analysis references in the misc slot of each input Seu...
7492049ba0d54ce5144cfb04de93e37d8665c232a8aeca4e8ce1ca1f5835c6ea
R
7,283
135
sim_CSIDE <- function(de_ground_truth, REPLICATES, de_gene, ref, N_samples, nUMI, common_cell_types, UMI1, UMI_tot, sigma_init, puck, cell_type_info, beta, UMI_vect, other_methods = F,region_orig = NULL, subset_cells = NULL, regularize_expr = F) { puck_mod <- puck p_res...
d0d5e98f82c20bd3a8c04584f8474ad55894837bb2e99a58c285ce46e9b06db7
R
7,289
187
#!/usr/bin/Rscript --vanilla ################################################################################## # # MIT License # # Copyright (c) 2025 Kevin Rockenbach, Agnieszka Golicz # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
11ca1c751c3ffa7c4c1d025024c4e7cc1e9f6c0cfd1381f4608863bbc2b83f88
R
7,416
152
library(Seurat) library(dplyr) library(ggplot2) library(ggsci) library(ggpubr) library(patchwork) library(umap) library(pheatmap) setwd("/mnt/alamo01/users/gbb/NDMG_snRNA/seurat/metacluster/downsample/") snRNA <- readRDS("snRNA_5k.rds") df <- snRNA@assays$RNA@scale.data cor_df <- cor(df) Anno <- as.data.frame(cbind(s...
3f53fe6ee9e7ff1225db9e0af65591cd242312427bb5b609cf54ee712ddeb437
R
7,458
166
--- output: pdf_document: default html_document: keep_md: yes word_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, cache = T, results = 'hide') library(spacexr) library(Matrix) library(devtools) library(ggplot2) library(ggpubr) library(reshape2) lib...
02acf39d0f097c3bef2a9aa6f9d532912379f06d59524176ba1d8921afb228f0
R
7,636
180
--- output: pdf_document: default word_document: default html_document: keep_md: yes --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, cache = T, results = 'hide') ``` # CSIDE on the Slide-seq J20 Hippocampus ### Load in CSIDE Results and calculate significant genes ...
3bb29c52f6fd6529bb70cecef30ad17f877fad74b4d8d0738148a8b4d8cac369
R
7,789
257
```{r data} data<-readxl::read_excel("C:/Users/animeshs/GD/Prediction analysis.xlsx", sheet=1) data$Class<-"Remission" data<-subset(as.data.frame(data), select = -c(1:7) ) summary(data) ``` ```{r data2} data2<-readxl::read_excel("C:/Users/animeshs/GD/Prediction analysis.xlsx", sheet=2) data2$Class<-"Relapse" ...
11455b0c5b515629ea23c4d07426e732b9fb1c41f345148f726836e266095fe3
R
7,800
202
context("GSEA stat calculation") test_that("calcGseaStats works", { stats <- 10:-10 sample <- 1:5 expect_equal(calcGseaStat(stats, selectedStats = sample), 1) sample <- 16:21 expect_equal(calcGseaStat(stats, selectedStats = sample), -1) sample <- (1:5)*2 expect_equal(calcGseaStat(stats, s...
7a075d5866fc01d3e21ade0e1320458fddd5c50e05730d59a1bb5c5e6ac642b8
R
7,845
143
--- title: "Applying CSIDE to Spatial Transcriptomics Data" author: "Dylan Cable" date: "December 15th, 2021" output: rmarkdown::html_vignette: keep_md: yes pdf_document: default html_document: keep_md: yes vignette: | %\VignetteIndexEntry{differential-expression} %\VignetteEncoding{UTF-8} %\Vignett...
5b2dc08e05ee5d226aa0d0b5f3a046fb45d75a21e9a1a21ffb492f0c2878207b
R
7,856
144
#Rscript proteins.r "C:/Users/animeshs/GD/Pseudomonas/140605_Pseudomonas_O1_K0K6-(2)_Proteins.txt" SILAC #parse argument(s) print("USAGE:Rscript proteins.r \"<complete path to *_Proteins.txt file>\" <SILAC if channel ratios available>") print("default LFQ/abundance(scaled)") args = commandArgs(trailingOnly=TRUE) print(...
d98284357d8d5fafed276260ff4c487aef3d63c3fa88cb0e0955cdcef24477b2
R
7,886
187
# ------------------------------------------------------------------------------ # Title: Figure 6 - Summary of Perturbation Results Across Modules # Author: Haofei Wang # Date: March 24, 2025 # Description: # This script visualizes the effect of perturbations using dot plots and module # summary scores. It uses fold-c...
0ee4a1350a25d6598dd5d7448b863c02dd9a6d2009f287188bb76950f2ef93c2
R
7,923
137
#functions for processing data after RCTD is fit to the data # Collects RCTD results gather_results <- function(RCTD, results) { cell_type_names = RCTD@cell_type_info$renorm[[2]] barcodes <- colnames(RCTD@spatialRNA@counts) N <- length(results) weights = Matrix(0, nrow = N, ncol = length(cell_type_names)) we...
e9279ff79cb3d44f43ac122e56d763c4b338d5a0fa316a6a9eb5a46f9db2b55f
R
7,923
172
#' spacexr: an R package for assigning cell types and cell type specific differential expression to spatial transcriptomics data. #' #' @section Running RCTD: #' #' To get started, create a \code{\linkS4class{SpatialRNA}} object (called \code{puck} here) for the #' spatial transcriptomics data and a \code{\linkS4class{...
c63c05ff1715cc4d6a0b8c692e2c3ec6b7354427b4faeed2314a810db45850f5
R
7,969
46
library(clusterProfiler) library(org.Mm.eg.db) # Define the list of genes # ECCITE #gene_list <- c('KLRD1', 'TERT', 'AC098973.2', 'FABP6', 'TFPI2', 'KLHL31', 'SCGB1B2P', 'NXPH3', 'CCDC160', 'LRCOL1', 'CD207', 'AL590708.2', 'CALML5', 'CD1C', 'NUTM2B', 'C21orf62', 'LINC00346', 'C22orf23', 'KRT19', 'BTNL2', 'RP11-159H22....
6969e24844b2e8186f5891a914505293f61ff3f4ad1cbc9f0279be2a018f54d6
R
7,975
178
#data#### #c:/Users/animeshs/R/bin/Rscript.exe diffExprTestT.r L:/promec/TIMSTOF/LARS/2021/November/SIGRID/combined/txtNoNQd/ group inpD<-"L:/promec/TIMSTOF/LARS/2021/November/SIGRID/combined/txtNoNQd/" ttDF<-read.csv(paste0(inpD,"proteinGroups.txtLFQ.intensity.16WT8hWTctrl0.050.50.05grouptTestBH.csv.sort.combined.csv"...
7cb91afc3415aa2a2e609cd897771ff3d70b2ec8870b2cc858afb7fb930aaadd
R
7,979
167
#=============================================================================# # ASEsampleDataReadCounter_OutputProcessing.R # # # # Version: 1.3 # ...
88331cf7741f88afa3d406c1757ff93f2521ad0073e5c87283f3bcc53d21349f
R
8,044
131
#C:\users\animeshs\R-4.4.0\bin\Rscript.exe diffExprTestTmatrixXL.r "L:\promec\TIMSTOF\LARS\2022\februar\Sigrid\combined\txt\Copy of Copy of combined with explanatory headings_2 (version 1).xlsx" "EQ:ES" "CA:CC" #C:\users\animeshs\R-4.4.0\bin\Rscript.exe diffExprTestTmatrixXL.r "L:\promec\TIMSTOF\LARS\2022\februar\Sigr...
aec239458d8e5b040ace1fd11ffa637c8211c81a54ac8c6b764be53f2d0cb992
R
8,061
306
--- title: "Using 'shapviz'" bibliography: "biblio.bib" link-citations: true output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Using 'shapviz'} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", wa...
624abf9d9ecaa102b209abb448fb36a0e639147bc70a28434504dc8d63f03eca
R
8,126
164
#..\R\bin\Rscript.exe diffExprANOVA.r "L:\promec\TIMSTOF\LARS\2022\august\220819 Toktam\combined\txt\proteinGroups.txt" "L:\promec\TIMSTOF\LARS\2022\august\220819 Toktam\combined\txt\Groups.txt" Sample options(nwarnings = 1000000) summary(warnings()) print("USAGE:<path to>Rscript diffExprANOVA.r <complete path to prote...
c370f10f0264d4c754d6db384ba9cde16c7c63c033d1830c1930fa7d7a1bd32b
R
8,190
267
##import packages library(readxl) library(tidyverse) library(ggfortify) library(ggplot2) library(factoextra) library(cluster) library(DESeq2) #install.packages("ashr") library(ashr) #BiocManager::install("EnhancedVolcano") library(EnhancedVolcano) #BiocManager::install("clusterProfiler") library(clusterProfiler) #Bi...
9bb3401fe4614ad4211731799e79c8c9c3e1664e048812650d5ba2ad41ff21b6
R
8,202
140
--- title: "Applying CSIDE to Spatial Transcriptomics Data: Smooth spatial patterns in MERFISH" author: "Dylan Cable" date: "December 21st, 2021" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{merfish-nonparametric} %\...
57e8aa849144e9c1529cb062317d2964b1762f818db25d19e7104443edb1d7f8
R
8,203
147
#curl -O "proteinGroups.txt" "https://zenodo.org/records/14557756/files/proteinGroups.txt?download=1" #Rscript mapID.r "proteinGroups.txt" 1 76 81 uniprot ensembl max org.Hs.eg.db suppressPackageStartupMessages({ if (!requireNamespace("AnnotationDbi", quietly=TRUE)) stop("AnnotationDbi required") }) library(Annotat...
e6076f1a010c9579677d7ae1fdb5cc9716b71cec280695417a544b8aed201b47
R
8,298
188
--- title: "plot_fig5" author: "LGrabot" date: "16/10/2024" output: pdf_document: default html_document: default --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(lme4) library(ggplot2) library(reshape2) library(nlme) # function sem sem <- function(x) sdt=sd(x)/sqrt(len...
4dbe6c0e7d2a771414e33c365d823bb854e09cca639cc1c85fae3218686b9ba1
R
8,358
216
align_images_now <- function(thresh_im_name, puck_im_name, use_cropped = F, pre_cropped = F, thresh = 150, thresh2 = 150) { samples <- list.files(pattern = "^Hippo[1-6].tsv.gz", path = system.file("extdata/counts", package = "STutility"), full.names = TRUE) spotfiles <- list.files(pattern = "^alignment_table_Hippo[...
8ae5640b349df1e00c55fb4634d2fd58bafab0741a8efe920efe7a3eaa2620ef
R
8,381
155
--- title: "Applying CSIDE to Spatial Transcriptomics Data: Cell-to-cell interactions" author: "Dylan Cable" date: "December 19th, 2021" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{CSIDE-celltocell-interactions} %\V...
8ebbd99ec51233376d54dafd805c72afadf1d7f0c297fd517ac9d92a6d7fc5da
R
8,381
133
#F:\R-4.3.1\bin\Rscript.exe diffExprRNAseqPlot.r "F:\seqRNA\count.thread6.txt" #setup#### args = commandArgs(trailingOnly=TRUE) if (length(args) != 1) {stop("USAGE:<path to Rscript.exe> diffExprRNAseqPlot.r <complete path to counts file> example: F:\\R-4.3.1\\bi...
673da9c57e13ca8b54d2e8b7e6d73b47107ac14e55fa2a1fd3f34e9a5e60fadd
R
8,450
190
library(Matrix) library(doParallel) library(ggplot2) library(dplyr) library(spacexr) library(GSA) library(xlsx) library(readr) # Data is obtained from the following article. # https://science.sciencemag.org/content/362/6416/eaau5324/tab-figures-data # https://datadryad.org/stash/dataset/doi:10.5061/dryad.8t8s248 merfis...
900cc0d91780ed831b7d5d0bd79de413e3dea9c9fe8de9c143ebccb2f7e9d5bf
R
8,489
155
--- output: pdf_document: default html_document: keep_md: true --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = T, warning = F, message = F, cache = T, results = 'hide') ``` # Unsupervised clustering on the Slide-seq cerebellum ```{r libraries} library(spacexr) library(Matrix) library(ggplot2) ...
bdf3ea7c2342668415bebae210a6a82c208751da1a07a94e8b68fb78cba0da2f
R
8,571
153
check_designmatrix <- function(X, f_name, require_2d = FALSE) { tryCatch({ X <- as(X,'matrix') }, error = function(e) { stop(paste0(f_name,': could not convert X to matrix using as(X,\'matrix\'). Please check that X is coercible to matrix, such as a matrix, dgCmatrix, or data.frame.')) }) if(dim(X)[1] =...
e51fb6b1de696a240eff732be1766ee918cc3276ce0f86f565232c9b09ca9172
R
8,581
157
--- title: "Applying CSIDE to Spatial Transcriptomics Data: Two Regions" author: "Dylan Cable" date: "December 19th, 2021" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{CSIDE-two-regions} %\VignetteEncoding{UTF-8} ...
75d1fc36262ae1ecc01f11817a2d819b0b2e65ee60aa99574929db11c9d71ba0
R
8,582
259
# # TUnit HMM Decoding (generic version) # blocks.to.coords <- function(blocks, step) { apply(blocks, 2, function(col) { # col = [start, end] c((col[1] - 1) * step, col[2] * step) # [bed start, bed end) }) } coords.to.bed6 <- function(chrom, strand, coords) { return(data.frame(chrom = chrom, start = coo...
44a5109b996ddcfcb6569a5ec37878e5c9d861b5ffc4320c54a9a419f9456a46
R
8,596
226
library(data.table) library(NbClust) library(mclust) ari_calcul_sampled <- function(myData, cpcs, isOptimal=FALSE, method_use='resnet', base_name='', maxiter=30, celltypelb='celltype', batchlb='batchlb' ) { if...
af32061e57f8000f0f4302509a05f95dbb435aebd37cf57bd72c8c2999c30027
R
8,597
154
--- title: "Applying CSIDE to Spatial Transcriptomics Data: Pathology interactions in Slide-seq" author: "Dylan Cable" date: "December 20th, 2021" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{CSIDE-pathology-interaction...
4f27105dc66559ae5e62cc3b9b2ff47b56f6352adce1950826b7b153fa64ad4e
R
8,628
153
--- title: "ASAP deep bulk RNAseq: Expressed ERVs" author: "Raquel Garza" output: html_document: df_print: paged --- In this notebook we define the ERV predictions (retrotector) that are expressed in our postmortem cohort of PD and control individuals. ## Load libraries and count matrices ```{r} library(data....
466932278d83d7579f5ee3882dc2b28a8f0f95a200c66c11d1414682824fbf45
R
8,715
207
#' Weighted Removal Index (WRI) functions #' #' Standalone implementation of the demographic weighting scheme described in: #' Romer, A. S., et al. 2026. Prioritizing removals of a highly cryptic invasive #' species using machine learning and demographic weighting. Ecological Applications. #' #' The logic in this file ...
8d103164a7da4c97c74dcec46b688af4ff19551c4057c97b8f05a51452a8f35c
R
8,720
242
#setup#### libLocal <- "/home/ash022/scripts/MM/rLib" library("infotheo", lib = libLocal) library("matrixStats", lib = libLocal) library("GenomicRanges", lib = libLocal) library("MatrixGenerics", lib = libLocal) library("SummarizedExperiment", lib = libLocal) library("lionessR", lib = libLocal) library("igraph", lib = ...
25687a595cbd1c1c508b7f75bc1bf07ec275888fbea70c89426a40d6d62ab56b
R
8,730
329
# ========================================================== # 11_repair_age_from_ptdemog.R # Purpose: Repair age using PTDEMOG.rda VISDATE + PTDOBYY # ========================================================== library(tidyverse) library(janitor) library(lubridate) library(readr) library(openxlsx) project_...
5b7f65f27b675b76e3f769bb83a54b524982208d7f5b5e1861eeb3ee9d732842
R
8,774
283
#Undershoot Analysis R file # Packages # Core Data Science & Plotting library(tidyverse) # Frequentist Modeling & Distribution Fitting library(fitdistrplus) library(car) library(permuco) # Bayesian Modeling & Post-Hocs library(brms) library(emmeans) ##########################Loading################...
477e0b8440e8f5ba5b06c51dae50335ed866122708504a632ec0de215a69c6f7
R
8,788
272
#Rise time assessment Script################################################ #Packages # Core Data Science & Plotting library(tidyverse) # Frequentist Modeling & Distribution Fitting library(fitdistrplus) library(car) library(permuco) # Bayesian Modeling & Post-Hocs library(brms) library(emmeans) #...
4588da72a5a9623dddbef19723419db73b2df4d942823dce613dfa14a511272a
R
8,887
294
#Dye-coupling analysis #Packages # Core Data Science, Dates & Plotting library(tidyverse) library(lubridate) # Frequentist Modeling & Distribution Fitting library(fitdistrplus) library(car) library(permuco) # Bayesian Modeling & Post-Hocs library(brms) library(emmeans) ##########################Lo...
c473770aac083c9adec41c59d229463d751e8bccdbaec8239c6f0d1783c5da85
R
8,890
110
--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` # Cell type-specific inference of differential expression for spati...
d93ff8313343170674e7feff82f4292e738ee3a30b09b8adf8b3ba6593416400
R
8,942
225
--- title: "Statistical analysis (main dependent variable)" output: word_document: reference_docx: template.docx html_document: df_print: paged --- <font size="4"> Brent J. Raiteri (assisted by Alain C. Vandal) <br> 2025-12-12 </font> ## Coefficient of variation in active torque (torque steadin...
bad24218b2bdb5b767267903a0382698275533fd5b7595b1f4e22e7112b57274
R
8,952
166
--- title: "ASAP deep bulk RNAseq: Expressed FL L1HS-PA3" author: "Raquel Garza" output: html_document: df_print: paged --- In this notebook we define the >6kbp L1HS-PA3 elements that are expressed in our postmortem cohort of PD and control individuals. ## Load libraries and count matrices ```{r} library(data...
82e1e4b930dbbfe26b8cce99ecb49b861da7b45a2c6dfe46fe927a35805491b4
R
8,956
223
choose_sigma_gene <- function(sigma_init, Y, X1, X2, my_beta, nUMI,test_mode, verbose = F, n.iter = 100, MIN_CHANGE = 0.001, MAX_ITER_SIGMA = 10, PRECISION.THRESHOLD = .01) { sigma_s_best <- sigma_init sigma_vals <- names(Q_mat_all) alpha1 <- NULL; alpha2 <- NULL; MIN_ITERATIONS <- 15 n.iter.tot <- 0 for(i...
fe61667207824ded9d27c5eef148bc7b3f77a3ab73483920e0c1cdc00d62adea
R
8,958
172
--- title: "Upregulated HERV visualization" author: "Raquel Garza" output: html_document: df_print: paged --- ## Overview This document explores the upregulation of HERVs in different brain regions, focusing on microglial cells. We identify significantly upregulated HERVs and analyze their genomic features, p...
06bc66e35282a403042b02f2ee508c749f9eab45ed830c4cbc69706e2b410dfd
R
8,989
227
--- title: "Statistical analysis (main independent variable)" output: word_document: reference_docx: template.docx html_document: df_print: paged --- <font size="4"> Brent J. Raiteri (assisted by Alain C. Vandal) <br> 2025-12-12 </font> ## Active torque Fixed effects were fitted using a linear...
90e7c3645696e789b00bc25a460daa1c5055b5ce23965cc89ae178359deb39b0
R
9,035
291
# ========================================================== # 05_biomarker_candidate_QA.R # Purpose: Inspect candidate biomarker files before merging # ========================================================== library(tidyverse) library(readxl) library(janitor) library(openxlsx) library(stringr) project_...
05aec44aea4e06cec54ae006e61c8324258bca514bdd29b91508b3bae2dbaef7
R
9,036
317
# ========================================================== # 08_model_readiness_QA.R # Purpose: Diagnose model readiness and fix baseline_dx / age problems # ========================================================== library(tidyverse) library(janitor) library(openxlsx) library(lubridate) library(readr) ...
4df115a96cde2c5e31677bee2e1c90873630626e1a539b098b5f6fa1ae3621c2
R
9,046
182
# R/4.1.0 library(DESeq2) library(ggplot2) library(plyr) library(reshape2) library(readr) ##===============All data=================== ### Load STAR count data and generate DeSeq2 data object ### Histone genes and small RNAs are filtered out. Only Genes with > 1 count in any condition are kept. ctr.r...
bd1bce0974a0df1f3f31de815a4dfd3e546823cd905fd6ea342d9a3416172832
R
9,186
270
#' SHAP Waterfall Plot #' #' Creates a waterfall plot of SHAP values of one observation. If multiple #' observations are selected, their SHAP values and predictions are averaged. #' #' f(x) denotes the prediction on the SHAP scale, while E(f(x)) refers to the #' baseline SHAP value. #' #' @param object An object of cla...
f29d30084e1b23dae6909dee46cad97e2afe55c2dd92e12a01fb358f3d6096ec
R
9,205
186
#"c:\Program Files\R\R-4.5.2\bin\Rscript.exe" diffExprTestCor.r "L:\promec\TIMSTOF\LARS\2026\260518_Sonali\DIANNv2P2.63.260612_140833.64.highacc\report.pg_matrix.tsv" "L:\promec\TIMSTOF\LARS\2026\260518_Sonali\DIANNv2P2.63.260612_140833.64.highacc\Groups.txt" "F..promec.TIMSTOF.LARS.2026.260518_Sonali.260518_Sonali_" "...
aeaf2ad12f6d9ede56dd01683a1ef718825f19be2e199ff1de10d4fa87d6f720
R
9,227
261
context("GSEA multilevel analysis") test_that("fgseaMultilevel works", { data(examplePathways) data(exampleRanks) set.seed(42) sampleSize <- 50 fgseaMultilevelRes <- fgseaMultilevel(examplePathways, exampleRanks, sampleSize=sampleSize, ...
8209f22b8d37cbe251a9d3311aaeb817aae411f27256691f6596d0dd5816617b
R
9,456
177
#Rscript.exe diffExprTestTphosphoSites.r L:/promec/TIMSTOF/LARS/2024/241118_Deo/phos/combined/txt/ Bio 1 #install.packages("ggplot2") #install.packages("svglite") #install.packages("limma") #install.packages("writexl") #install.packages("pheatmap") args = commandArgs(trailingOnly=TRUE) print(paste("supplied argument(s)...