sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
087224497d3d7a8b2d43e6f7796073456dc513f6f77f9e3a61e4b51b34a9848f
R
3,851
87
################################## # Purpose: Analyze all publicly available IDH-mutant glioma sc/snRNAseq data for malignant state abundance across tumor grade # Author: Kevin Johnson # Date: 2026-03-11 # Input: data/public_all_scrna_snrna_malignant_cell_state_abundance.tsv # Output: figures/edf7f_public_tumor_type_gr...
faf95a58d13533610327cbbc8707c9822b5707062b86bec26af6b2ea9629891d
R
3,852
95
library(dplyr) library(data.table) library(GenomicRanges) library(ggplot2) outp <- "QTL_fsVars/out" majorCs <- c("ast","mg","EX","IN","odc","opc") Dxs <- c("Control","AD","bvFTD","PSP_S") p1 <- "resources" colors.peakType <- ArchR::ArchRPalettes$summerNight[1:5] names(colors.peakType) <- c("Distal","Enhancer","Promoter...
0e327dd73d4b1a8e61f90636cdec066b4401723e9d19dc864dfcd4c4eb600e16
R
3,853
100
# img_update <- function(spe, sampleid, image_id, new_image_id = paste0("edited_", image_id), brightness = 100, saturation = 100, hue = 100, enhance = FALSE, contrast_sharpen = NA, quantize_max = NA, quantize_dither = TRUE, equalize = FALSE, transparent_color = NA, transparent_fuzz = 0, median_radius = NA, negate = FAL...
a7bc7364257e06530fcf5dfa5bbbe50a7233090ca7ba08bb82ab80b2f470be36
R
3,853
174
--- title: "Evaluate gene sets by cell type-specific gene expression" author: "Wei Sun" date: "`r Sys.Date()`" output: html_document: theme: journal highlight: tango toc: true toc_depth: 3 toc_float: collapsed: true smooth_scroll: false number_sections: false df_print: paged ---...
5995b71d627f6a58f1f91d52123cf21899419395d0ad93a2ced7ec55ce289513
R
3,854
86
library(readr) library(tidyverse) library(dplyr) #### import TPM Count matrix with gene id #### adjusted_TPM_id_df <- read.table("/home/joonho345/1_Epilepsy_RNA/RNA_Human/08.Enrichment/GSEA_01.Matrix_GTF/adjusted_merged_matrix_1_id_TPM.txt", sep = "\t", header = TRUE, row.names = 1) #...
e31b11cdeec4490c2d7a4a56734f5180b090e621428eb814d2eb46bfb9365f00
R
3,854
79
#' Forstmann et al.'s Data #' #' A dataset containing the speed or accuracy manipulation for a Random Dot #' Motion experiment. #' #' Details on the dataset can be found in the following paper: #' #' \strong{Striatum and pre-SMA facilitate decision-making under time pressure} #' #' Birte U. Forstmann, Gilles Dutilh, Sc...
beaf48def060542e20bea5e1683e28b7e8ded26133981ea34284176974765fe3
R
3,855
71
# Used this script to look at the distribution of mean coverage across all WXS samples when adding the H2 cohort library(tidyverse) ## Load WGS metrics wgsmetricsf = list.files("results/align/wgsmetrics", recursive = T, pattern = "WgsMetrics.txt", full.names = T) wgsmetrics = wgsmetricsf %>% map(function(f) data.tab...
aaf51edd5b6f7fa6c25fd68ac5fba58b2f78343671e1e2e2d94650e5927660c1
R
3,856
110
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### # Parameter settings ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### setwd(file.path(getwd(), "R")) source("00_directorySettings.R") # load baseDir, xeniumDir source("00_settings.R") dataDir <- file.path(baseDir, "data") outDir <- file.path(baseDi...
77624e003b753eedd9e6dfd1505c75a39a2ac28c8918d4c5c3d34f1dcea86e05
R
3,858
133
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Script to explore oviDNs cluster (cluster 15) #...
3e2b33bfdfd7b45831c72540b7ed11f9484c7359befbc725085b7ccdbe4f44c1
R
3,859
99
############################################################################### ## Extract SynGO Ribosome Gene Lists ## ## Script to extract presynaptic and postsynaptic ribosome genes ## ############################################################################### l...
f91619dc9f313af7e63da6925ef089bba9211c8e1b62929d2976879bfd1c980e
R
3,859
65
# Load libraries library(bancr) library(tidyverse) # get GT poss.nts <- c("acetylcholine","gaba","glutamate","dopamine","histamine","octopamine","serotonin") gt.data <- readr::read_csv("gt_sources/bates_2024/202508-gt_data.csv") %>% dplyr::select(cell_type, neurotransmitter_verified, neurotransmitter_verified_source...
49ce374f7eec3ddd2e8385c96d4c08987952d9266cade00cd1b4bf336b5381a2
R
3,863
70
print('This script would take 6 arguments, which are:') print('Conjuntional clump 0.05 lead csv, respective FUMA snps.tx, std sumstats for TRAIT1') print('std sumstats for TRAIT2, TRAIT1 name, TRAIT2 name') print('to produce conj_0.05_TRAIT1_vs_TRAIT2_lead.csv') library(data.table) args <- commandArgs(TRUE) #lead1=read...
d82cf7f63b311057175edf1d992411272a3796f3f7f062406024046e99f1d600
R
3,863
116
# ============================================================ # Inhibitory neurons (ROSMAP): CHCHD10 per-donor + clinical # - Aggregates per donor from Seurat # - Merges multiple clinical columns (Braak, CERAD, age, etc.) # - Outputs: CHCHD10_per_donor_inhibitory.csv # ===========================================...
3a50b8a810b77d2a8c71084f35193c2e09c0ba128c81a3f99bb630273183f242
R
3,865
98
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 in data ---...
ef76ce14662d39ec603a1378cfef0e7fea33cd5f1b36eaf93f87f9315e0a75fb
R
3,866
111
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Make volcano plot helper # Author: Amanda Zacharias # Date: 2023-04-09 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc/7.3....
61f24180dd3c58fd1b8070588a4a13d67b75a9b043b4db3a705ad92b82495995
R
3,867
141
# =============================================================== # 🧪 Table Analyzer — Standalone App # =============================================================== library(bslib) library(bsicons) library(car) library(dplyr) library(DT) library(emmeans) library(fitdistrplus) library(flextable) library(GGally) libr...
f8a8865d3d29fe373d867259d946b7cdc1211623c81d9af6eea22a97c3685352
R
3,867
158
require(readxl) root="//eu.boehringer.com/users/bib/users1/duhoffma/Desktop/AA_pipeline/aa_test/" funcdir=paste(root,"track_func/",sep="") # r function folder max_cue_dur=14.82 #in seconds max_shock_time=10 tdir=paste(root,"rawtrack",sep="") tfiles=list.files(tdir) tdirttl=paste(root,"rawtrack_ttl",se...
72dda677b2a25608010d3b580a3299b1e71379b370469f6626a798e98275b943
R
3,869
67
print('This script would take 6 arguments, which are:') print('Conjuntional clump 0.05 snps csv, respective FUMA snps.tx, std sumstats for TRAIT1') print('std sumstats for TRAIT2, TRAIT1 name, TRAIT2 name') print('to produce conj_0.05_TRAIT1_vs_TRAIT2_snps.csv') library(data.table) args <- commandArgs(TRUE) #lead1=read...
474505892bebdb34296909ab6704857e8e3b6bbd386f600fb694a3f614259b23
R
3,871
162
--- title: "Get statistics for probes and DMRs correcting for education" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: lumen toc: true number_sections: true df_print: page...
ddfaf22baa31c77cb1aa06dd3971a66efa34e6652a99e3d3f441da55c570ac40
R
3,871
80
--- title: "The summary plot" output: html_notebook date: "`r format(Sys.time(), '%d %B, %Y')`" --- ```{r, message=FALSE, warning=FALSE} library(tidyverse) library(magrittr) library(cowplot) devtools::load_all() annotation <- MetadataPath("annotation.csv") %>% read_csv() %$% setNames(l4, cell) neuron_type_per_type <-...
c958f7de349f14d8cd48242b66026e95831e39a4169fdec83f691cb79e732a71
R
3,872
99
########################################################################################## ###############--------------- MODEL AGNOSTIC TASK ANALYSES ---------------############### ########################################################################################## ### In this script: # (1) Mixed-effects ANOVA...
0fab3414e6b883a8037976258df3b588c539d0a23124e2fcfa05f68511caacd6
R
3,878
111
#!/usr/bin/env Rscript #-------------------------------------------------- # Title: Make volcano plot helper # Author: Amanda Zacharias # Date: 2023-04-09 # Email: 16amz1@queensu.ca #-------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc/7....
982c78f1b1d92b1d72166b3859710a7fa6c4ffec0bd20d0722a6ad8df8804552
R
3,881
85
library(tidyverse) # in the past, we used seurat objects as input # now this was changed to single-cell experiment seurat_obj = readRDS("C:/Users/rbrowaey/work/Research/NicheNet/seurat_obj_lite_hnscc.rds") # usethis::use_data(seurat_obj,overwrite = T, compress = "bzip2") # convert seurat to SCE object sce = Seurat::as...
e977f6eff3f3fa09d275d0074505424c967dc36a8def86dd02b7b71ff0db5a45
R
3,882
96
#conda activate R4.3 library(CellChat) library(patchwork) library(Seurat) options(stringsAsFactors = FALSE) setwd("/histor/sun/wangyan/shixh/CellChat/15result/CON") ## Extract expression matrix and cell type information scRNA <- readRDS("/histor/sun/wangyan/shixh/CellChat/data/scRNA-Choline-10samples-noHarmony-umap-m...
6038d06ea09c79937463e92eee0e3b56921f8a6b583cb779238f73b951d025c8
R
3,883
85
############################################################################### ## Export per-sample GSVA scores in long format ## ############################################################################### ## #...
a09b7dd8c24574671c676ca1617823c1965689dc748c7be86d86b08851b6e78a
R
3,885
58
# function to load metric for all dataset and calculate the mean metric for case and control # input: mFISH seurat object, with cell identities columns, assay, slots, networks, data directories, case and control dataset name, shortlist cell identity pairs and ligand-receptor pairs # output: Metrics for each ligand-rece...
dcc2db00026c5d144f31f8807fa06c963595b12e5a48c50b65a7817ea29bc07c
R
3,888
149
root="C:/Users/Jun/Documents/R/AA_wSignal/" max_cue_dur=15 #in seconds require(readxl) require("changepoint") funcdir=paste(root,"track_func/",sep="") # r function folder tdir=paste(root,"rawtrack",sep="") tfiles=list.files(tdir) tdirttl=paste(root,"rawtrack_ttl",sep="") ttlfl=list.files(tdirttl) for...
5188a5524967c3ab95a9d8e2d7f0e05b9e0c879ef9cf3c7c7c38d62be8b142fc
R
3,890
116
library(ggplot2) library(tidyr) library(cowplot) #V3A horizontal_data_V3A <- data.frame( Category = factor(c(">80cm", "80-60cm", "60-40cm", "40-20cm", "<20cm"), levels = c(">80cm", "80-60cm", "60-40cm", "40-20cm", "<20cm")), Value = c(58.6, 112.9, 106.93, 110.93, 111.53) ) vertical_data_V3A <...
ae42d339faa06f5192b02f1f305a04a8aff4701440f8ca1ca97ba14a91c70e75
R
3,891
119
#title: "Post-hoc ANOVA test Enhancing tumor area" #author: "Mona Zimmermann" #date: "" #output: html_document #### Email: m.l.m.zimmermann@amsterdamumc.nl #### Purpose of script: Statistical analysis for the post hoc test of clinical #### relevance in activity changes for the enhancing tumor area #### Stat...
782b01bf36b0efc71fafdeefdb62e008ad4fbcb6f85e50368bd000a5a27fcddb
R
3,895
114
# compute the likelihood of which_model, then return the original object with # new element: obj$fits[[which_model]]$likelihood compute_likelihood <- function(obj, which_model) { stopifnot(is(obj, "sleuth")) model_exists(obj, which_model) # we basically do lapply on all of the models # # the fitted values ar...
45d263064be6ca6f0071c54df22cc7dff07c457d2cc80c825078fe3e2fbaa653
R
3,902
93
## KO efficiency assessed by specific substrate and product level of target enzyme rm(list=ls()) library(tidyverse) library(ggpubr) setwd(rstudioapi::getActiveProject()) load(file = "./Output_Data/Exp2_FFA_concentration.rdata") load(file = "./Output_Data/KO_LUT_paper.order2024-02-08.Rdata") ## Elovl5 and Fads2 first...
94907ccbc1bc0e84f8cb084a53b3a5d790067de0d6ae16df5ccf83dfbf5396d5
R
3,904
121
#!/usr/bin/env Rscript library(tidyverse) makeGT <- function(alt) { print(alt) n_alts <- str_count(alt, ",") + 1 print(n_alts) if (n_alts > 1) { GTs <- 1:n_alts return(paste(GTs, collapse = "/")) } else { return("1/1") } } DepthFromCounts <- function(counts) { counts_split <- str_split(coun...
9446da69634354bbcc2a3b977350866f0b85bf5ec94c5c7105a137376869d19c
R
3,908
106
RNGkind("L'Ecuyer-CMRG") set.seed(123) calc_lls <- function(emc, n_particles=1e3) { model <- emc[[1]]$model() p_types <- names(model$p_types) dadm <- emc[[1]]$data[[1]] designs <- list() for(p in p_types){ designs[[p]] <- attr(dadm,"designs")[[p]][attr(attr(dadm,"designs")[[p]],"expand"),,drop=FALSE] ...
1f9801c10c3509fb509ee78ed827637521bc3eb0d04d1c6737179ca1f9762faa
R
3,914
73
here::i_am("scripts/2.validations/2.4.sequence_divergence/2.4.4.sequence_divergence_VS_network_divergence.R") library(tidyverse) library(here) library(ape) library(ggbeeswarm) wd <- here("data/validations/sequence_divergence/") fig_dir <- here(wd, "figures/") # load module conservation ranking module_conservation_o...
d02c15aefc4566fc98c50d217d3d665b3081dbdef1303bc473096dc0486666e5
R
3,915
88
#' @keywords internal splitVectorByNodes <- function(vec, nodes, n.nodes) { res <- lapply(1:n.nodes, function(x) list()) splitted <- split(vec, nodes) res[as.integer(names(splitted))] <- splitted return(res) } #' @keywords internal graphToAdjList <- function(graph) { edge.list.fact <- igraph::as_edgelist(gra...
30344c9c57fbc39f0f239c48dacbff669f36ff5b6bfa1006eddbcea94c36baeb
R
3,916
122
#------------------------------------------------------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...
a75f4b535a0974bcf2b7cdd3e37144c65e10656563275293cd28d3231e81880a
R
3,920
110
library(JASPAR2024) library(TFBSTools) library(RSQLite) library(motifmatchr) library(GenomicRanges) library(BSgenome.Mmusculus.UCSC.mm10) library(Biostrings) library(stringr) setwd("./SpaDC/GRN") # Select appropriate CREs for downstream analysis peak_file <- "CREs.bed" output_dir <- "peak_motif_perturbation" dir.creat...
a5ad119bf9a11bf059c8d45eed3d0e0f7ef916e9a7e9fde42097038703468c6b
R
3,922
95
--- title: "DunedinPACE: A DNA methylation biomarker of the pace of aging" author: Vignette created by - Calen P. Ryan, PhD output: BiocStyle::html_document: toc: true vignette: > % \VignetteIndexEntry{DunedinPACE: A DNA methylation biomarker of the pace of aging} % \VignetteEngine{knitr::rmarkdown} % \Vign...
817526ee403caadde1f8891220803165d6ed1df6daa2bb38d3f3983b490921e7
R
3,924
88
#' @title geneFiltering #' @description Gene filtering #' @param exprMat Expression matrix #' @param scenicOptions scenicOptions object (slots used: RcisTarget databases and genesKept) #' @param minCountsPerGene Minimum counts per gene required #' @param minSamples Minimum number of samples (cells) in which the gene s...
4b2f05b7c638ff3ce90857447031380c1dbea1a30d1e7f74bc64907ca4904614
R
3,926
100
# function to aggregate and load the data for the MSYNC project (c) IS Plank # INPUT: # * df.indi: data frame with one row per subject, must contain the columns listed in ls.vars and grp.var # * ls.vars: list of column names in df.indi to be included in overview; referenced columns must contain doubles # * grp.v...
4c905fdf01b828ea340dc5bef6d6e38392de2792fcb8bd676d108322338e4f68
R
3,926
95
#' banc-manc-mesh-transform — Transform MANC meshes into BANC space. #' #' For each MANC bodyid, fetches the OBJ mesh and applies the #' MANC → JRCVNC2018F → BANC registration chain. Saves the transformed OBJ. #' #' @section Reads: #' - `<banc.meta.save.path>/manc_meta.csv` #' - MANC meshes via `malevnc` #' #' @sec...
1741723a4c644ef51793ec1303148ac1ad7d643fd38b2031889f107ae73c68af
R
3,934
124
library(shiny) library(ggplot2) library(dplyr) # Load the dataframe df <- read.csv("dfDesign.csv") df$outcome <- ifelse(is.na(df$outcome), "Negative Affect", df$outcome) df$outcome <- case_match(df$outcome, "ERLookDiff" ~ "Task-based Ratings", "neoN" ~ "Neuroticism", "neoN1" ~ "N1:Anx...
9f32e93386a8c612cbe48a4db4dbe99e7e07d24d9249cdb243adbbc7d26b7b2f
R
3,936
132
### Heatmaps setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ComplexHeatmap) source("./Scripts/Function_scripts/Effect_size_functions.R") source("./Scripts/Function_scripts/Pre-processing_functions.R") ##====Plotting function==== heatmap.plot <- function(plot.df, dataset){ pdf(paste0...
e6bb9efccdd76e463bcc22d76d2c7ad32fd5548c86456914764597eb38c7eb91
R
3,936
143
#kalliso abundance files has been input as txi library("tximport") library("DESeq2") library("AnnotationHub") library("ensembldb") library( "pheatmap" ) library( "RColorBrewer" ) library( "ggplot2" ) library( "biomaRt" ) library("dplyr") colnames(txi$counts) sampleTable <- data.frame(sample = colnames(df), ...
104d31f3d34eabc7717ec35a65fd9644cb582a99a90073802b7733a83918d7cd
R
3,938
81
library(ggplot2) library(tidyr) library(conflicted) library(magrittr) library(reshape2) library(dplyr) library(here) library(readr) conflict_prefer("count", "dplyr") conflict_prefer("select", "dplyr") conflict_prefer("filter", "dplyr") Sys.setenv("VROOM_CONNECTION_SIZE"=1000000) base_folder <- here("results/full_run_Z...
6a7607c579c2385287050a7cac5e93e4828ab95473d6685b14cb3447b2add49f
R
3,938
116
############################################################################### ## parse_mitocarta_gmx.R – Parse MitoCarta GMX file for GSEA ## ############################################################################### ## Purpose: Convert GMX (Gene Matrix Transposed) format to TERM2GENE and ## ...
fdb7018dae1311c388e7ddd2ac60cbce27682aa023a234e9866ede32040f147b
R
3,938
92
library(epicalc) args<-commandArgs(TRUE) viruses_csv = sprintf("%s", args[1]) custom_db_out = sprintf("%s", args[2]) output_dir = sprintf("%s", args[3]) vir_all<-read.csv(viruses_csv) vir_all<-vir_all[!is.na(vir_all$Queryid),] new_vir<-vir_all[vir_all$identity<90,] known_vir<-vir_all[vir_all$identity>=90,] #####...
026ef4e75a55d6d9a40e2fdc567bb03c6e4d3cd863a06bba1680ab14f53a120f
R
3,949
117
#!/usr/bin/env Rscript #------------------------------------------------- # Title: Write individual bash scripts # Author: Amanda Zacharias # Date: 2023-08-11 # Email: 16amz1@queensu.ca #------------------------------------------------- # Notes ------------------------------------------- # module load nixpkgs/16.09 gcc...
de1a67a7b9a40ebc4bb9261a4c8675ad19b093bfc1e5b928610c5eebd164dedb
R
3,949
115
#------------------------------------------------------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...
36244d5fbef98e6678f5e21f8bfc48bdd15b74a30d413f9f2baa4d197df7ec8e
R
3,958
83
## ----setup, include=FALSE---------------------------------------------------------------------------------------- #knitr::opts_chunk$set(echo = TRUE) # setwd("/Users/warri/OneDrive/Documents/Denver/Research/Data/ashad_n110") #sessionInfo() # RDAC R packages location '/home/rcorcoran/R/x86_64-pc-linux-gnu-libr...
6ebcb00407a828b015072a396c4d37536c8ee8c866c8fc3c58a2e5eb430ca709
R
3,958
102
neodb_switch <- tabsetPanel( id = "neo_switch", type = "hidden", selected = "overview", tabPanel("overview",icon = icon("database"), br(), br(), br(), div( fluidRow( column(12, div(slickROutput("OV",height = "400px",w...
ab1a0e90d7191def54cc6adccf61170893da5ec80daf1c775653a8001273e46a
R
3,958
101
#' test-data-sources — testthat suite for alignment-data-sources.R. #' #' Covers `parse_alignment_data_args` argument parsing (all CLI forms + #' env-var fallback + validation errors). `resolve_alignment_paths` tests #' are TODO — would need a `withr::with_tempdir` filesystem mock because #' the function pokes real O2 ...
b94bbf1875949d028bc214e85170ab3b7a2b4699b2a0740305393e4fc5558767
R
3,962
100
#' banc-sync-influence — Validate + rsync influence parquet shards to GCS. #' #' Run AFTER all `banc-build-influence.R` array shards have completed. #' Repeats the chunk completeness check + spot-check + gsutil rsync that #' the un-sharded build script does at the end. #' #' @section Reads: #' - `<banc.versioned.save...
228ed3f490f6e852bdd2643c77b8c99881cf20cc802c5ec4e8416ae21064f52b
R
3,964
78
# Framework for modeling Ne dynamics using random forest rm(list=ls()) library(ggplot2) library(RColorBrewer) library(scales) library(randomForest) load('~/.../code/Ne_WholeMidgut_data.RData') # Take the samples obtained on day 3 (S1_3d, S2_3d and S3_3d) as an example data_1 <- data[data$age=='3',] ...
1c17fee98639d9d09ecb2957779ef75391d2e78ca5540c250c8c67e7bc7428c0
R
3,970
95
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 in data ----...
7b74de37d73cbe91886a3c3e5e4b17f79e42e7e62df7e5513ced840da3ab3587
R
3,971
115
--- title: "neural_figures" output: html_document date: "2025-07-24" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` remotes::install_github('satijalab/seurat-wrappers') ```{r} library(ggplot2) library(dplyr) library(Seurat) library(monocle3) library(SeuratWrappers) neural <- LoadSeuratRds(fil...
678388936402904996cd273de9e20377ca75317a409683c1c874e8bcdcdb3b0b
R
3,979
42
rm(list = ls()) tmp <- lapply(c('ggplot2','reshape2'),library,character.only=T) indir <- 'C:/Users/wangz21/OneDrive - The Mount Sinai Hospital/Desktop/Subject/ADASE' setwd('C:/Users/wangz21/Box Sync/Huang_lab/manuscripts/ADASE') ### Load related information # variant mapped to gene for variants tmpfile <- gzfil...
e1aa1d786eb78a07482deaaee4d3684779db7f14e4774763f07944a5fc721cdb
R
3,980
111
library(Seurat) library(tidyverse) library(data.table) library(biomaRt) library(NatParksPalettes) library(EnhancedVolcano) library(ggthemes) library(ggh4x) library(speckle) library(limma) Astro_sub <- read_rds("Astro_SCT_integ_male_v2.rds") # Remove batches with too few cells to integrate Idents(object = Astro_sub) <...
0530a589b4eec98f1c8bb37a7732f99fd1062e4196657daa61159ede9df18832
R
3,983
184
--- title: "Check DMR data against MIAMI-AD" author: - David Lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r format(Sys.time(), '%d %B %Y')`" output: rmarkdown::html_document: highlight: breezedark theme: lumen toc: true number_sections: true df_print: paged c...
7bb6f62e1aec5374954fa2a60c2af5f606be0a4a5b3c0a2f848a3e95201ecdae
R
3,996
94
# ============================================================================== # Script 11: Figure 2F - CDH1 Allele Frequency in Cell Lines # ============================================================================== # Description: Analyzes and visualizes CDH1 mutation allele frequencies across # ICL...
b975dba3058da461cac977cc3cb7bf4a3cc5ecb46a6ff4b4a6f18ee904a99101
R
3,997
122
#------------------------------------------------------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...
a1b16e8a3d3dc3f06bd2b2146c4d60809701e61806e633258a995ccd9c28f464
R
4,000
105
here::i_am("scripts/1.neural_differentiation_dataset/1.4.Spearman_network_inference_and_analysis/1.4.3.CroCoNet_analysis.R") library(CroCoNet) library(tidyverse) library(ape) library(SingleCellExperiment) library(foreach) library(here) library(ggbeeswarm) library(ggrepel) wd <- here("data/neural_differentiation_datas...
cb4249456c96bbf28339dec64fe2ec7d0b9f930dbfb74c97ef0d75d9423a7bbf
R
4,001
124
--- title: "score_assumption" author: "Marlene Lin" date: "4/30/2025" output: html_document --- ```{r} # Install required packages (only need to do this once) #install.packages(c("performance", "gvlma", "report", "car","bestNormalize")) # Load the packages (do this every R session you work in) library(performance) lib...
a9d45cdae9074c268af9c391dc8e50fc5c0610d295857a4b96a06d0c525690eb
R
4,006
120
# Elastic Net Model for Predicting Brain Atrophy # Author: Maryam Hadji, University of Eastern Finland, Kuopio, Finland (maryamh@uef.fi) # Last updated: 20.Feb.2025 # Requirements: # R version 4.3.1 or later # install.packages("glmnet") # install.packages("caret", dependencies = c("Depends", "Suggests")) # install.pac...
87fa05b8d8205efcb7682162febdbad03407fe275b3b0e70609738085bf3d09e
R
4,007
125
mlflow_rest_path <- function(version) { switch( version, "2.0" = "api/2.0/mlflow" ) } mlflow_rest_timeout <- function() { httr::timeout(getOption("mlflow.rest.timeout", 60)) } try_parse_response_as_text <- function(response) { raw_content <- httr::content(response, type = "raw") tryCatch({ rawTo...
90c528fe8633979da6a8f0d49406300c3139bbc09606d35b65f6e95c26f8749f
R
4,007
93
##### The following code will download the raw preprocessed data ##### #### Change Working Directory if Necessary #### #setwd("~/FC-Network-Replicability-Effects") #### (Install and) Load Packages #### #install.packages("dplyr") #install.packages("curl") library(dplyr) library(curl) #### Import and Prepare Summar...
1e7af372aa27999615498dbf25d1c5766479e37e0138601376d996c1936447fa
R
4,008
95
# Load required libraries library(ggplot2) # For visualization library(dplyr) # For data manipulation library(rnaturalearth) # Provides world map data library(rnaturalearthdata) # Supplementary world map dataset library(sf) # Simple Features for spatial ops (centroids/points) # Fun...
0df58ba360d0b92fcaca7304c68b5ef33e0b4204742ac34817f69c55ba204b2b
R
4,009
108
# Script: 2.run_LM.R # Purpose: Fits linear models to compare different combinations of predictors (MODULE, INGENE, EpiXcan, CIS) # for gene expression prediction in testing data. This script: # 1. Loads preprocessed testing data predictions # 2. For each brain region and gene, fits various linear mode...
3ce9af7d388fbb3579e91eaccd5d93ed8795ffa9723e7dc80cb4e18a3aa91690
R
4,016
69
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/b3800d61-6988-4fd4-97e5-b3f50bfbacc8. #### ##...
5893c6554d27840721d47cc8af2c2677414710cdc3082159095e0cb46ca56b67
R
4,022
102
## Figure S6 Ki817 mouse #### tell_user('done.\nCreating Figure S6...') resx=300 png('display_items/figure-s6.png',width=resx*6.5,height=5*resx, res=resx) layout_matrix = matrix(1:4, nrow=4, byrow=T) layout(layout_matrix, heights=c(0.8, 0.2, 0.8, 0.2)) grch38_coding_offset = 4699605 - 4680251 depth = read_tsv('data/...
1819c2021895f6605cab9f84d838124d3c0d3eac1d91208f156294f113ad3255
R
4,025
65
######################################################################################################## #### Trial dataset for this R script can be downloaded from #### #### https://data.mendeley.com/datasets/454s2vw255/1/files/1392d1f9-f950-4d35-b3dd-4a9b4487b5a4 #### ##...
c865dd1858d59b2a3f35bb24b2d6516dbfa136e75e4bb7c48a6bb42b3a8daa3c
R
4,027
70
BHR_meta <- function(ss_list, trait_list, annotations, num_blocks, genomewide_correction, fixed_genes, overdispersion, all_models, num_null_conditions, slope_correction, gwc_exclusion, custom_variant_variances, intercept, start_time){ if(length(ss_list) > 1 & length(trai...
9b8c3cb39a3f251e3aedc14fe7600a8c00084062b280874bd87ed6ac366dbe44
R
4,029
134
--- title: "mtcojo" output: html_document author: "Megan Skelton" --- GWAS summary data Columns are SNP, the effect allele, the other allele, frequency of the effect allele, effect size, standard error, p-value and sample size. ```{bash} # Example reformatting for a file structured: SNP MARKERID CHR BP A1 A2 FREQ ...
4f038d4fa26f472ccb8c5ba0bf59d01e458c646b4663d96a8f62f4c7e9d1242d
R
4,032
135
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c( "ggplot2", "dplyr", "readxl", "survival", "openxlsx", "broom", "tibble" ) for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg...
a697fca43b978ab9d518882e429dbcd254159fc9c6677707c4a7fc13de224a5c
R
4,043
118
#!/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 subset RData") parser$add_argument("-b", "--bat...
e00afeee634b2e40da4403d4aee866c4ffd4d4f6fa025a977268bc9a98389dda
R
4,044
106
#' @docType methods #' @rdname mr_mvlasso #' setMethod(mr_mvlasso, "MRMVInput", function(object, orientate = 1, distribution = "normal", alpha = 0.05, lambda = numeric(0)){ K = dim(object@betaX)[2] if (orientate %in% 1:K) { orientAte = orientate} else {orien...
b0c14ae85be2ce49a4837e96fd98f9615553b944509544efdaeff06e3f1aec39
R
4,054
165
library(tidyverse) library(patchwork) data_file <- "merged_data_shared_bacteria.tsv" data <- read.table( data_file, comment.char = "!", row.names = 1, sep = "\t", header = TRUE, check.names = FALSE ) data <- data |> mutate( group_mean_relative_x = group_mean_relative_x * 100, group_mean_relati...
1c3c0d8289637fa4c601848b1cb23011a81afbe1aa31f33ca0c53b08067e002d
R
4,063
123
library(ArchR) library(parallel) addArchRThreads(threads = 1) addArchRGenome("hg38") # load the main object projss1 <- loadArchRProject("projrmSubset_subPeak") celltype <- "MG" # or 'AST' 'ODC' 'OPC' cellKeep <- rownames(projss1@cellColData[projss1@cellColData$Clusters_r1_iLSI6 %in% celltype,]) length(cellKeep) / ...
d40760367ff1cbf6dd01291dbb45a125087f0d10aa8825bf19fea3479ff2557f
R
4,063
135
.perform_undersampling <- function(df, target, frac, replace) { test_indices <- sample( x = nrow(df), size = floor(frac * nrow(df)) ) test <- df[test_indices, ] train <- df[-test_indices, ] n_minority = min(table(train[[target]])) fct_levels <- levels(train[[target]])...
3fadef06e505d23ca9bc3c3a758b87764bf9a230b02d31b44f537a390c837e80
R
4,066
160
data_GMFE_test_NCA <- readRDS("datasets/data_GMFE_test_NCA_CTPPSP.rds") data_GMFE_test_3CMT <- readRDS("datasets/data_GMFE_test_3CMT_CTPPSP.rds") data_GMFE_test_PINN_ThreeCMT <- readRDS("datasets/data_GMFE_test_PINN_ThreeCMT_CTPPSP.rds") data_PURE_fold_gmfe <- readRDS("datasets/data_PURE_fold_gmfe_CTPPSP.rds") ...
8b188ee781b1bf54591f99cd5ad1e1aa2d046de7e5220dbf992200dea55a0f23
R
4,078
134
# =============================================================== # ?? Regression validation helpers # =============================================================== validate_regression_inputs <- function(df, input, engine, strat_details) { # ---- 0) Stratification variable cannot be a predictor ---- if (!is.null...
399bbd8d49e79d8b85a42be28725c9d93abe2f359392dc6b25a84bfa3bbb6133
R
4,083
86
### Mboat2 OE effect assessed by specific substrate and product level of target enzyme rm(list = ls()) library(tidyverse) library(ggpubr) setwd(rstudioapi::getActiveProject()) source("./Scripts/Function_scripts/Pre-processing_functions.R") M2.LUT <- c("#938b72", "#E15759") load("./Output_Data/Mboat2_OE_LIPID.Rdata") ...
8f6b524460d33ec225d4f6ac8ae56bdf0058dc1cae6a51a95647a5d40b049d67
R
4,094
108
### Plot abundance on individual lipids in 2 in vitro studies setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggpubr) library(ggrepel) library(ggbreak) source("./Scripts/Function_scripts/Pre-processing_functions.R") load("./Output_Data/Invitro_lpd.mol.pct.Rdata") load("./Output_Data/I...
42afbd0842be6df3053c043471182e6ed34c23d484d0398b219b55b361823e12
R
4,104
135
library(data.table) library(dplyr) library(susieR) library(ggplot2) library(viridis) library(ggnewscale) data_path <- "data/finemapping/susie" check_mkdir <- function(path) { if (!dir.exists(path)) dir.create(path, recursive = TRUE) } is_symmetric_tolerance <- function(M, tol = 1e-8) { max(abs(M - t(M))) < tol }...
8b0669bd8b852874aa379cd9915c679b19ae85f0f21236b5a7aad17c7de66767
R
4,104
101
library(EPICATAC) setwd("/data/lyx/LDA/benchmark/") source("EPIC_fun.R") # https://github.com/GfellerLab/EPIC-ATAC # 定义RMSE函数(输入:实际值、预测值;输出:RMSE) calc_rmse <- function(actual, predicted) { # 检查输入长度是否一致 if (length(actual) != length(predicted)) { stop("实际值和预测值长度必须一致!") } # 检查是否有NA值 if (any(is.na(actual)) | ...
68417d50b606650413d84e65aa41bb2c7edbbe25c8bd5e17f434761420618b8d
R
4,105
154
data_NCA_fold_error <- readRDS("datasets/data_NCA_fold_error.RDS") data_3CMT_fold_error <- readRDS("datasets/data_3CMT_fold_error.RDS") data_3CMTPINN_fold_error <- readRDS("datasets/data_3CMTPINN_fold_error.RDS") data_PURE_fold_error <- readRDS("datasets/data_PURE_fold_error.RDS") ####### NCA ############### cou...
d6af25c8698e146b798d088b8803289c691d3efc756a970b5d5d0b6b8b35552f
R
4,105
158
library(data.table) library(tidyverse) rt=fread('./Count.txt')%>%as.data.frame() colnames(data)[1]='group' str(data) # ========================= # 1. 加载包 # ========================= #if (!requireNamespace("DESeq2", quietly = TRUE)) { # if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("Bi...
f70905d27a5c260e388f6dd6b8be2dcc8400109ec483bab571b83045c15725c4
R
4,117
131
#' Sample spatial gene visualization workhorse function for Xenium data with #' centroid based spatailCoords #' #' This function visualizes the gene expression stored in `assays(spe)` or any #' continuous variable stored in `colData(spe)` for one given sample at the #' spot-level using (by default) the histology inform...
7ee2fdbb4a87aaa79fc98262531a5b0593afbed715f0ae568a2d58bd1bdb768a
R
4,125
149
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "readxl", "ggplot2", "tidyr", "dplyr", "reshape2", "rstatix") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies ...
16093842823cd27cd4df784ce8c9ffb827109d34ed463ddc1419c7996b8eb828
R
4,130
128
#------------------------------------------------------SETUP-----------------------------------------------------# # Load libraries library(tidyverse) library(data.table) library(BuenColors) library(Seurat) library(irlba) library(Matrix) library(future) library(reticulate) library(ggrastr) library(tidytext) library(ma...
ef41cfac2cfb278570deeb0b67b84c7b66851cd1e35423b4ad478f05e52c9776
R
4,130
116
# Load here package for path resolution library(here) source(here("src/utils/utils.R")) source(here("src/utils/funcs.R")) # Figures #### source(here("src/figs/fig1.R")) source(here("src/figs/figS1.R")) source(here("src/figs/figS2.R")) source(here("src/figs/figS3.R")) source(here("src/figs/fig2.R")) source(here("src...
066d4e701a9b4a89c83b93fb7590db3464d7377ef6481f32e5ff776c557c155a
R
4,133
165
--- title: 'Epilepsy 10x samples v2 - gene ontology analysis (using gProfiler)' author: "Jon Thompson, Pers lab" date: "`r Sys.time()`" params: date: !r Sys.time() randomSeed: !r 12345 pValThreshold: !r 0.05 padjMethod: "bonferroni" output: html_notebook: df_print: paged number_sections: yes toc: yes toc...
1793499beb4aade7081c335046e5fe8e3e5cdbfd5d26c3a76f303d8ac8ec3ac9
R
4,135
116
# ============================================================================== # Load RPPA (Reverse Phase Protein Array) Data # ============================================================================== # This script loads and prepares RPPA protein expression data # # Author: Osama Shiraz Shah # =================...
218f23cb57f3c39164cc5928829cbb087ce07f218fbaf17f073db7546c068ab8
R
4,135
117
#functions needed to pull signal values from bigwigs and take median within the union of peaks for a tissue/cell type #Author: Brian Roberts require(rtracklayer) read_and_bin_func_bigWig <- function(bin_GR,bigWig_path,bin_func = function(x){quantile(x,0.5)}, run_unstable=F){ #the which input to rtracklayer::import...
b4f36a414601d7a5218814957a99461552d0cbc343434648d336c462cd948246
R
4,138
108
#' banc-extract-synapse-lookups — Extract version-agnostic synapse → neuropil lookup. #' #' Synapse `id` is stable across BANC root_id versions; run ONCE before a #' rebuild to preserve existing neuropil assignments. #' #' @section Reads: #' - `banc_<ver>_synapses_<src>_neuropils.parquet` #' #' @section Writes: #' ...
afe9aee9c9ae692d1f96ff9af5c21e4322f0ad51248c755cbca336bda7316831
R
4,144
94
### Concentration calculation setwd(rstudioapi::getActiveProject()) rm(list=ls()) library(tidyverse) library(stringi) Invitro.new.peak <- read.csv("./Input_Data/Exp3_Validated_Reintegration_121125_color.code.csv", stringsAsFactors = F) Invitro <- Invitro.new.peak %>% filter(!Peak.color.code == "orange") #404 lipi...
d4cf6b26fbedd06f60bbdb66653686ee7c6b4cb95d74073e867ee1d6b4af44e6
R
4,149
106
library("data.table") library("R.utils") library("vcfR") Args <- commandArgs(TRUE) dname <- as.character(Args[2]) chr <- Args[3] phenoname <- as.character(Args[1]) # How many ordinal categories per pheno? zt2 = {0,1,2}, zt3 = {0,1,2,3} , etc. zt2 <- c("LEWY_grp") zt3 <- c("AMY_A","AMY_CERAD","B_SCORE","ADNC","REAG","W...
7ec4671906fc9be73ea4d70d5ceacd975ce94287b08cad1448e4c53cd5793dec
R
4,151
137
.check_target <- function(df, target) { if (!target %in% names(df)) { stop("Target column not found in the dataframe.") } } .check_factor <- function(df, target) { if(!is.factor(df[[target]])) { stop("Target must be a factor.") } } .check_binary <- function(df, target) { target_val...
9b79708af14e3ce6eef4b59e576c42f4bba9a772ea811130c8f71945baf57e2a
R
4,153
137
#' Select Searchlight Domain and Create Masks #' #' Extracts the relevant subset of data for a given searchlight index. #' Returns masked locations, gradients, subject indices, and mask. #' #' @param data List returned by load_data() #' @param sl.idx Index of the searchlight to select #' @return List with masked locati...
b0effdb6903db3842cfbadeccbac16e5b101be604bb21a73f63aa97d8b5ffa75
R
4,159
101
# Load required packages if (!require(dplyr)) install.packages("dplyr") library(dplyr) # 1. Create original data frame data <- data.frame( Feature = c(rep("F1CON", 14), rep("F1GCS", 14)), LM = c(5.2138,7.9386,5.1037,4.5447,4.321,4.8528,4.9567,5.1595,4.6176,4.2695,3.4082,3.4728,4.6216,4.4669, 5.336...