sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
17k
content
stringlengths
1
200k
52d96502b4f53024464d5d0f3909f961577525347bc293e8d07739f451e4c37b
R
10,802
255
library(here) library(ggplot2) library(rlang) library(rstatix) library(nlme) library(cowplot) library(ggbeeswarm) library(ggpubr) library(ggsignif) library(knitr) library(dplyr) data <- readr::read_csv(here("Analysis_Files", "ASO","ASO Rotarod - Rotarod.csv")) data$SLC_Genotype <- factor(data$SLC_Genotype, levels=c...
98d729d3d3fd2f1cf8da6821bb540a3ee460edebb7f80808ecf1f5e0f9b3922d
R
10,885
195
#' Create the Quality Control report #' #' Normally used as part of the analysis_quickstart() function, refer to its implementation for example code. #' #' @param dataset your dataset #' @param output_dir output directory where all output files are stored, must be an existing directory #' @param norm_algorithm normali...
cef723e3544f2cbd5144d4658edf45dbb05d96666e2f7ef6a855d0ea318166fa
R
10,892
367
library(here) library(tidyverse) library(cowplot) library(ggplot2) ### Establish location --- here::i_am("src/PFF/PFF_Correlate_DAT_with_Puncta.R") ### Read in input files --- PFF_lum_col_counts <- read.delim(here("data/PFF/PFF_Microbiome/differential_taxa/collapsed_ASV_tables/PFF_L6_Subset_Luminal_Colon.tsv")) %>%...
bd8442544d6c0db2fc68ceef5f5c8f49f12a4ac3d378aef26c5fd120d85bc19c
R
10,931
325
--- title: "Fig 3 Rising Falling Plots" output: html_document date: "2024-11-20" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures ...
b48f05f34ce434195069840c6de69607d6e7f2e85338bb69c2a705fe0d1f215f
R
10,940
309
# Topic_distribution.R rm(list=ls()) library(topicmodels) library(MetaTopics) library(ggplot2) load('./Gibbs_model.RData') map=read.csv('./01_taxa/feat_genus.csv',header=T) #1.topic-genus probability---- P1=plot_beta(Gibbs_model,prob=0.01) #pie chart: Topic_8---- my_beta <- Gibbs_model@beta colnames(my_beta) <- Gi...
9a934ad7214ca8197989c8bf70ac18bf80abeeef434d7513bb268d29b19aae7c
R
10,941
398
--- title: "Chromatin modifier DRIAD run plots" author: "Clemens Hug" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(here) library(tidyverse) library(data.table) library(synExtra) library(qs) library(powerjoin) library(plotly) library(ggrepel) synapser::synLogin() s...
5b133cfa43a51da7bf0d7eb72bcbdd94fc8adababe43bee06c99a68cd69ee0a9
R
10,990
348
```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height = 6, # set default height of figures fig.align = "center", # always a...
c1f372f4253147ef5086ed1dd74f076016e55110f27c451d6d037c124cd60f9b
R
10,990
348
```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height = 6, # set default height of figures fig.align = "center", # always a...
995f0a0775c6d77da8c273e03ab914238d44224f7a94c88317e95d3d1dbd8582
R
11,003
347
```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height = 6, # set default height of figures fig.align = "center", # always a...
74d612c4271b6defabfc92e9320ab9353cac6787b0c5722cb156877a5074783d
R
11,027
348
```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height = 6, # set default height of figures fig.align = "center", # always a...
ce449309cd689790ce3f918161d68a4f1e4eaaee0ce5d1a999fba46878f5d653
R
11,049
175
# UI-elements for Explore tab tabPanel(title = "Explore", icon = icon("magnifying-glass-chart"), id = "explore", # link to the style.css file. tags$link(rel = 'stylesheet', type = 'text/css', href = 'styles.css'), sidebarLayout(fluid = T, sidebarPane...
e6e05817741a9f2ed6dbe232c44880d60cd4e91fb54f388868f239522b1b90a0
R
11,059
338
--- title: "Attack Chase Death" output: html_document date: "2024-10-29" --- ```{r setup, include=FALSE} ## libraries ## library(tidyverse) library(ggplot2) library(lmerTest) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(lmtest) library(blme) library(scales) library(ggthemr) ...
23338f7d83131ed1b8d44f7f12ebfbabdfb56681eeb1e5e9206b06f2d447aeb9
R
11,100
159
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' GLMM parameter estimation using pseudo-likelihood with a custom covariance matrix #' #' Iteratively estimate GLMM fixed and random effect parameters, and variance #' component parameters usi...
7e87182f1fceab2f0081a23fac7f626b9273079818c1e853799ce990552b8126
R
11,110
265
setwd("~/Documents/yu_lab/kernels_in_GP/Kick_data/") library(tidyverse) library(multcomp) source("src/scales.R") res <- read_csv("results/metrics_all_env.csv", show_col_types = FALSE) ref <- read_csv("processed/reference_sorted.csv", show_col_types = FALSE) y <- scale(ref$GrainYield[ref$Set == "Train"]) yc <- attr(y...
16fa5ab1c6a8291b2e824c52d2ee3835608e7da7bb96be11f0d43b7753ce034f
R
11,132
359
--- title: "Cleaning LL19" output: html_document date: "2023-12-06" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height =...
15acd33757adc44b300997a7509c97c7cacc42a51bfe066f0731e70f1a148833
R
11,155
358
--- title: "Cleaning BJH041" output: html_document date: "2023-12-06" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 5, # set default width of figures fig.height...
c8db2c92072ebf1448558e500d96f7ec7aec02c705ce0646aeeb3d73e954327c
R
11,176
350
```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height = 6, # set default height of figures fig.align = "center", # always a...
841cb1e0c11789ca0cf1624371c2178300c2216b7db47635fb229af2130cf722
R
11,211
366
--- title: "Create Supp Turn Time Tables" output: html_document date: "2024-12-12" --- ```{r setup, include=FALSE} ## libraries ## library(tidyverse) library(ggplot2) library(lmerTest) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(lmtest) library(scales) library(ggthemr) libra...
7f2dba87743dc230bda4c3b2a8be762e7c38cfdc9d683a2b8d289b09de275633
R
11,215
245
col_subtype = c('ZFTA-RELA' = "#B44672",'ZFTA-Cluster 1' = "#B47846", 'ZFTA-Cluster 2' = "#46B478", 'ZFTA-Cluster 3' = "#46B4AF", 'ZFTA-Cluster 4' = "#4682B4",'ST-YAP1' = "#B4AF46") colors_metaprograms_Xenium <- c("gray50","#F99E93FF","#9E5E9BFF","#74ADD1FF",'#0F4F8B', "#ACD39EFF","#96410EFF", "#96410E...
bec143eb169d793465a7f3dd9814f143cbdc21e0cd7e1ca7bc621160ea7700c0
R
11,216
366
--- title: "Cleaning LL17" output: html_document date: "2023-12-06" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figures fig.height ...
8bee2ae1bd3bc51b499eab0c80a52e41e9c7daacbf6e7d8165c58a608b0f7eb1
R
11,235
299
library(here) library(dplyr) library(funrar) library(ggplot2) library(cowplot) library(paletteer) library(rlang) library(wakefield) library(vegan) library(here) library(tidyverse) ### Declare path to current script here::i_am("src/ASO/ASO_Beta_Diversity.R") ### Load metadata and count table metadata <- read.csv...
fcaf04bd9da6831df9d161a8ebd507ef786b1da0934972abc377f391301f8b0f
R
11,265
361
--- title: "Cleaning BJH026" output: html_document date: "2023-12-05" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 5, # set default width of figures fig.height ...
86a35e333d14e87f4913ce9ff90061ffc545765abc4bc54e9b4d59668757ffb7
R
11,335
177
#' Import a label-free proteomics dataset from EncyclopeDIA #' #' This function imports peptide intensities, retention times and peptide-to-protein mappings from a 'Quant Report' .elib file generated by EncyclopeDIA. #' #' Because this 'Quant Report' does not contain confidence scores per peptide per individual sample,...
c775e67bb578c94854160a66fd0fba8b70a47789dc61d1a404687460b24d426f
R
11,344
209
--- output: rmarkdown::github_document: html_preview: true toc: true --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, fig.path = "images/custnorm-", comment = "#>" ) ``` ```{r setup, include = FALSE} devtools::load_all() # ! change to some temporary working directory on your compu...
ec609a179c9d61dd7011612d9d7e0b52e9496fae9ddb14c8130d1b028392ba56
R
11,361
421
```{r} source(here::here("src/init.R")) ``` <!-----------------------------------------------------------------------------> <!-----------------------------------------------------------------------------> # I. Data ```{r} local({ tmp <- tempfile(fileext = ".R") knitr::purl("analysis/clearing.Rmd", output = t...
5a90fccc95d0a05b033ea4af16b73b9e9b8397bdd7901f378fb5a1949c8f49d9
R
11,435
460
library(tidyverse) library(synExtra) library(data.table) library(powerjoin) library(here) library(qs) library(ComplexHeatmap) library(ggbeeswarm) library(broom) library(ggpubr) synapser::synLogin() syn <- synDownloader("~/data", .cache = TRUE) rosmap_tdp43_classification <- syn("syn44277761") %>% read_csv() rosmap...
075d8b7e29d5a4170dea725ba0b8fef09cf9cfb7b044c570c2c9d2ab9ab1a328
R
11,439
267
#' Estimate cellular composition and associated error #' #' This is an adaptation of estimateCellCounts() from the minfi R package to #' include the calculation of CETYGO alongside cellular deconvolution. #' The arguments are as described in the minfi package. The estimation #' of cellular composition is an implementai...
0fac490067b1958c42cfca187986e14da7ef176357b0345fa96d5e0adb0f96ba
R
11,457
326
--- title: "Plots of ST-EPN programs - neuroepithelial vs embryonic" author: "Sara Danielli" output: html_document: toc: yes df_print: paged --- ```{r, setup, include = FALSE} library(knitr) opts_chunk$set( echo = TRUE, cache = TRUE, warning = FALSE, comment = FALSE) ``` ```{r preparation environment, mes...
c391262c15264b4825e7ee50d9d28a029aed1da3fe9d6172fa945b6ca7a97325
R
11,524
400
library(sjPlot) library(broom.mixed) # for tidy() library(dplyr) library(emmeans) library(lme4) library(lmerTest) library(ggplot2) library(moments) library(ggeffects) library(robustlmm) library(glmmTMB) library(patchwork) library(forcats) library(scales) df <- read.csv("E:\\work\\q_backup_06_03_2025\\projects\\i...
009edfeb8d263bab6a08ca1478e4367faec251a47a5be4256d550449272ce81c
R
11,549
289
## Auxiliary function to extract genotypes (if geno = TRUE) or phenotypes (if geno = FALSE) stored within inDir extractData = function(inDir, drugList = NULL, geno = FALSE) { ## Record the starting directory startDir = getwd() ## Change into the input directory setwd(inDir) ## Identify sub-directories useDi...
8deb72ea5f687c7537690371ff78ebff337986f17363c1485af64d8ca046d6b9
R
11,583
493
--- title: "DRIAD Tau signature" author: "Clemens Hug" output: html_document --- ```{r setup} library(tidyverse) library(synExtra) library(data.table) library(powerjoin) library(here) library(qs) library(batchtools) synapser::synLogin() syn <- synDownloader("~/data", .cache = TRUE) data_dir <- file.path("driad", "...
218f1d787f64267149391cafbdf83f5ce045d8797b88779134a646fd722b3e5b
R
11,595
254
context("Testing plotting functions") library(miloR) ### Set up a mock data set using simulated data library(SingleCellExperiment) library(scran) library(scater) library(irlba) library(MASS) library(mvtnorm) library(miloR) set.seed(42) r.n <- 1000 n.dim <- 50 block1.cells <- 500 # select a set of eigen values for the...
d02e8ea8601231fdd84e5682ffad2f21d418a0e8c052f3ea884c21a2973fd8dc
R
11,610
555
# ---- libs ---- library("arrow") # reading in parquet data library("dplyr") # piping and manipulation of data library("tibble") # prettier data.frames library("ggplot2") # plotting library("ggthemes") # plotting library("knitr") # to print kable(.) tables library("tidyr") # pivot_wider() function library("readr") # ...
437e1b822d8406ecda66efdcca9bfeb7f51dbea231f5b62d63d0890b38e6d20f
R
11,664
253
library(here) library(ggplot2) library(rlang) library(rstatix) library(nlme) library(cowplot) library(ggbeeswarm) library(ggpubr) library(tidyr) library(dplyr) library(knitr) setwd("../pdbehavior/") data<-read.csv("ASO Pole Test - All_Cohorts_Assign_Maximum_Time.csv", header=TRUE) data <- data %>% rowwise() %>% ...
0257e31aabb8c227d4ec5cbed9128b032d0f971175711116f4c13c914573c9f3
R
11,681
262
library(Maaslin2) library(funrar) library(dplyr) library(ggplot2) library(cowplot) library(plyr) setwd("C:/Users/Jacobs Laboratory/Documents/JCYang/SLC_GitHub/slcproject/PFF_Microbiome/") ## PFF Jejunum --- input_data <- read.delim("starting_files/picrust2_output_min10000_no_tax_PFF_ASV_table.qza/export_ec_metagenom...
93d5a7581ec4693c2ef2dd3d8dc3c4b4c9431cb2d0e9a47f1b9338de794ab640
R
11,686
360
--- title: "Cleaning BJH039" output: html_document date: "2023-12-05" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 5, # set default width of figures fig.height...
f055f934ed9bec27f44fe5150177a368f965d3c8ae899d2f90d93c190770d3b5
R
11,729
307
# ============================================================= # ASSOCIATIONS OF ALL 21 AGEING BIOMARKERS WITH ALL-CAUSE MORTALITY # ============================================================= # COHORT: # Lothian Birth Cohort 1936 # COX MODEL: # Surv(time_to_death, dead) ~ scale(biomarker1) + ... + scale(biom...
893f6fe82fa7e51b57fefcb8cd19fb6ea1889b2c119d6a2535d48a4dd53bde80
R
11,737
246
--- 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%" ) ``` # scWGCNA V 1.0.0 <!-- badges: start --> <!-- badges: end --> scW...
a832595311acccac45e3b5fdfc775888cdfdba1fb09dc143ada5d7c565d45cbd
R
11,742
378
--- title: "LL13 Cleaning" output: html_document date: '2022-10-31' --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default width of figures fig.heigh...
12bec5da7492020e645bb3df17972ad0081092986dd227473c98a0430ba904d5
R
11,758
238
library(tidyr) #' This function plots values from column 1 of a dataframe against the #' corresponding values in column 2. The values can be numeric or character. #' #' @param df dataframe with two columns #' @param logscale set to character string log10 or log2 to scale y-axis #' @param axlabels vector of axis labe...
606be519d8013c8e3263c803cfbb66efd300886252331ad35a4e0a6f39dcfa90
R
11,758
267
## This script performs developmental projections of tumor cells onto developmental reference (Fig. 1f and E2b) # Load packages ----------------------------------- rm(list = ls()) library(data.table) library(tidyverse) library(crayon) library(ape) library(readxl) library(qs) library(cowplot) library(Seurat) # Organi...
bc3c749c683b66963c083329d96a87d650b21a5f9e953c7d76165b69e18d9d29
R
11,843
404
library(sjPlot) library(broom.mixed) # for tidy() library(dplyr) library(emmeans) library(lme4) library(lmerTest) library(ggplot2) library(moments) library(ggeffects) library(robustlmm) library(glmmTMB) library(patchwork) library(forcats) library(scales) df <- read.csv("E:\\work\\q_backup_06_03_2025\\projects\\i...
10d42685e85bb2c6c8d0be966f81939fcec5f300404337f4e2ef1fc1f15da754
R
11,946
368
--- title: "BJH016 Cleaning" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default width of figures fig.height <- 8, # set ...
c69f5c483bec4db6d429cd8533aa072f0c945d1712bb49354a84a7d49873f2f7
R
11,958
263
--- title: "Using NHANES to Train and Project into HRS" author: "Dayoon Kwon" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Using NHANES to Train and Project into HRS} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_c...
52396ca55edbbb9b04518449867de1cec0ad3c0004ab61d81ed799b2d5b69112
R
11,969
275
library(Maaslin2) library(funrar) library(dplyr) library(ggplot2) library(cowplot) library(here) library(glue) library(tidyverse) here::i_am("src/ASO/ASO_L2_L6_Maaslin2.R") ### Note: First remove "#Constructed from biom file row" ### Fraction ASV table into respective subsets --- # Load metadata once metadata <- rea...
1acc1f48c923c0e51992e83d2161ae6f3bac6474fd8dbb912a9a289ec157e306
R
11,986
296
# ==== TODO # * Make sure BLUP/BSLMM weights are being scaled properly based on MAF suppressMessages(library("optparse")) suppressMessages(library('plink2R')) suppressMessages(library('glmnet')) suppressMessages(library('methods')) suppressMessages(library('Seurat')) suppressMessages(library('caret')) option_list = l...
12ff3041a9882c3df46d7ea153d8e174f80ebfd2f4f924f7718bdf26a617bedc
R
12,017
377
#02_ES-Ana_associated_with_AD.R rm(list=ls()) library(topicmodels) library(MetaTopics) library(dplyr) load('./Gibbs_model.RData') #1.ES-Ana probability: logistic---- map=read.csv('./03_table/00_meta_all.csv',header=T) map$age=map$Age load('./Gibbs_model.RData') n_topic=15 LDA_20_1_df <- as.data.frame(Gibbs_model@...
cec7304c6b96ea651d629a529e14603fe369a79bb7550bcc7f36960b92f19d2a
R
12,034
446
--- title: "Bayesian Assessment of HFA Correlations And Time to Turnaround" output: html_document date: "2024-10-14" --- ```{r setup, include=FALSE} ## libraries ## library(tidyverse) library(ggplot2) library(lmerTest) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(lmtest) lib...
1b22925c1d1463eda497dcebb887fb590762e6f5eaf8b919951949a3e371546b
R
12,051
370
--- title: "Bayes Factors for Rising/Falling Coherence" output: html_document date: "2025-08-14" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default wi...
5217f88d0b7fa55f70b1b9414eac03ae041aa5b568fcb82d2f0c68ea210a5249
R
12,115
367
--- title: "Calculate Correlations for Turn Time Analysis" output: html_document date: "2024-04-29" --- ```{r setup, include=FALSE} ## libraries ## library(tidyverse) library(ggplot2) library(lmerTest) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(lmtest) library(scales) lib...
e600aeee841b10d44cdace5ab064906ce9114cd7d30dc815de85020e047002fc
R
12,166
418
# ============================================================= # GENE SET ENRICHMENT ANALYSIS OF MORTALITY-ASSOCIATED SOMASCAN 11K PLASMA PROTEINS # ============================================================= # COHORT: # Lothian Birth Cohort 1936 (LBC1936) # COX PROPORTIONAL HAZARDS MODELS: # Protein-level ass...
ce284403318d472047c8aa7ca0354d49a3092aedafad13fdf6cab628220c0cc6
R
12,193
291
##' Internal cross-validation can be used for estimating the level of ##' structure in a data set and to optimise the choice of number of ##' principal components. ##' ##' This method calculates \eqn{Q^2} for a PCA model. This is the ##' cross-validated version of \eqn{R^2} and can be interpreted as the ##' ratio of va...
1f4153787d06732dc18611595b34b3d35014d6f9032204c3286431831f3da09d
R
12,196
327
# ------------- Figure S5 -------------- #----Figure S5A---- module2 <- readRDS("./yang/wang/figure5/module2.rds") module5 <- readRDS("./yang/wang/figure5/module5.rds") M2.epi <- subset(module2,CELLTYPE %in% c("Epithelial")) M5.epi <- subset(module5,CELLTYPE %in% c("Epithelial")) M2.5.epi <- merge(M2.epi,M5.epi) M2.5.e...
bd92c8fc7148ec9aad9ff280dde63b48861377a6f6c6317397b4538ea4570e0a
R
12,221
445
library(tidyverse) library(synExtra) library(data.table) library(powerjoin) library(here) library(qs) synapser::synLogin() syn <- synDownloader("~/data", .cache = TRUE) rosmap_res <- syn("syn45053249") %>% read_csv() msbb_res <- syn("syn50934769") %>% read_csv() combined_res <- list( rosmap = rosmap_res, ms...
9ec74b8f51c8ef8da350404a1c687e78e161e2bec1f43baa38d8d442d1eeef86
R
12,227
164
# # # ### test: import various "datasets" generated from the same raw data, by processing them with various FragPipe versions and settings in the workflow tab ("experimental designs") # # devtools::load_all() # # dataset = import_dataset_fragpipe_ionquant(path = "C:/VU/projects/Remco - Shisa6 IP WT-KO (2015)/fragpipe/v...
55f3bef9dac191dade1a1e2977b1a4770b1ea051efd1cafff3fad425a8dc327d
R
12,281
356
# Get all the sample directories sample_dirs <- list.dirs(path = "Box-Box/Harini_RNASeq_NGN2-iN/files_code/STAR", recursive = FALSE) # Find ReadsPerGene files in each directory count_files <- file.path(sample_dirs, paste0(basename(sample_dirs), "_ReadsPerGene.out.tab")) count_files <- file.path(sample_dirs, paste0(bas...
35dfbbc7a3cd290fe833e16fe2952f830e8e664e24831afc4cd704b16e7a8fd3
R
12,288
243
library(Seurat) library(tidyverse) library(harmony) #loading inHouse data counts <- Read10X_h5("CS12_1_matrix.h5") CS12_1 <- CreateSeuratObject(counts$`Gene Expression`,assay = "RNA",project = "CS12_1") counts <- Read10X_h5("CS12_2_matrix.h5") CS12_2 <- CreateSeuratObject(counts$`Gene Expression`,assay = "RNA",project ...
fa2b3e4aeb38f9ca1ecda358a6f393ff3e0d66dea56a4d8c2d18a39277149162
R
12,354
385
--- title: "Subplots for Supplemental Figure 5" output: html_document date: "2024-11-19" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of fi...
9df47838cdf0d102a93bc2a94a3c6138d819f08ebf952bff70aad630f95248df
R
12,387
306
### Imputation # # # # Imputational relations were chosen based on the correlationmatrix and additionally # # # # logical relations were taken into account library(jsonlite) pfad <- "C:/Users/Masterthesis_Mayla/Step4_specific_match all_ and_some_ROI/Result/" paths <- list.files(path = pfad, pattern = "*.txt", full....
1e305c5fdb8fd89b3168ecf0061bd47468e79613fae85ea798d88dd85a22ab22
R
12,413
227
#' wrapper function for peptide-to-protein rollup #' #' converts a table with peptide-level abundance values to protein-level data by combining data from respective peptides per protein (per sample). #' #' @param tib peptide tibble in long-format. missing values should be set NA, not zero. required columns: peptide_id...
71eab91c455fb1bc8eb10006e290bc5673f1ae277bf4718be94ffe45bd028d89
R
12,422
294
#' Guess experiment data from a set of filenames #' #' main function, remaining functions are internal / utility #' #' Assuming input files are somewhat well formatted, #' we here try to detect sample groups and other metadata to populate metadata table for user's convenience #' #' #' example; wt1, wt2, ko1, ko2, ... ...
0bb5f15eb32159c28e101c1a3540256d84c6b0748e20c31f653dce6c2126a786
R
12,431
255
library(qs) library(Seurat) library(tidyverse) library(stringr) library(patchwork) library(glue) base_dir <- "/n/scratch/users/c/cao385/Ependymoma/dj83" script_dir <- "helper_scripts" source(file.path(base_dir,script_dir, "single_cell_preprocessing_helper_functions.R")) source(file.path(base_dir, script_dir, "NMF_help...
547d3367757712960fde49e2995a550a21947e6505a3569ef1f5ee4e8d61d8eb
R
12,463
160
#' write statistical results to file #' #' combines both the DEA and "differential testing" results into output file differential_abundance_analysis.xlsx #' #' @param dataset your dataset #' @param output_dir path to existing directory #' #' @importFrom openxlsx createWorkbook addWorksheet createStyle writeData saveWo...
ca29d7539d8d1516a921f0c5d007d3c04cb4c2bdae3043aef4f4b1c955564881
R
12,469
518
# ---- libs ---- suppressPackageStartupMessages({ library("readr") library("dplyr") library("tidyr") library("lubridate") # way to handle dates better than default R way library("ggplot2") library("ggthemes") library("purrr") # map(), map2() functions etc library("stringr") library("knitr") li...
276d8fe3cafd81681b87bd08802248f54bafdc70cd6129ac200ce3f0e8fb46f0
R
12,489
413
library(sjPlot) library(broom.mixed) # for tidy() library(dplyr) library(emmeans) library(lme4) library(lmerTest) library(ggplot2) library(moments) library(ggeffects) library(robustlmm) library(glmmTMB) library(patchwork) library(forcats) library(scales) df <- read.csv("E:\\work\\q_backup_06_03_2025\\projects\\i...
4021e7e4882189b1d26935e85287dc7c7bb2d43404deef5ca9a306122c0895cb
R
12,507
389
--- title: "Cleaning BJH025" output: html_document date: "2023-02-09" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default width of figures fig.he...
1a0822a720c23d411e5aaaa46ad37a855e354628700b36e2dd0ba87d46fb322f
R
12,628
454
--- title: "Bayesian Assessment of Theta Correlations And Time to Turnaround" output: html_document date: "2024-09-23" --- ```{r setup, include=FALSE} ## libraries ## library(tidyverse) library(ggplot2) library(lmerTest) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(lmtest) l...
eaa1ad708977431621976245e454ff6ade01ccd6d852d695c9a9cfec2f4f2d87
R
12,634
553
--- title: "DRIAD additional JAKs" author: "Clemens Hug" output: html_document --- ```{r setup} library(tidyverse) library(synExtra) library(data.table) library(powerjoin) library(here) library(qs) synapser::synLogin() syn <- synDownloader("~/data", .cache = TRUE) data_dir <- file.path("driad", "additional_jaks") d...
63061771e9cf2e0e5005fb917c9d075e6222dffd1527125e218efbe7b628542e
R
12,662
417
library(tidyverse) library(synExtra) library(data.table) library(powerjoin) synapser::synLogin() syn <- synDownloader("~/data", .cache = TRUE) rosmap_quant <- syn("syn43841162") %>% fread() rosmap_key_mapping <- syn("syn3382527") %>% read_csv() rosmap_clinical <- syn("syn3191087") %>% read_csv() specimen_met...
509ccc20a585151ac2205abcc22503c070b662ca6ccbb58addd12ba35c3d5a06
R
12,696
234
testthat::context("assert pipeline output equal to example from MSqRobSum R package") msdap::enable_log(FALSE) cl <<- msdap::initialize_multiprocessing() ######################################################## generate results ######################################################## library(limma) library(MSnbase) ...
837f2c7bcb1cb7a9c44889da74c165d48a5e1c0b966410abb45f9072669820a3
R
12,752
287
##' Perform cross validation to estimate the optimal number of ##' components for missing value estimation. Cross validation is ##' done for the complete subset of a variable. ##' ##' The assumption hereby is that variables that are highly correlated ##' in a distinct region (here the non-missing observations) are also...
c9faaa66ca945326ac8f2981a2046878cbea0d27cc77f4de18392b144239ee37
R
12,772
307
##' @include errorHierarchic.R ##' @include derrorHierarchic.R NULL ##' This is a class representation of a non-linear PCA neural ##' network. The \code{nlpcaNet} class is not meant for user-level ##' usage. ##' ##' Creating Objects ##' ##' \code{new("nlpcaNet", net=[the network structure], ##' hierarchic=[hierarchic...
f77e116c87866825f56b5df7e21338e98058916eb6eb4e17617db7eafe25b93a
R
12,775
390
--- title: "Fig 3 Roi Rising/Falling Plots" output: html_document date: "2024-11-21" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of figure...
6ca5ee135f0fa45e07dbb0359c5236b798e1c53713ed879f63d005576ca47b8e
R
12,918
258
# Here are the functions which deal with doing something with the actual spatial coordinates of the file (like subsetting according # to spatial coordinates etc.). These were originally written for the G34RV project, but are useful for other projects too. # function to return the coordinates of the centroid of a cell...
da42919dc705480ea2986076de74fc5017788f30d08a2b09f48adb4dc19e6ee4
R
12,954
462
#!/usr/bin/Rscript #' ----Goodness of Fit comparison across distributions---- #' Code to generate the results presented in Supplementary Figure 21 - 37. #' Provide (either via the CLI or with hardcoded paths) the count data and genes #' that are of interest to assess. The code will then : #' 1. Normalize and Cluster t...
4fd85d3a257285a8ca7517718f29e640bb99a8b83c0aa454b028e125f2e37110
R
12,981
421
library(dplyr) library(ggplot2) df<- read.table("taxon_ec_sel.tsv", header = TRUE, sep = "\t" ) new_df <- subset(df, select = c('X1812935', 'X2052056', 'X2714945', 'X33887', 'X37919','X1.13.11.37')) predictors <- c('X1812935', 'X2052056', 'X2714945', 'X33887', 'X37919') df_clean <- new_df[complete.cases(df$X...
af1a88d31b87a8057390f1f8e11cf0ed8067a626ea7b6a25956eebfacf231e19
R
13,016
295
#' Perform post-hoc differential gene expression analysis #' #' This function will perform differential gene expression analysis within #' differentially abundant neighbourhoods, by first aggregating adjacent and #' concordantly DA neighbourhoods, then comparing cells \emph{within} these #' aggregated groups for differ...
b841adb7749d518d12f6cefcfa73197495d0a734c8c94af383e2b899c53487d0
R
13,025
358
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # This script is to fit deep learning models using H2O for the manuscript in PLOS ONE: # "Growth rates on coral reefs peaked at 25 °C through the Holocene" # by Tonya Macedo and Robert van Woesik # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
50829b334185b72cc6333a0c913503ea2d35a9dc1197bd4a560294e2679aa833
R
13,131
331
create_last_away_events <- function(df, fname) { last_away_df <- df %>% filter(Trial != "ITI") %>% filter(trial_numeric != 0) %>% filter(died == 0) %>% mutate(neural_trial_numeric = trial_numeric - 1) %>% group_by(neural_trial_numeric) %>% mutate(towards_ghost = if_else(Direction == "Left" ...
3b6ebf80b4fcacdf485232c647688a44479f48f6ab6ff49f79a1c9aed3e3d818
R
13,163
228
#' Merge technical replicates prior to downstream analysis #' #' @description #' Replicate measurements of the same "biological sample ID" are merged by this function, updating the peptide and #' sample tables; foreach set of rawfiles (sample_id in the sample metadata table) from the same biological sample, #' all but...
36c1f1d86389e45cfb8ea9553330b2112371fc3d789935347dfd9527a71501f2
R
13,174
443
--- title: "Compile iEEG Onset ITI LOGGED Baseline" output: html_document date: "2023-09-12" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default wid...
47dbb34423eb4f128043c0567879fcce2cd52200255aafd8dd12a4788b7403e9
R
13,176
340
## DoAll # INACT_TIME: -1: pre only 0: peri only 1: post only 2: pre+post # LESION vs CONTROL, ZEN: # 11685 11670 11696 1703 1706 1712 1718 1722 (1726) vs 1700 1709 (1714) # Often exclude 1726 # LESION vs CONTROL, TYR: # 1964 1986 1992 1995 1998 2002 2005 vs 1968 1971 1973 1978 # 4,-5 6,4 6,8...
02be2e2f67876a47d83947cee67cec937acedb3251cbee570a00c50fceba42fc
R
13,230
348
--- title: "Average anterior-posterior difference plots" output: html_notebook --- Version 1.0, July 2025, SA This script takes matrices from ClustRobust.m, which are adjacency matrix that show where clustering is consistent across people. It reads this information in and selectively averages together the anterior-po...
c263e7fe96f4ae4132257bfd1a2c9d4e09416f8a86cc1b151986d4427adb8f8e
R
13,285
410
### Bayesian Helpers pull_bayesian_model_summaries <- function(model, coef_name){ post <- as_draws_df(model)[[coef_name]] # Replace mean=0, sd=2 with your declared prior for this coefficient bf <- bayesfactor_parameters( posterior = post, prior = distribution_normal(n = 50000, mean = 0, sd = 2...
b593b9199e777af0f144e4b6b8d3f5353ce6ebeb87d75b1cfcf3b97a16c624ff
R
13,314
280
# Load packages ----------------------------------- rm(list = ls()) library(data.table) library(tidyverse) library(crayon) library(ape) library(readxl) library(qs) library(cowplot) library(Seurat) library(ggpubr) library(future) library(SingleCellExperiment) library(SingleR) library(celldex) # Organize environment an...
7de7af8ae3e49aad05d122474cb74b33b0cb6359ba69f1464757e696b4ca52bf
R
13,374
658
--- title: "Cleaning BJH027" output: html_document date: "2023-09-01" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default width of figures fig.hei...
2c9d3eb25aed262084e86347254a28499d94ef5755d2d38e57bbd9b2edffccae
R
13,453
411
--- title: "hNPC_scRNAseq_analysis" author: "SabaShahin" date: "06/06/2023" output: html_document editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` load required libraries ```{r} suppressWarnings(library(dplyr)) suppressWarnings(library(Seurat))...
0f440966518395f3770a4f017e2c8fc4afb6aefcf7df4c1a3f6c5924bdf138bc
R
13,612
418
# helpers.R # ------------------------------------------------------------------------------ # Helper utilities for protocol-style examples # # These functions support streaming FASTQ parsing, pattern alignment/extraction, # Phred-quality based filtering, and conversion to a flat table. # # Dependencies: ShortRead, Bio...
81a62d5e99600a94ae6c1f384abcd39a655cd22ab21962d09b92b01e0d2b5952
R
13,698
407
--- title: "Rising Connectivity - Imaginary Coherence" output: html_document date: "2024-06-02" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default wid...
a12c05ad15a2b995d1ced26de781f45d4c8057d804da3bad09a1dfa1fe371c47
R
13,735
520
--- title: "AD vs healthy GSEA" author: "Clemens Hug" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library(here) library(tidyverse) library(data.table) library(synExtra) library(qs) library(powerjoin) library(ggrepel) synapser::synLogin() syn <- synDownloader(normalizePat...
dd651de072b2729b8141b5f08bbeae9798512a92454863d78f2f2152cc37fcd9
R
13,742
237
#' placeholder title #' for reference, standard pca (does not cope with missing values); summary(stats::prcomp(t(matrix_sample_intensities), center = T, scale. = F)) #' @param matrix_sample_intensities peptide or protein abundance matrix #' @param samples sample metadata table #' @param samples_colors sample colors in...
419655f4d16cf00d11aea57e298a6bb08ffc9fdc654c250fea218f555b1e4059
R
13,834
250
#' Import a label-free DDA proteomics dataset from OpenMS, experimental feature ! #' #' This parser is based on output we generated with OpenMS 2.5 using input data and parameters/instructions from: https://abibuilder.cs.uni-tuebingen.de/archive/openms/Tutorials/Data/iPRG2015_Hannes/ #' #' Check the file "run_lfq.sh"...
6222b4d3cf5bd12d3188671ca175641c03c1a9109aa679e0e73b5ee3bb7b73c2
R
13,966
770
--- title: "Cleaning BJH029" output: html_document date: "2023-09-01" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo <- FALSE, # don't print the code chunk warning <- FALSE, # don't print warnings message <- FALSE, # don't print messages fig.width <- 5, # set default width of figures fig.he...
bdcf17bf32f4752e9223315428ac5afefc0cc9c24f5de83fd00b5995cb435225
R
13,975
393
### Approach Theta Coherence ~ Time ### ## libraries ## library(tidyverse) library(ggplot2) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(scales) library(brms) ## load data ## conn_df <- read_csv(path(here(), "munge", "combined_ghost_connectivity_newsubs.csv")) ## split the...
e540f1cde6e002051f8039642f8942018aed607a8acf491829bccb93cd4d8dec
R
14,018
424
--- title: "Subplots for Supplemental Figure 6" output: html_document date: "2024-11-19" --- ```{r setup, include=FALSE} knitr::opts_chunk$set( echo = FALSE, # don't print the code chunk warning = FALSE, # don't print warnings message = FALSE, # don't print messages fig.width = 8, # set default width of fi...
f6ad41c0ea4edc4f95cec2ca40ed3a1b10e78de4abbce953b0ae5df3c1f09010
R
14,024
388
# doPower.r ########################################################################### # Set basic parameters # ######################## AREA = "LIP" MONK = "tyr" # zen, tyr, both (don't use both: R calls will merge monks) MEMORY = F # T or F - can only be run with Zen, LIP (have not tested...) ALIGN = "" # "" (targ...
e0f47a9a0037f6df390cee76b60be568e0ab603dceae5ee8438d44b640bbc1cd
R
14,074
284
library(Seurat) library(tidyverse) library(harmony) library(patchwork) #loading inHouse data counts <- Read10X_h5("/Volumes/Extreme SSD/Mouse_cellranger/E9_1_matrix.h5") E9_1 <- CreateSeuratObject(counts$`Gene Expression`,assay = "RNA",project = "E9_1") counts <- Read10X_h5("/Volumes/Extreme SSD/Mouse_cellranger/E9_2_m...
cafd749cbd74d9bb7efdac5c7a9c0fefd6b07cc451d20472d9a18720264d1165
R
14,118
399
### Avoid Theta Coherence ~ Time ### ## libraries ## library(tidyverse) library(ggplot2) library(doParallel) library(parallel) library(foreach) library(here) library(fs) library(scales) library(brms) ## load data ## conn_df <- read_csv(path(here(), "munge", "combined_ghost_connectivity_newsubs.csv")) ## split the dl...
881e2e4d828a5bf2efbaae762f45000b14166a30878c57f4fc96e93f6d3f8743
R
14,190
275
rm(list = ls()) library(data.table) library(tidyverse) library(readxl) library(crayon) base_dir <- "/Users/sdaniell/Dropbox (Partners HealthCare)/Sara Danielli/Project/Ependymoma/6 - scRNAseq models" resources_dir <- file.path(base_dir, 'scripts/resources') source(file.path(resources_dir, "single_cell_preprocessing...
5624cc1984ee35860274c6c218d418a8b61193ad1bb43a6bfdac962ab95f8356
R
14,195
434
# Taken from https://github.com/Vivianstats/scImpute # find_hv_genes #' @importFrom stats quantile .find_hv_genes <- function(count, I, J){ count_nzero = lapply(1:I, function(i) setdiff(count[i, ], log10(1.01))) mu = sapply(count_nzero, mean) mu[is.na(mu)] = 0 sd = sapply(count_nzero, sd) sd[is.na(sd)] = 0 ...