sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
d6dbcef0a602990db6021f5c15a97defd14f94a2d13fb8c682cab7cabd0e1ece
R
3,750
105
library(data.table) library(dplyr) library(ggplot2) library(readr) library(tidyr) setwd("C:/Users/u0171728/Downloads/FACS") gene_for_both <- "Atp13a5" gene_non_myeloid <- NULL gene_myeloid <- NULL gene_non_myeloid <- if (is.null(gene_non_myeloid)) gene_for_both else gene_non_myeloid gene_my...
b5a68350dd3ed3a6b4966bc0661727dfe9524d4da02d6d9e17e3f3e58be4e2ad
R
3,753
128
rm(list = ls()) options(stringsAsFactors = FALSE) # ================================ # Standalone Script 1: Export WAIC to CSV # ================================ # ---------- 1) Settings ---------- # Set the directory containing the WAIC files base_dir <- "F:/PIT/model/EEGmodelHC/OCD/results/stan" # Set the output d...
2da9879bc32ad25d24fa713f3dcf1af6862d68f5f316bd5c63c4f0ee2af6080e
R
3,755
94
## ============== Step 4: Extract subject-level parameters (M9/10/12/13/14) ============== rm(list = ls()) suppressPackageStartupMessages({ library(rstan) library(data.table) }) # ---- Paths (updated to your new directory) ---- rootdir <- "F:/PIT/model/EEGmodelHC/HC" resultsdir <- file.path(rootdir, "results", ...
7bb567c910005612bb91559a7e1dac69dc990efeb0965cdb35e3204a9ba157b9
R
3,769
99
# =================== Top-level posteriors & summary (M9/10/12/13/14) =================== suppressPackageStartupMessages({ library(rstan) }) # ---- Paths ---- rootdir <- "F:/PIT/model/EEGmodelHC/HC" datadir <- file.path(rootdir, "results") resultsdir <- file.path(datadir, "stan") outdir <- file.path(result...
7c83a936595bd156112cabe14f2c42d27bd64409f3ace5e7679d4b04472159a6
R
3,842
143
library(sva) library(Seurat) library(magrittr) unintegrated <- readRDS("PATH_TO_OUTPUT/unintegrated.rds") layers <- Layers(unintegrated[["RNA"]]) print(layers) merge_layers <- function(obj, layer_pattern) { layers <- grep(layer_pattern, Layers(obj[["RNA"]]), value = TRUE) if (length(layers) > 1) { merged_matr...
ebe1321300fbde48db22b556a532538268c33b00ffdfde4a800c52f72d81f706
R
3,857
116
# ---- 0) Setup ---- suppressPackageStartupMessages(library(rstan)) # Your paths rootdir <- "F:/PIT/model/EEGmodelHC/HC" datadir <- file.path(rootdir, "results") resultsdir <- file.path(datadir, "stan") r2dir <- file.path(resultsdir, "R2") dir.create(r2dir, showWarnings = FALSE, recursive = TRUE) # Evalu...
55b8a687ed530130bdb41a78e610e64c348a180fac6f8e735b5e783fd8f56b72
R
3,888
76
#https://github.com/cox-labs/PerseusR ; on windows if "Error in utils::download.file(url, path, method = method, quiet = quiet, :cannot open URL 'https://api.github.com/repos/cox-labs/PerseusR/tarball/HEAD'" #options(download.file.method = "wininet") #install.packages("devtools") #devtools::install_github("cox-labs/Pe...
1662afffed604e3cfe3b9ab59c17a3e325942598e9cd0bac7844a925618f13d3
R
3,891
62
stickle=read.table('bacsticklebac.rmp.txt'); medaka=read.table('bacmedaka.rmp.txt'); branchiostoma=read.table('bacbranchiostoma.rmp.txt'); elephantshark=read.table('bacelephantshark.rmp.txt'); fugu=read.table('bacfugu.rmp.txt'); tetraodon=read.table('bactetraodon.rmp.txt'); zebra=read.table('baczf.rmp.txt'); u150k=c(1,...
fbc0cd45c7fd37c885c471c504aba100327f63baa94aa1b6d7e99b8ed4f288a0
R
3,910
74
#Rscript diffExprDEP.r #BiocManager::install("DEP") #BiocManager::install("MSnbase")#MsCoreUtils library(DEP) library(dplyr) #inputAnnotation <-"L:/promec/Animesh/Mathilde/Groups.txt" #annotation <- read.table(inputAnnotation,sep="\t",header=TRUE) #annotation<-annotation[annotation$Rem!="Y",] #annotationDep <- data.fra...
f778bb483eee9fbad50f50bc301129b21adf2dad85687a75ff88635851d62250
R
3,941
113
```{r data, echo = FALSE} inpDr <-"F:/promec/Elite/LARS/2018/november/Rolf final/Red/combined/txt/" inpDw <-"F:/promec/Elite/LARS/2018/november/Rolf final/White/combined/txt/" dataR <- read.delim(paste0(inpDr,"proteinGroups.txt"),row.names=1,sep="\t",header = T) dataW <- read.delim(paste0(inpDw,"proteinGroups.txt"),row...
ab499fe9ade7b64d91dd0e1ac6a1e7da3fbf6ddad4ec41953128c82ad9bf8a20
R
3,954
123
library(dplyr) library(Seurat) library(ggplot2) library(patchwork) library(SeuratData) library(SeuratWrappers) library(Azimuth) getwd() setwd("PATH_TO_WORKDIR") species_seurat <- readRDS("PATH_TO_SPECIES_SEURAT_RDS") a_seurat <- readRDS("PATH_TO_SPECIES_A_RDS") b_seurat <- readRDS("PATH_TO_SPECIES_B_RDS") homolog_ge...
417c1e631c699628be6e21439b490750f87a10ec8c004480e30add9e43db4a5f
R
4,000
118
library(data.table) library(lme4) library(car) library(mclust) library(nlme) load("/Users/doq/RCode/preprocessed_data.RData") alldata <- as.data.table(alldata) alldata[, binary_group := fifelse(grepl("ASD", group, ignore.case = TRUE), "ASD", "TD")] alldata[, group_verbal := fcase( is.na(vinabcstd), "flag", bina...
ba92fc35defa0f85b9a007f77bdfb1ea2eb619f605265d6c2941ada2ca4b3fc5
R
4,002
105
#!/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...
25e6627840c6985d710cbe36fb72231f1d93d4bbfff2d1ed83472bd3c54aadb3
R
4,015
104
#authors Krissy Sakers and Justin Savage #kristina.sakers@duke.edu #Version 2.0 #3/31/2023 #install all of these first with install.packages('package name') library(ggplot2) library(reshape) library(car) library(nlme) require(multcomp) library(rstudioapi) dataFile <- selectDirectory( caption = "Sele...
187171e7f12c9022d027d528ef76395b2840e69f4ce268733e21d6037ffa82ab
R
4,033
120
# ============================================================================= # Put together the package # ============================================================================= # WORKFLOW: UPDATE EXISTING PACKAGE # 1) Modify package content and documentation. # 2) Increase package version in "use_description...
24880728de4c4e1453d1941564383a7e1f55dac4b10c9ef318859e1448b6159d
R
4,092
74
#git checkout fe5f9e92f3fe5ca0c75e9d8acfd211feb7358066 diffExprProDA.r #Rscript diffExprProDA.r #https://github.com/const-ae/proDA #remotes::install_github("const-ae/proDA") #data#### inputMQfile <-"L:/promec/Animesh/Mathilde/rawdata_from animesh 2.txt" pdf(paste0(inputMQfile,".pdf")) maxquant_protein_table <- read.del...
280c6281fe69fcb11ae02d1993eb09eb72fa1c3c842bf549b98e1bef9a0d2c40
R
4,100
86
--- title: "Applying CSIDE to Spatial Transcriptomics Data: Cell-Cell Interactions in Visium of Human Lymph Node" author: "Luli Zou" date: "April 15, 2022" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{visium-cellcell} ...
7bc797a53c22c5dca7a5a1a5ec66589f8703ccc15ab3d8e30b2cab2442aa4b2e
R
4,102
134
# -------- 1) Directory of the original Stan results (unchanged) -------- dir_hc1 <- "F:/PIT/model/EEGmodelHC/HC/results/stan" file_fit_rda <- file.path(dir_hc1, "M12fits_obsData.Rdata") # -------- 2) Directory where you want to save the exported data -------- out_dir <- "H:/eegplot/M4b" if (!dir.exists(out_dir)) di...
f64bb59fbc8ccf09658328d051a47f43933fba8eb7d2de84b2bdce9940a6e0be
R
4,108
86
library(SnapATAC) library(viridisLite) library(ggplot2) library(ggdendro) library(ggsci) library(ggpubr) library(chromVAR) library(motifmatchr) library(SummarizedExperiment) library(BSgenome.Hsapiens.UCSC.hg38) library(rGREAT) library(GenomicRanges) library(tidyr) library(parallel) library(stringr) library(umap) li...
1d2f7cb917e3880508f9793a1471c243872d3478754a1147933e82a86c2863a3
R
4,109
139
library(tidyverse) library(ggpubr) library(rstudioapi) library(ggplot2) library("car") library(grid) library(ggbreak) #Define all the necessary variables data_seg<-read.csv("/Volumes/mahamid/Dorothy/Pipeline_after_CNN/20230509_BIF_figures/tomogram_summary_averaged.csv", sep = ',') group1<-"control" group2<-"induced"...
d56988e5067ffd42833a6f5280c76d6e4a32fe6660f3df9bdd360e62adc31414
R
4,118
97
--- title: "Microglia Subclustering Visualization" author: "Raquel Garza" output: html_document: df_print: paged --- This notebook visualizes **microglia subclustering** results from integrated snRNA-seq analysis. The goal is to explore cluster structure, regional variation, and diagnostic differences (PD vs. ...
8b43516a5ac225943426613c3e009d6804b88cc0af93e3fc8b0185605d9709c7
R
4,182
90
library(Matrix) library(spacexr) library(doParallel) datadir <- '../RCTD/data/SpatialRNA/Puck_190926_11/' puck <- read.SpatialRNA(datadir) puck <- restrict_counts(puck, rownames(puck@counts), UMI_thresh = 100) puck = restrict_puck(puck, colnames(puck@counts)) saveRDS(puck,file.path(datadir,'puck.rds')) plot_puck_contin...
6500407287209951eb1eb6100e22d6065b5f12936ae02066fb2dc572dd3754bb
R
4,214
131
# # Ensure that factors work in prediction # options(na.action=na.exclude) # preserve missings options(contrasts=c('contr.treatment', 'contr.poly')) #ensure constrast type library(survival) aeq <- function(x,y, ...) all.equal(as.vector(x), as.vector(y), ...) tfit <- coxph(Surv(time, status) ~ age + factor(ph.ecog), lu...
10765f56078c95caa86f5294eaa384d7398e5258df070f4ebd1b22abb4ea997a
R
4,286
96
#Rscript combineTxtFilesToXlsx.r L:\promec\TIMSTOF\LARS\2024\240207_Deo\combined\txt\ proteinGroups.txtLFQ.intensity.16 0.110.05BioRemGroupsG.txttTestBH.csv MSH2 MLH1 PMS1 PMS2 #install.packages(c("gglot2","svgite")) args = commandArgs(trailingOnly=TRUE) print(paste("supplied argument(s):", length(args))) print(args) i...
96930c9de093d8f8544a54123d727fca27d0b47ec0d1820044a32a9f54682f27
R
4,321
91
--- title: "Applying RCTD to Spatial Transcriptomics Data: Visium with multi mode RCTD" author: "Dylan Cable" date: "December 20th, 2021" output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{visium-multi} %\VignetteEncoding{...
ac487eb4a03f1e39564230ab132a4d3268382a74b3747ebf1e8956f815c699a6
R
4,340
156
# ========================================================== # 02_inspect_adnimerge2.R # Purpose: Inspect ADNIMERGE2 R Data files and identify useful tables # ========================================================== library(tidyverse) library(janitor) library(openxlsx) library(stringr) project_dir <- "R:/...
43e8b43b75d310863851b5a6edf07b8a10f2375b2328f730044353520e99feee
R
4,351
104
# Set environment language Sys.setenv(LANG = "en") # Set working directory setwd("D:/project/ndreamer_plot/") # Load necessary libraries library(ggplot2) library(dplyr) library(tidyr) library(scales) # Define a function to create the plot generate_plot <- function(input_df) { # Rename columns to correct issues c...
995d14e7f24fa510b4fadc773110e6b81eec9c066246a5810319bad468b8243d
R
4,352
104
# Set environment language Sys.setenv(LANG = "en") # Set working directory setwd("D:/project/ndreamer_plot/") # Load necessary libraries library(ggplot2) library(dplyr) library(tidyr) library(scales) # Define a function to create the plot generate_plot <- function(input_df) { # Rename columns to correct issues c...
b4da3ad75bedbd00dda1c6dc4cff333288bb6563b41b8afce22e3d594418faf5
R
4,397
150
# Three-group bootstrap learning curve analysis with KS tests (ASD_high, ASD_low, TD) # Hard phase: trial > 10 suppressPackageStartupMessages({ library(data.table) library(dplyr) library(tidyr) library(purrr) library(minpack.lm) }) load("/Users/doq/Geode_Data/preprocessed_data.RData") alldata <- as.data.ta...
7f4fa1b7f6784a30f8d54465078f2d302f1a45e5fc57e90944debcdb737d5934
R
4,437
115
########## EEG model fitting data preparation (R) ########## # 0) Load function ------------------------------------------------------ root <- "F:/PIT/model/EEGmodelHC" # unified root path src_file <- file.path(root, "prepEEG4stan.R") stopifnot(file.exists(src_file)) source(src_file) stopifnot(exists("prepEEG4stan...
e8379d388088cef67f6ffa19ad82c77f401d75db3044dddeb311a8664d9968c2
R
4,449
104
pathD<-"F:/promec/Animesh/MK/" inpF<-file.path(pathD,"proteinGroups.txt") data<-read.table(inpF,header=T,sep="\t",row.names = 1) summary(data) colName<-"LFQ.intensity." y<-log2(as.matrix(data[,grep(colName,colnames(data))])) summary(y) row.names(y)<-row.names.data.frame(data) colnames(y)=sub(colName,"",colnames(y)) #co...
3869f6493d80de956b9c6de13b714064b79ae4c4b9d6e4aa506db7156b45c62f
R
4,457
127
# Set environment language Sys.setenv(LANG = "en") # Set working directory setwd("D:/project/ndreamer_plot/") # Load necessary libraries library(dplyr) library(fmsb) library(gridExtra) library(gt) library(ggplot2) generate_radar_plot <- function(df,title) { # Rename columns colnames(df) <- gsub("^X1\\.cLISI$", "...
e13d2596c13bc4e20d690608e0de223f897ae27e901e51e3f7d8af319ea13e41
R
4,463
170
need <- c("tidyverse") to_install <- setdiff(need, rownames(installed.packages())) if (length(to_install)) install.packages(to_install, Ncpus = 2) invisible(lapply(need, library, character.only = TRUE)) setwd("C:/Users/u0171728/Downloads") df <- read.csv( "fe-wp-dataset-124 (2).csv", sep = ",", head...
4a3e94f0860ab7f669937bdb657e717eb19603643a7ef7762f774bae0e6cf6b7
R
4,513
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('Zeller_raw.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) m...
7b113432f1416912eee5053c0b1d693f6a669e1fe50cc438aaae72d395cf878b
R
4,513
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('Zeller_raw.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) m...
b89ad477c0e4725e75a1a9b299e99f317da9cb9437f0db11ea0c7654111ffde1
R
4,513
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('Zeller_raw.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) m...
ef6e37f0b90d1196efffcd75993e9cf51f7475e877c9e63b9952fe09766bcfad
R
4,513
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('Zeller_raw.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) m...
ffe0993a121c835f72482dd3543ac2e00bb509da9d26635e91a91f6ebf63d57d
R
4,514
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('Zeller_raw.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) m...
702c81d2db70d7bd20e179846314444941d2bedc6686e0fe95083d0eae4a1ae0
R
4,522
93
--- title: "ASAP deep bulk RNAseq of PD and control postmortem samples" author: "Raquel Garza" output: html_document: df_print: paged --- ## Normalization and PCAs This small notebook was used to calculate gene size factors to perform normalization over TE counts, and show PCA analysis across the sequenced samp...
7765b1369435cbc44be7b3445469f6b95f37d054ae878c098497c104ff1640d0
R
4,533
63
--- title: "Vignettes" author: "Dylan Cable" data: December 22, 2021 #output: github_document output: html_document: keep_md: yes pdf_document: default rmarkdown::html_vignette: keep_md: yes vignette: | %\VignetteIndexEntry{vignette-readme} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdo...
00a5976d32482eb7e9ace1e30cadeda1465977ce4ee751aa3efcd9fc48ddfa6b
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
097e9d03e0c1a3cee499481966d64ed16f2b826afe055649a2958da3a9ba5315
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
0cc13f8736239536f5ca423d8256c6f779ed13f512cdad0dd90018783b490571
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
2b390af4b2ee745717c72d5807397febd42807a75431e027578c01079c898603
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
383546ba84211957a563d2e0758e45966722b88056e9bd09c471cf227cda85b3
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
72cd36753695083e8d9e4e670b3bdb9e37eb18a6f46ba3cb3108c307c76cf4f2
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
7fd0d1f5d48f1a78cd752536bbdbb471e45047f0ae4d837a30daec198bfeba10
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
b2af06dc83a2f72a0d7fa7a6bda5835af028ff59ec68b954af7aeaa8b9ce0ead
R
4,535
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
1306cc16abb49c76302296e903b5f7e8f55c265e3cc344b416d057746264fec7
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
17ad8d370e3aea49864d4b249134bd9057f67bec81063cfa7b1e123f2614b8e4
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
254732e530606ed141e88fdff7d1607d6ee22813f2ee2dd1150ae0a911e743d9
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
37ccb390a2b1e2eedf031d3a8bc2ff778245a7d588a3237d8e5c30eb53b4baa5
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
6662939a5a670cb6f32f9c80a2c7c2997a88b64861ca8231e1dc46302a348ece
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
7589e55565578dadeacc577c933778795b1f13e1e38faa44301a7062b70f0308
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
7fd736e39a648ab099e497a28db1a9c1a2dda49488c5f9ddb45c8ff1981fe077
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data2.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
9452b6e9781278c133c3e66a47fd3f6e7641f1d63d8b925f21b74fc6d02b5770
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
959e57748b65d7171dd85cb1371af439d33285da0b1657eb4ab19ae0a993e52d
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
d21d643fbe373015b763024537eebc9ffed2a3ac1286d81396b2014decfd8c32
R
4,536
118
rm(list = ls()); gc() # setwd('/Users/yikong/Dropbox (CSU Fullerton)/aResearch/DeepLINK/revision/screening_ipad_rf/') setwd('/home/yinfeiko/DeepLINK/revision') dat1 = read.csv('rna_data1.csv', head = T, stringsAsFactors = F) source('hdknockoff_all_Factor.R') library(glmnet); library(RSpectra); library(randomForest) mo...
b1ed422ae679620999d6bd1365329ddc59955c884eea70e62302946e48098ce0
R
4,547
154
# # utils # #' Split BED set by chromosome #' #' @param bed data.frame with BED content #' @param chroms character vector with optional set of chroms to consider (otherwise all chroms in the BED are used) #' @param cols integer vector with optional set of columns to return (otherwise all columns are returned) #' @para...
925d25ebcfbbf2768c3348b7503f9641be9b52828e92c65c4299e2a3c629d96d
R
4,572
168
--- title: "Multiple 'shapviz' objects" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Multiple 'shapviz' objects} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning = FALSE, message ...
8aab489f0f4109dce666b67f1692eed0d4d373f1b59b932ce1096cf81c9dd016
R
4,606
92
--- 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 MERFISH Hypothalamus ### Load in CSIDE results and calculate significant genes ```{...
3e946e35789431685e3441724f51a16d4ca4a0e23f7cf527ea0bc697c91bfbe9
R
4,615
106
#!/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...
d93eae2ff381d3a9264ac755f37a800782a4f3c51b8bc89ff33793a5b3dc0614
R
4,624
98
#!/usr/bin/env Rscript # Generate a simulated expression matrix and sample design CSV. # ── Helpers ─────────────────────────────────────────────────────────────────── parse_int <- function(x, default, min_val = 1L) { v <- suppressWarnings(as.integer(x)) if (is.na(v) || v < min_val) default else v } parse_num <- ...
6bfb6c4830ae459ee0a1bb84830e0c24657966196751a8e9f8a676f4524cf5af
R
4,655
127
#!/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...
d3417e16a3eced407fd0c18de95d501dd3216244f4a32185cf3a3c10fa6923b7
R
4,688
117
fitmodel <- function(model2fit, dat4stanfile, stanfitsfile, calcLogLik = TRUE){ # Load prepared data for Rstan. load(dat4stanfile) # -> dList stopifnot(exists("dList")) # 1) More robustly check whether K comes from the parent environment # (avoids interference from same-named local variables) if (!ex...
d679819c94fba8886c40393d4f3765d6616c07ca0ea8734b0e4672e61bd70191
R
4,701
124
# Merge E1 + E2 + E3 annotated Seurat objects, SCTransform, and Harmony integration. # Run with working directory set to the project root. # Prerequisites: Barcode_E1_Clones.Rmd, Barcode_E2_Clones.Rmd, and Barcode_E3_Clones.Rmd # (annotated objects with clone metadata in Data/E16_barcodes_E{1,2,3}.rds). library(Seurat...
0f0d40dabb14c3b6cf30d729f0ada075b0f97ab36eb4288547da72c7d53fe1ad
R
4,703
155
```{r data} install.packages("readxl") library(readxl) inpF<-"/home/animeshs/Downloads/For prediction modeling.xlsx" data<-read_excel(inpF, sheet=1) summary(data) ``` ```{r cycle} tp<-read_excel(inpF, sheet=3) summary(tp) ``` ```{r test} #https://cran.r-project.org/web/packages/MetaCycle/vignettes/implementation.html...
a6202d04f86688ddc2c333753c37da84637567fbc4b83baf55135c3ebb449011
R
4,711
133
setwd("C:/Users/u0171728/Downloads") library(ggplot2) metacell_expr <- readRDS("metacells.BrainCellAtlas_Saunders_version_2018.04.01.rds") annotations <- readRDS("annotation.BrainCellAtlas_Saunders_version_2018.04.01.rds") groups <- list( `Exc neurons (sbc)` = annotations$tissue_subcluster[ annotation...
1815ebbc4889a7b67cf20c2f91419972fe992bcde0c47c3cf355a809a9c2225f
R
4,834
91
#usage#### #..\R-4.5.0\bin\Rscript.exe flashDeConvMZMS1.r L:\promec\HF\Lars\2026\Solveig_Janus\test\redo\ #mzML#### #generate mzML in windows prompt using cmd #wget https://mc-tca-01.s3.us-west-2.amazonaws.com/ProteoWizard/bt83/4071095/pwiz-bin-windows-x86_64-vc145-release-3_0_26181_1c640ef.tar.bz2 #tar xvjf pwiz-bin-...
5c121b72d0353a9274dde6f11f61088877243f58db841436010b55fdd28a424a
R
4,843
137
#!/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...
f64a37c217af9d97e357763171d12dd2a67886ff34c32de1a039d44df0168e24
R
4,843
139
# Set environment language Sys.setenv(LANG = "en") # Set working directory setwd("D:/project/ndreamer_plot/") # Load necessary libraries library(dplyr) library(fmsb) library(gridExtra) library(gt) library(ggplot2) generate_radar_plot <- function(df,title) { # Rename columns colnames(df) <- gsub("^X1\\.cLISI$", "...
b62e7dfb11fc630be362fced9cf2e413e95e7d1d55c0fc85493922437bb086f0
R
4,905
117
# ------------------------------------------------------------------------------ # Title: SCENIC Integration with Xenium Data # Author: Yiran Song # Date: March 18, 2025 # Description: # This script integrates SCENIC results with Xenium spatial transcriptomics data, # processes transcription factor activity, and perfor...
94c9ea9c7b439f86b7f44804f4c7c33ce05543faa295cf64b268747f4a09473a
R
4,985
128
# ------------------------------------------------------------------------------ # Title: SCENIC Binary Regulon Activity Visualization # Author: Yiran Song # Date: March 18, 2025 # Description: # This script loads and processes SCENIC binary regulon activity for Xenium data, # generates heatmaps of transcription factor...
688b2213b49fb03d70e1b24fc74917f4dbb07e7ca3d6eeef73c1e935def79269
R
5,008
124
#!/usr/bin/env Rscript # Compare p-values between two result files (e.g. limma and t-test outputs). # Usage: Rscript compare_methods.R file1.csv file2.csv # Output: prints summary and writes scatter plots. # default result files (same as used by run_limma.R and run_tTest.R) default1 <- "random_10000gene_seed42_nA3_nB3...
fee3d4c29e8d6ca158ae5c72b0517ddaa0ab84cb89eef56591ab0be0bc982ab4
R
5,024
153
cmeans <- function(x, centers, iter.max = 100, verbose = FALSE, dist = "euclidean", method = "cmeans", m = 2, rate.par = NULL, weights = 1, control = list()) { x <- as.matrix(x) xrows <- nrow(x) xcols <- ncol(x) if(missing(centers)) stop("Argument 'centers' must be...
2d569e0f174a7bd32afcb09c6c365d4c04fa105be559dd070490802c7b13e8e6
R
5,047
186
## source template from Arnar Flatberg #source("http://bioconductor.org/biocLite.R") #biocLite("BiocUpgrade") #biocLite("illuminaHumanv3.db") #biocLite("lumi") #biocLite("limma") #install.packages("pls") #install.packages("RCurl") #.libPaths() #remove.packages('limma') #detach(package:limma, unload=TRUE) lib...
13fd6d8dc51aefb29de960316bbefc67e28a53ea919c4fefacbe3779c3e72b82
R
5,091
149
WORKDIR <- "C:/Users/u0171728/Downloads/JorstadNL" setwd(WORKDIR) genes_file <- "human_MTG_2018-06-14_genes-rows.csv" samples_file <- "human_MTG_2018-06-14_samples-columns.csv" exon_file <- "human_MTG_2018-06-14_exon-matrix.csv" intron_file <- "human_MTG_2018-06-14_intron-matrix.csv" genes_of_interest...
a0b66c4352d84d042248c665eac640fce896d1469381174d91b1cf32f39ee72a
R
5,161
112
print("USAGE:Rscript proteinGroups.r <complete path to proteinGroups.txt file> <LFQ or SILAC if performed else it defaults to raw Intensity columns>") #example#### #..\R\bin\Rscript.exe proteinGroupsSplit.r "L:\promec\Qexactive\LARS\2022\NOVEMBER\combined\txt\proteinGroups.txt" #supplying input file for testing #inpF<-...
30f35eac5c54eb70507e596ea1e4ad240cf991e810b6d57b114789b0c4548a41
R
5,165
149
# common functions for reproducible reporting # - Bayesian framework R/brms interface to Stan # - editable vector figures in PowerPoint # - estimates P-values with emmeans #source("/opt/fix-rstudio.R") #Sys.setenv(TZ="CET") require("tidyverse") require(readxl) # normal Excel input require("openxlsx") # for normal w...
bc6025be3af1b4aadfc92d00424241819d3e7a7bc5a19c0ac52be44f61eacaf6
R
5,198
121
@ECHO OFF setlocal echo starting simulator ... set CONDAPATH=C:\ProgramData\Bruker\Miniconda3 set ENVNAME=timsEngine if %ENVNAME%==base (set ENVPATH=%CONDAPATH%) else (set ENVPATH=%CONDAPATH%\envs\%ENVNAME%) call %CONDAPATH%\Scripts\activate.bat %ENVPATH% simulator -q -l 0 -d 2 -r 0 -i "D:\Data\LARS\240626_Mira\2406...
06797f3ca49f42d506ce0911de421aaa02203f657d353e5a0052fccbb2b710da
R
5,201
158
#' Interaction Strength #' #' Returns a vector of interaction strengths between variable `v` and all other #' variables, see Details. #' #' If SHAP interaction values are available, the interaction strength #' between feature `v` and another feature `v'` is measured by twice their #' mean absolute SHAP interaction valu...
e550847e8b98fdc92b88e15c694e87420cc2ba62dd89be7189f8e668cd35f785
R
5,223
115
#Rscript diffExprDoseCor.r "L:\promec\USERS\SINTEF\20211207_SINTEF_30samples\combined\txt\\" "proteinGroups.txtLFQ.intensity.16" "Clin0.110.05BioRemGroups_filledMEclin.txttTestBH.xlsx" #Rscript diffExprDoseCor.r "L:\promec\USERS\SINTEF\20211207_SINTEF_30samples\combined\txt\\" "proteinGroups.txtLFQ.intensity.16" "Ctrl0...
e7ff7327433b1d14f10ecee3c257c0704b6a307dbf7e96fd9cf1476175e34827
R
5,291
147
## ============================================================ ## 0) Load required R packages ## If already installed, you can directly use library() ## ============================================================ pkgs <- c("BayesFactor", "dplyr", "tidyr", "readr", "afex") to_install <- setdiff(pkgs, rownames(insta...
99c99e5b3eee196718a721a9e8947e8879aa47b166e4c51198d5ec169564a9e2
R
5,296
160
library(RCy3) library(httr) #install.packages("devtools") library(devtools) #install_gitlab("medbio/disgenet2r") library(disgenet2r) library(biomaRt) # set working dir to the folder containing this script setwd(dirname(rstudioapi::getActiveDocumentContext()$path)) # paths relative to the script directory data_dir <- ...
a0e9ca84557b8a686477d3a815da475d40d13b3344ab2879299691b154bdd61c
R
5,342
143
#!/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...
227dacbe0e53b79b71c916c466c30d067d8568e50d62194729824466315d3452
R
5,432
132
#' Pattern selection by SVD #' #' Make a location preview plot for user to directly see the distribution of sample slots #' #' @param location the formatted location information #' @return a location preview plot #' @export imputation <- function(target, location_corr){ target <- data.frame(Name = names(target), rati...
4d8ec315effade89954cf8af39baba1cd84164084870a1fd39f9a2e2985fe855
R
5,447
70
--- 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%" ) ``` # Robust decomposition of cell type mixtures in spatial transcripto...
a0e09be29dc9c5a9f3f5b6eee013649c36423f0ec4726e5c2211b904e0b88b38
R
5,455
185
## ========================================================= ## HC + OCD: extract subject-level β, compute PCI / QCI / Φreg, ## and save results tables only ## HC: use M16 + M19 only ## OCD: use M16 + M21 only ## No plotting ## ========================================================= suppressPackageStartupMessages({ ...
7a0ea39f676c2b8957ca1762760a7001260230abae293be9972f2a6b741772ff
R
5,483
246
--- title: "Farmand et al 2026 - NeuroFit RCT Neurogenesis Proliferation Analysis Examples" output: html_document --- ```{r setup, message=FALSE, warning=FALSE} library(readxl) library(dplyr) library(tidyr) library(glmmTMB) library(nlme) library(DHARMa) library(emmeans) library(ggplot2) ``` ## 1. Import dataset ```{...
897a290c520f85fea87d6c7f5f4f7c84cb38d7d1b67522ccde8d7d833b4e8d6d
R
5,506
91
refdir <- 'Data/Reference/DropVizHC' reference <- readRDS('Data/Reference/DropVizHC/scRef.RDS') inter_ident <- which(reference@meta.data$liger_ident_coarse == "Interneuron") inter_ident <- rownames(reference@meta.data)[inter_ident] counts <- reference@assays$RNA@counts[,inter_ident] nUMI <- reference@meta.data[inter_id...
e8beb6588b8615fc8108fe0161615bf41bf395af40fc2d9b0998b5eaef4f085e
R
5,543
148
# ------------------------------------------------------------ # Convert MATLAB MFpower4Rhc*.mat into RData containing # "behavior + EEG (transformed)" for Stan # ------------------------------------------------------------ library(R.matlab) prepEEG4stan <- function(obs4stanfile, rawfile, zero_mask = TRUE, verbose = T...
78fd0cdc6c503fc3696aa3930d5869e94c2393d71189766013bf1aa1815dedf8
R
5,544
193
[[[[[ Show that a real r is Solovay random iff it is strong Chaitin random. An effective covering A_k of k is a function of k that enumerates bit strings s, which are the initial bits of the covered reals. We assume that no s in A_k is a proper prefix or extension of another. Thus the measure ...
97d17073e4a2ccd77bc8fe0f253b8ff3be39775a309014038701b3c9f9462529
R
5,590
162
```{r proteinGroups} #inpD<-"F:\promec\Qexactive\LARS\2020\mars\Heidi nano\combined\txt" inpD <-paste0(getwd(),"/Heidi/") inpF<-paste0(inpD,"proteinGroups.txt") data <- read.delim(inpF,sep="\t",header = T,row.names = 1) #clean data = data[!data$Reverse=="+",] #data = data[!data$C..Potential.contaminant=="+",] row.names...
b4e75e69907f663426dab3931f0b893715636eb8e6302d285cdac701949276f7
R
5,609
203
dtrain <- xgboost::xgb.DMatrix( data.matrix(iris[, -1L]), label = iris[, 1L], nthread = 1L ) fit <- xgboost::xgb.train(params = list(nthread = 1L), data = dtrain, nrounds = 10L) x <- shapviz(fit, X_pred = dtrain, X = iris[, -1L]) test_that("nbins has no effect for factor v", { expect_equal( potential_interacti...
eaf79b5829afb436b3129218636bdf50b632e594706d6060a8fe9a67deaec114
R
5,631
100
#!/usr/bin/env Rscript # Differential expression analysis using the limma-voom pipeline. # # Best practices applied: # 1. DGEList for integrated count + library-size bookkeeping # 2. Low-count filtering via edgeR::filterByExpr() # 3. TMM normalization via edgeR::calcNormFactors() # 4. Precision weights via limm...
882da0ff09ffb0e88b9893db39aeaab36834b5ecb4361bd4286317a2f28861ff
R
5,666
187
#' SHAP Force Plot #' #' Creates a force 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. #' #' @inheritParams sv_waterfall #' @param ...
c46658fea7b386428695a8f27e3c3952b9d08f7bd98091434e482f180766f400
R
5,674
151
#' Runs simple variant for performing gene sets co-regulation analysis #' #' This function is based on the rude Monte Carlo sampling approach #' and P-value calculation accuracy is limited to `1 / nperm` value. #' @param pathways List of gene sets to check. #' @param E expression matrix, rows corresponds to genes, colu...
31bd3201cb73cb03a1aa20efe0ccdeadf4b5c85f372975635d49e4c43797b200
R
5,733
82
#..\R-4.5.0\bin\Rscript.exe mapKEGGpathview.r "L:/promec/TIMSTOF/LARS/2023/230217_Caroline/mRNA/CPM1.txt.Omego_T3_vs_Control_T3_mRNA_diff_expr_CPM1.Omego_T6_vs_Control_T6_mRNA_diff_expr_CPM1.Omego_T12_vs_Control_T12_mRNA_diff_expr_CPM1.logFC.genesselect.IDmap.absmax.csv" "hsa00100,hsa03050,hsa03320,hsa04068,hsa04066,h...
5875076617972f54861097793b4a04c5aa273910bcb8b62969fca0f61e323f07
R
5,744
123
#script F:\GD\OneDrive\Dokumenter\GitHub\scripts\proteinGroupsANOVA.r #R C:\Users\animeshs\R\bin\Rscript.exe #options(download.file.method = "wininet") #install.packages("devtools") #devtools::install_github("cox-labs/PerseusR") library(PerseusR) args = commandArgs(trailingOnly=TRUE) if (length(args) != 2) {stop("NOTE:...
9d9f94e9c8b5c957df30c4c2206a2014096b7dc648ec569994509978136ff053
R
5,755
144
## 0) Libs & Stan options ------------------------------------------------------ suppressPackageStartupMessages({ require(rstan) require(data.table); require(parallel); require(boot) require(R.matlab); require(devtools); require(corrgram) require(ggplot2); require(psych) }) options(mc.cores = parallel::det...