sha256
stringlengths
64
64
language
stringclasses
28 values
size
int32
1
491k
lines
int32
1
23.2k
content
stringlengths
1
200k
3b6f79906b6d17a1c36326be1bcc16e1c803fd4c2d03f228a02acc67426e819a
R
36,789
953
#!/usr/bin/env Rscript # Helper script to plot per-sample SV benchmarking vs. an external dataset ###Set master parameters options(stringsAsFactors=F,scipen=1000) rare.max.freq <- 0.01 uncommon.max.freq <- 0.1 common.max.freq <- 0.5 major.max.freq <- 1 tiny.max.size <- 100 small.max.size <- 500 medium.max.size <- 25...
bed2aede60e120c32595421925366836ccf76a943780553814bdab385043f6b8
R
37,086
902
--- title: "Triploid paper analysis" output: html_document: default pdf_document: default word_document: default date: "2023-12-20" editor_options: chunk_output_type: console --- ```{r setup, include=FALSE} knitr::opts_chunk$set(include = TRUE, warning = FALSE, echo=TRUE, message=FALSE) ``` ...
69a75f56d28569fd2f6d40728d3a2cf69412098c03d3189a2b41fc39eb99344e
R
37,239
968
basepath = "/net/trapnell/vol1/home/readdf/trapLabDir/hubmap/results/2021_07_15_Greg_ATAC_Code_nobackup/" # dir.create(paste0(basepath, "archr/results/NB6/")) out_dir = paste0(basepath, "archr/results/NB6/") setwd(out_dir) # load requirements suppressPackageStartupMessages({ library(ArchR) library(monocle3) lib...
aeb7f087edaa0102d27c13e6342349e712997d33856840a8d639def3fdb95cb7
R
37,359
1,029
--- title: "scRNA-Seq Analysis of Embryos dataset from Xu et al 2023" output: html_notebook --- ## Intro ```{r} ## Load libraries library(Seurat) library(harmony) library(ggplot2) library(SingleR) library(dplyr) library(patchwork) library(RColorBrewer) library(SingleCellExperiment) library(tidyverse) library(sctransf...
23ed11353975c16699a6ea4961198e83a524d704cbc806d53948c7de83c22fc0
R
37,718
994
#!/usr/bin/R # ----------------------------------------------------------- # Aggregate and plot chunked runs of MAST + RE for DGE # Plot the comparison between regressions on different pathologies. # Updated: 02/11/2021 # ----------------------------------------------------------- library(cbrbase) set_proj('DEVTRAJ') s...
a505ff5d8a16b7c406ff816a1f8f3f9ba8d127613d09dc2142cc211fcb2301cc
R
37,977
1,210
--- title: "Vertical Analysis MPA: Ctrl+Saline, NTI, Nalozone (hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "Date: `r format(Sys.time(), '%d/%m/%Y')`" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type...
258c8e6586162bf94587c16230b20b204b7a68e9a5af8e662dfaf13db6f6673b
R
38,097
919
#' Interactive function to build an l2 model specification for setup_glm_pipeline #' #' @param gpa a \code{glm_pipeline_arguments} object containing an analysis pipeline to which $l2_models #' should be added. If $l2_models is already present, these will be amended. #' @param from_spec_file optional YAML or JSON file...
0e12578e2d6fb0ebf904d0596a1fc5a3faa7f4bde387e86a82a41f14cda4c60d
R
38,127
1,385
--- title: "Vertical Analysis Pa: Ctrl, Saline (L, R; hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "Date: `r format(Sys.time(), '%d/%m/%Y')`" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline ...
0a3f8cd55a1a03e41dc45bc38c4cdafd57f0da96b18ac8f5511f8dae53547921
R
39,015
864
basepath = "/net/trapnell/vol1/home/readdf/trapLabDir/hubmap/results/2021_07_15_Greg_ATAC_Code_nobackup/" dir.create(paste0(basepath, "archr/results/NB9/")) out_dir = paste0(basepath, "archr/results/NB9/") setwd(out_dir) set.seed(7) # load requirements suppressPackageStartupMessages({ # library(ArchR) library(mon...
9877cbd0c2c55633fd8807a1a3d22f93f69364baf119c55d08121c3d4be0827e
R
39,287
1,157
#' selectAppearanceRatio - It represents, per ratio of appearance, the number of hubs included in the model together with the train and #' test performance of the model (Accuracy/R2). #' #' @param hubGenes the output of getHubGenes function containing both LASSO models and linear regression models #' @return a list co...
052a8d2bfe18099007897db4931ce6a997de5668de1c3186a2170a1de259415c
R
39,338
1,171
#' @include zzz.R #' #' @importFrom DT DTOutput #' @importFrom htmltools div h3 h4 HTML includeCSS p tagList tags #' @importFrom shinyjs disabled useShinyjs #' @importFrom shiny actionButton checkboxInput column downloadButton fileInput #' fluidRow htmlOutput icon numericInput plotOutput radioButtons selectizeInput #' ...
8b3aafd7001043161ccec82b64fa422bdd1f6a9d5f35afe6be10d3810868d1ca
R
39,735
854
# register bg_ custom classes so that DBI writeTable works with this as a formal (S4?) class setOldClass(c("bg_subject_data", "data.frame")) setOldClass(c("bg_run_data", "data.frame")) setOldClass(c("bg_session_data", "data.frame")) setOldClass(c("bg_block_data", "data.frame")) setOldClass(c("bg_trial_data", "data.fram...
a924c12e6f2e9410e686175d33289fbcc67946666b9f9f42abbf6513ef2e19b3
R
40,211
1,164
# Load packages ---- require(shiny) require(readr) require(DT) library(shinyhelper) require(stringr) require(dplyr) library(shinyalert) library(progressr) library(networkD3) library(rsconnect) library(RCurl) library(shiny) library(ASySD) library(shinythemes) library(knitr) library(shinycssloaders) library(htmlwidgets) ...
0cc74360cd7cd87217dd50dba014153a5228477dcac5b4bf0bdf08267d69f361
R
40,251
1,041
#!/usr/bin/env Rscript # Helper script to plot per-sample VCF stats output from collectQC.sh ###Set master parameters options(stringsAsFactors=F,scipen=1000) rare.max.freq <- 0.01 uncommon.max.freq <- 0.1 common.max.freq <- 0.5 major.max.freq <- 1 tiny.max.size <- 100 small.max.size <- 500 medium.max.size <- 2500 me...
ea971847aab529a1a16f4edd0f3a735b78157cde439aca5d0380ebe799a17b8f
R
40,510
1,013
#!/usr/bin/env Rscript # Helper script to plot VCF benchmarking against external dataset ###Set master parameters options(stringsAsFactors=F,scipen=1000) rare.max.freq <- 0.01 uncommon.max.freq <- 0.1 common.max.freq <- 0.5 major.max.freq <- 1 tiny.max.size <- 100 small.max.size <- 500 medium.max.size <- 2500 medlar...
f309598fd94f8683dd5450a3abb2904d113c5d38f872ac8087e120618c04e14e
R
40,912
829
############################################################################################################ # Reads in important libraries for downstream analysis library(tidyverse) library(Seurat) library(SeuratDisk) library(SeuratWrappers) library(SoupX) library(pcaMethods) library(hdf5r) library(harmony) library...
ad5edf6c39585f9722af5b35d6c0690fa643e7e6cffafa03c87f7cdb3d096e29
R
41,098
1,446
--- # For vignette --------------------------------------------------------------- title: Plotting Functions in "hyperSpec" sutitle: "Manual of hyperSpec's Plotting Functions" description: "plotting: Manual of hyperSpec's plotting functions" # Authors ----------------------------------------------------------...
2f7c1a976ffbc13a4fbc30143518f59bdb5667356b4172eb7df2186e3cc02657
R
42,320
1,039
rm(list = ls()) # the code we are using is an amended version of radarchart function from fmsb library: # install # install.packages("fmsb") #install.packages("ggpubr") #install.packages("scales") #install.packages("stringr") # Library library(fmsb) library(ggplot2) library(ggpubr) library(scales) library(stringr) # ...
8ec65f1363d6836b04704dc7d59fa4529a9e3f16f80c719935be58956246e20b
R
42,371
1,009
#!/usr/bin/R # ----------------------------------------------------------- # Use the pathology to run some tests on linear mixed models: # Experiments on EC + methodology # Test: Ex-TOX3-TTC6 and Mic # Updated: 01/20/2021 # ----------------------------------------------------------- library(cbrbase) set_proj('DEVTRAJ')...
9178da65258ebdabfde7d2aa2a228268c726a1f8ec5980a9516a66d779f9a3b0
R
42,520
1,144
library(testthat) library(dplyr) library(tidyr) library(sccomp) # Per-slot RE design (see prepare_replicate_data(X_random_effect_slots = )) re_slots_from_mi <- function(mi) { lapply(seq_len(sccomp:::N_RE_SLOTS), function(k) mi[[paste0("X_random_effect_", k)]]) } test_that("replicate_data works correctly", { skip_...
c1062cd83a7dc705ae84d50d4b66e6e452451e46b4d3019fdd01cd3d6e7098b7
R
42,567
731
#' Run Monocle3 from Seurat object. #' #' Run monocle3 from Seurat object, performing its own clustering, partitioning #' and then creating a pseudotime trajectory and plots. #' #' @param input_files Character vector with paths to Seurat .qs files. #' @param input_names Character vector with sample names of input files...
b8ffe6f8d8848079bb5bc9ac67ececa6acb1ef7d72116ef03fd2be272a467fda
R
42,613
1,311
library(Seurat) library(dplyr) library(ggplot2) library(limma) library(muscat) library(purrr) library(scater) ########################################################################################################## setwd("G:/PFC_429_final_Spring2021/Data") pbmc=readRDS("Ast_integrated_batch_5000_le...
0ec70b5ee4d123e7cc17a4b1616cbd131a40db46e53ea67970c8efc6906b25f7
R
42,681
1,189
#' This function generates the inputs for level 3 analyses, where multi-subject data are analyzed #' in group analyses. #' #' @param gpa a \code{glm_pipeline_arguments} object containing analysis speecification #' @param l3_model_names a subset of L3 models to be setup by this function. If not specified, #' all mod...
7f79f09d2d1332995ff9fdfc688efcb82624d01df51a1bedd731e25b98fb297f
R
42,789
1,311
library(Seurat) library(dplyr) library(ggplot2) library(limma) library(muscat) library(purrr) library(scater) ########################################################################################################## setwd("G:/PFC_429_final_Spring2021/Data") pbmc=readRDS("Ast_integrated_batch_5000_le...
28d42aa458d2d60dbf4cb39925252790d12ee250dba9367736a7cc32235c95fc
R
42,877
1,311
library(Seurat) library(dplyr) library(ggplot2) library(limma) library(muscat) library(purrr) library(scater) ########################################################################################################## setwd("G:/PFC_429_final_Spring2021/Data") pbmc=readRDS("Ast_integrated_batch_5000_le...
b7bed146d9665cebe94d4521eae93b5de9498890fe7e63b61b72ac5b3efe565a
R
42,965
1,311
library(Seurat) library(dplyr) library(ggplot2) library(limma) library(muscat) library(purrr) library(scater) ########################################################################################################## setwd("G:/PFC_429_final_Spring2021/Data") pbmc=readRDS("Ast_integrated_batch_5000_le...
fb04c398c093617c4e92bede05ef0d335206992ae05e71b3a95bb41063324f9e
R
43,005
1,410
# Unit tests for sccomp_proportional_fold_change function # Testing from simple models to interaction models library(testthat) library(sccomp) library(dplyr) library(stringr) # Helper function to skip tests if cmdstan is not available skip_cmdstan <- function() { if (!instantiate::stan_cmdstan_exists()) { skip(...
4e34eb488e2a10575dc8a5f04954eb11787afd4e63671f7b4bd24c50b7f91381
R
43,176
648
rm(list = ls()) ############################# ## Load Relevant Libraries ## ############################# require(ggplot2) require(Hmisc) require(MASS) require(mgcv) require(ppcor) require(stringr) require(visreg) require(parallel) require(multilevel) require(stats) require(Formula) require(lavaan) require(lme4) requi...
64756493eab9dbe8f582e1506ecd6d2ee08a60f23afba01fd1605909b1b83325
R
43,229
894
library(tidyr) library(mgcv) library(gratia) library(tidyverse) library(dplyr) library(lme4) library(pbkrtest) #### RESIDUAL PLOT FOR GAMM INTERACTION, WITH SPAGHETTI LINES #### # Reworked from code from Dr. Bart Larsen resid_plot_int <- function(modobj,term,int.term=NULL,add.intercept=FALSE, group.var="modid", low_co...
036b8309a12a3a9edf25204c1d25b9d7f5c4e78c9a36ca80e583125d06b8c88c
R
43,360
1,174
#!/usr/bin/R # ---------------------------------------------------------- # Plot the average gene expression for markers for clusters: # Script used (pre-Sept 2020) for annotating clusters and removing doublets # ---------------------------------------------------------- library(cbrbase) set_proj('DEVTRAJ') source(past...
5f01cd6462c0955819e7ff33945df83db9512efd97329d81376ba183101e6b5f
R
43,474
1,096
#!/usr/bin/R # ----------------------------------------------------- # Investigate selective vulnerability of the EC neurons # NOTE: taking chunks out of this to split up and clean analysis. # Updated: 03/08/2021 # Cleaned: 12/06/2021 + # ----------------------------------------------------- library(cbrbase) set_proj(...
5c8bfcfd33651c16d1688e6dbc0d7ce8d79c9caa4db78f53f5e9f89d65c6a346
R
43,707
974
.mixed_by_normalize_pairs_args <- function(pairs_args, field_name) { if (is.null(pairs_args) || identical(pairs_args, FALSE)) { return(NULL) } if (isTRUE(pairs_args)) { return(list()) } if (is.character(pairs_args) && length(pairs_args) == 1L) { return(list(adjust = pairs_args)) } if (!is.list...
9096de66303859e9164c60416c401bc7addea7523f73c543ebddc8b99f482c48
R
44,020
801
#!/usr/bin/env Rscript # run like # ./ROI_TempCorr.R -ts /Volumes/Phillips/WorkingMemory/11155/20130418/SpatialWM_v1_run1_768x720.5/nfswkmtd_functional.nii.gz -brainmask /Volumes/Phillips/gm_50mask.nii printHelp <- function() { cat("ROI_TempCorr is a script that computes temporal correlations among ROIs defined b...
a92baf411fe1660055f7cbfe6b154280f5f574d504e19570f5b6cedab40dc6e6
R
44,027
1,240
#' @include zzz.R #' @include helpers.R #' @include ui.R #' NULL #' @inheritParams RunAzimuth #' @param reference Name of reference to map to or a path to a directory containing ref.Rds and idx.annoy #' @param annotation.levels list of annotation levels to map. If not specified, all will be mapped. #' @param umap.name...
8cded5821648bb24deb435f3e289bcde379ffb0d3ef2ff5a01e0213f01560226
R
44,138
1,278
--- title: "_Cardinal 3_: User guide for mass spectrometry imaging analysis" author: "Kylie Ariel Bemis" date: "Revised: 1 September 2024" output: BiocStyle::html_document: toc: true vignette: > %\VignetteIndexEntry{1. Cardinal 3: User guide for mass spectrometry imaging analysis} %\VignetteEngine{knitr::rmarkd...
edb6308ddd32ce0b697cb997577a08c980731443a8ad4d77295f79cdac491bbb
R
44,991
971
--- title: "scvi_analysis" output: html_document --- # Load libraries ```{r} library(tidyverse) library(DeepComBat) library(neuroCombat) library(CovBat) library(latex2exp) library(DescTools) library(GGally) library(ggfortify) library(ggpubr) library(umap) library(caret) library(matrixStats) library(twosamples) libr...
a00a263bd36922f18363fc5cac09e5fd23295b8dcbdb347bfe7aaf7c37f3cd00
R
45,032
890
library(data.table) library(dplyr) library(survival) library(survminer) library(ggplot2) library(broom) source("../00_read_prs.R") ######## Pre-defined functions pretty_number <- function(x, n_digit){ return(prettyNum(round(x, n_digit), big.mark=",", scientific=FALSE, drop0trailing=FALSE)) } ######## Make d...
461bd7af755d050b73ca2ba2646babc72c0609a7e759f90dc4fffe05cea4c4ac
R
45,087
827
--- title: "Considerations for Longitudinal fMRI Analysis in fmri.pipeline" author: "Michael Hallquist" date: "`r Sys.Date()`" output: rmarkdown::html_vignette: toc: true toc_depth: 3 vignette: > %\VignetteIndexEntry{Considerations for Longitudinal fMRI Analysis in fmri.pipeline} %\VignetteEngine{knitr::r...
3aa6015d3bad47726e21f92c968b384166e8d8d5550cf778f0d65658161feab8
R
45,517
1,130
library(tidyverse) library(broom) library(quickpsy) library(glmnet) library(rstatix) ########################################################################### # Load and preprocess data ------------------------------------------------ ########################################################################### data ...
2620349ebdc682612b70f6c5f44bbbac2235d9fbeff6d0eac7e2d4d511ee4b8e
R
45,904
1,128
# SPM design, estimation, and timing helpers normalize_spm_estimation_method <- function(estimation_method) { if (is.null(estimation_method) || !is.character(estimation_method) || length(estimation_method) != 1L) { stop("estimation_method must be a single non-empty string.") } if (!nzchar(estimation_method))...
9110d37a025c7db515e9bac28a05d61fb46ed99558c3749d0c498c9596921b12
R
46,604
1,182
#' getSamplingIndex - It splits samples into different folds for bootstrapped LASSO #' #' @param seed the seed number to ensure the reproducibility of the results #' @param exprData a data frame representing a gene expression matrix with genes as rows and samples as columns #' @param train.split the proportion of samp...
a7adc637deda2e1f86cbb85f06ef3fb8fb21c9102f1148f7036e694653540123
R
47,119
553
# Setup ------------------------------------------------------------------- library(raincloudplots) library(tidyverse) library(stats) library(parallel) library(lm.beta) library(summarytools) library(psych) library(GGally) library(cifti) library(ciftiTools) library(ggseg) library(ggsegGordon) library(visreg) library(mgc...
d4cb0225e64b137ff9ce5cc1d6f3dec88c6a3edcc27b4002a45bb5926ac8be67
R
47,398
1,380
#' Converts gene names of query to match type/species of reference names (human #' or mouse). #' #' @param object Object to convert, must contain only RNA counts matrix #' @param reference.names Gene names of reference #' @param homolog.table Location of file (or URL) containing table with #' human/mouse homologies #' ...
104734029617f98c1fcbf054013c540c75c24a3755fe23d93fbe955dd25b8cd5
R
47,653
1,160
#' Interactive function to build an l1 model specification for setup_glm_pipeline #' #' @param gpa a \code{glm_pipeline_arguments} object containing an analysis pipeline to which $l1_models #' should be added. If $l1_models is already present, these will be amended. #' @param trial_data a data.frame containing trial-...
66bffef946b9140e54a8bf94a7e9206d513e22db3a69019442abedbb16302cf9
R
48,568
1,276
#!/usr/bin/env Rscript # Script to analyze a matrix of coverage (binCov) values per contig per sample. # Performs the following: # 1) copy number estimation per contig per sample (with visualization options) # 2) sex assignment (with visualization options) # 3) [optional] PCA & k-means based sample batching (with visu...
4973f8ced872c2494fededb4dd9e28b1f7606eb348ca0291d60c6b3700807502
R
49,058
1,341
#' Helper functions for build_design_matrix #' #' These functions are internal helpers that implement specific stages of the #' design matrix construction pipeline. They are split out from the main function #' to improve testability, maintainability, and clarity. #' #' @name build_design_matrix_helpers #' @keywords int...
852ae13e8c870bc5385b863c050052ef76458d5e708581c3232910a48d89611e
R
49,237
1,609
--- title: "Vertical Analysis MPA: Ctrl, Saline (L, R; hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "Date: `r format(Sys.time(), '%d/%m/%Y')`" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline...
f758e4c53680b638625d1d680253acb0ae57fbe6490fd0eb24ad1b4e415894fb
R
49,349
1,156
osama_main <- readRDS("bulk_rna_mat.rds") library(readr) library(tidyverse) expression_matrix <- osama_main@assays@data$counts dim(expression_matrix) #20276 genes #76 samples phenotype_data <- as.data.frame(osama_main@colData) View(phenotype_data) all(colnames(expression_matrix) %in% phenotype_data$Sample) # FALSE su...
c5c9e63f365bfa120ae5dc6bc2bc456924b1b956a44fb708c43b61abee80e117
R
49,488
1,619
--- title: "Vertical Analysis MPA: Ctrl, Saline (L, R; hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "Date: `r format(Sys.time(), '%d/%m/%Y')`" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline...
4724fb9ebf5bbc8b7d0f5228212d465d4d91accd7d531d479fa4d663122c77d2
R
50,565
1,417
library(ArchR) library(Seurat) library(dplyr) setwd('/ArchR/subprojects') library(Seurat) library(ArchR) library(dplyr) library(tidyr) setwd('/ArchR/subprojects') library(stringr) addArchRGenome("mm10") ## BE SURE TO SET FORCE = FALSE TO NOT OVERWRITE ARROW FILES inputFiles <- c('/scATAC/finalWorkflow/clusters/clust...
1a3d1e87b86069c428682c5c9696a8659d6658a397ebb229fbe873e2958fda24
R
50,635
1,542
# Unit tests for setup_l1_models, setup_l2_models, setup_l3_models # ================================================================== # These tests focus on input validation and helper functions that can be # tested in isolation without requiring external data or cluster resources. library(testthat) # =============...
24507e275e3ca9e10cb3ed583aa72dd0ffb776a8d5611554a4d3d69ee5038726
R
50,915
1,224
--- title: "RNA-seq analysis" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # RNA-seq analysis ```{r, warning=FALSE, message=FALSE} # Load libraries and custom functions ----------------------------------------- library(easypackages) libraries("here","ggplot2","WGCNA","...
e9e87c64df97a4555adc8b9f721baaa0e2869f0c159f248210e281200ded7836
R
51,077
1,286
#' getSamplingIndex - It splits samples into different folds for bootstrapped LASSO #' #' @param seed the seed number to ensure the reproducibility of the results #' @param exprData a data frame representing a gene expression matrix with genes as rows and samples as columns #' @param train.split the proportion of samp...
286f937288d44aefc9f7f38fe9aa7d7eef8072113bb92a786700d36f00fa64c9
R
52,179
973
#' Creates an fmri design matrix, including timing files for for AFNI or FSL. #' #' @param events a data.frame that includes a column for the event type (e.g. outcome vs. cue), #' run number (1:n), trial number (nested within run, 1:x), onset, duration of event #' @param signals expects a list of list. The fi...
4428256693cbc3569d624cc4813e60e3d4058d8af94297d9b035bf3fa63ca074
R
53,436
1,100
#' Helper function to append baseline regressors to the convolved design matrix. #' These are especially useful for GLMs that use concatenated data for multiple runs, #' where run-specific intercepts and drift terms are needed. #' #' @param dmat_convolved The design matrix containing convolved regressors for all ev...
3bf9ad5e168d2fae90e62990ced6d76e6be69e32216f58433e824022a7ff15c9
R
53,547
1,510
--- title: "scRNA-Seq Analysis of Brain Organoid dataset from Testa et al 2020" output: html_notebook --- ## Intro ```{r} ## Load libraries library(Seurat) library(harmony) library(ggplot2) library(SingleR) library(dplyr) library(patchwork) #library(celldex) library(RColorBrewer) library(SingleCellExperiment) #library...
63a629e82b9a976b0deeb70209a4cd836eb27252abe0eca5b577d8dd86d0e2a3
R
53,869
1,318
#!/usr/bin/env Rscript # Helper script to plot VCF summary stats output from clean_vcf2bed_output.R ###Set master parameters options(stringsAsFactors=F,scipen=1000) rare.max.freq <- 0.01 uncommon.max.freq <- 0.1 common.max.freq <- 0.5 major.max.freq <- 1 tiny.max.size <- 100 small.max.size <- 500 medium.max.size <- ...
ffdca7f86247f0f29eea34bf68f99738933f2d7537f51c50073c03ac01904a0f
R
54,245
1,291
##HOUSE KEEPING## #Clear all variables to start from scratch rm(list = ls()) # IMPORTANT!!!!! If DEBUG is TRUE then you will not be able to get user input, # and groups will always unblind to A=Het, B=Mut, C=WT. DEBUG <- FALSE library(tcltk) setwd(tclvalue(tkchooseDirectory())) options(warn = 0) #Load appropriate ...
050f4652608ffd24a721340b89375c7406707967390e22d14a5668b7ccc726e2
R
54,296
1,376
--- # For vignette --------------------------------------------------------------- title: Import and Export Files with Spectra subtitle: 'Tutorial on Spectra File Import and Export for "hyperSpec"' description: 'fileio: Tutorial on spectra file import and export for "hyperSpec".' # Authors --------------------...
846776f8988a13232742da9aedddb1bcdddb8663f2dd6a36718af018466a9dbd
R
54,708
837
#' Runs CSIDE in intercept-only mode #' @export run.CSIDE.intercept <- function(myRCTD, barcodes = NULL, cell_types = NULL, cell_type_threshold = 125, gene_threshold = 5e-5, doublet_mode = T, weight_threshold = NULL, sigma_gene = T, PRECISION.THRESHOLD = ...
6ee1ef9f8b445acc79b8fcbad6c263185d960b9d3b87a17928b97b56ceda325b
R
56,138
737
# Setup ------------------------------------------------------------------- library(tidyverse) library(stats) library(parallel) library(lm.beta) library(summarytools) library(psych) library(GGally) library(cifti) library(ciftiTools) library(ggseg) library(ggsegGordon) library(visreg) library(mgcv) library(broom) librar...
af33d2cbdcca6cb61f62b170b8661d2032ff646defa94741a3a83679bb8635b9
R
56,263
1,224
#' Main Function for SCCOMP Estimate #' #' @description #' The `sccomp_estimate` function performs linear modeling on a table of cell counts or proportions, #' which includes a cell-group identifier, sample identifier, abundance (counts or proportions), and factors #' (continuous or discrete). The user can define a lin...
a911d841588fd11f5a9e2c096926c8921de9102cfed05a3af6db90a7174f47e8
R
57,100
1,143
#!/usr/bin/Rscript --slave # by_example_participants_all_tracts_linear_Blackman_piecewise_w_plots.R # Richard G. Carson: 4th March 2024 # revised: 4th March 2024 # store the current directory initial.dir<-getwd() # Specify the root directory root.dir <- getwd() # Specify the directory path for the output file outp...
1f9aca0adf5d5af6940bf8897ff4ace02c6427e8c76efb0a882b647e89b112a7
R
57,106
1,201
#' Getting GeneEffects matrices #' #' This function randomly generates the effect size of each evf on the dynamic expression parameters #' @param ngenes number of genes #' @param nevf number of evfs #' @param randomseed (should produce same result if ngenes, nevf and randseed are all the same) #' @param prob the pro...
505c2255b439a031bc301e669d4ea03d9a914283bed8e53c93c8b5b7bdcc5bb3
R
57,784
1,284
#' wrapper class for 3dClusterize #' @importFrom tidyselect everything #' @importFrom tidyr nest #' @importFrom RNifti readNifti writeNifti #' @export afni_3dclusterize <- R6::R6Class("afni_3dclusterize", private = list( # private fields pvt_input_file = NULL, # internal record of the input file to be passed...
01958aef9413d0291f2128522fdea2e935ab2b587a93ae8e471e5f5df67d2378
R
59,337
1,459
#!/usr/bin/env Rscript # Helper script to perform family-based VCF QC & plot results ###Set master parameters options(stringsAsFactors=F, scipen=1000) rare.max.freq <- 0.01 uncommon.max.freq <- 0.1 common.max.freq <- 0.5 major.max.freq <- 1 tiny.max.size <- 100 small.max.size <- 500 medium.max.size <- 2500 medlarge....
386689755439d9296f860e74d8fef382c6ec9a431a20303c9575a9fc1abb19bd
R
60,416
1,365
######################### ########Licensing######## ######################### # Breathe Easy - an automated waveform analysis pipeline # Copyright (C) 2022 # Savannah Lusk, Andersen Chang, # Avery Twitchell-Heyne, Shaun Fattig, # Christopher Scott Ward, Russell Ray. # # This program is free software: you can redis...
553d0421c4552782c02a6c017a7bef96d75223c0028aa47da0df98c0e9ac8b42
R
60,548
798
# Setup ------------------------------------------------------------------- library(raincloudplots) library(tidyverse) library(stats) library(parallel) library(lm.beta) library(summarytools) library(psych) library(GGally) library(cifti) library(ciftiTools) library(ggseg) library(ggsegGordon) library(visreg) library(mgc...
4d7bdcf6a520d7f42a98176f6507765dc6c701d45f4afb0d0cc6d952df01352c
R
61,151
2,014
library(Seurat) library(dplyr) library(ggplot2) library(limma) library(muscat) library(purrr) library(scater) ########################################################################################################## setwd("G:/PFC_429_final_Spring2021/Data") pbmc=readRDS("Ast_integrated_batch_5000_le...
bdc4dc28aca88b759a236f024b490a9bb882267e822a26731c8ed1b0a0191668
R
61,407
2,102
--- title: "Bilateral adrenalectomy: Pa (Pre, after adx, ADX+UBI, hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "10/22/2021" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline --- ```{r setup, include=FAL...
c543f2c424a63ddb4e03b425ef112ee3f05c3588ea998535a7ae1c8f76618a56
R
61,628
1,506
source("../../../sharedProjectCode/utility/singleCellUtilFuncs.R") modStatus <- loadMonoclePackages() print(modStatus) # sessionInfo() source("../../../sharedProjectCode/scRNA_Seq_Background_Code/backgroundMethods.R") processingNote = "DanaRulaTest_6-7-21" useScrublet = FALSE writeMatrixForScrub = TRUE scrubCutoff...
51003bb51577562865e256131441e004431eb55ae11c912b93e566ae2139e1a5
R
61,788
580
# This script performs the Bayes Factor analysis # Written by Rotem Botvinik-Nezer library(BayesFactor) library(dplyr) # clear workspace rm(list=ls()) # read the data use_z_scored_data = FALSE if (use_z_scored_data) { print("Using z scored data") data = read.csv("pain_evoked_brain_measures_z.csv") } else { pri...
6f4968a64fd78816232115698646df4759310a0e89bedb49f1f66b5c55360eb8
R
63,206
1,408
#!/usr/bin/env Rscript #--------------------------- # Batch CNV Interval Genotyping # Talkowski Laboratory # # Harrison Brand, Ryan Collins, and Joseph Glessner # Update May 2017 (implementation for SV-pipeline) # Update June 2016 (clean modules, smaller windows, multiallelic binning, denovo visual) # Update October 2...
ff4c7eac5dcf689817b0a1622076c4fe105be95642aaff37a534cab63ddea139
R
65,071
1,425
--- title: "scvi_analysis" output: html_document --- # Preprocessing ```{r} source("~/Documents/nnbatch/code/load_packages.R") library(DescTools) # all_raw <- read.csv("./data/raw.csv", header = F) all_cov <- read.csv("./data/covariates.csv") all_cov$SEX <- as.factor(all_cov$SEX) all_cov$DIAGNOSIS <- as.factor(all_cov...
9d841b985e04f3ec8f2e38bffca258a9fd7bb1c5cbc90a6c4924f92c4e5fc11f
R
67,954
1,305
######################### ########Licensing######## ######################### # Breathe Easy - an automated waveform analysis pipeline # Copyright (C) 2022 # Savannah Lusk, Andersen Chang, # Avery Twitchell-Heyne, Shaun Fattig, # Christopher Scott Ward, Russell Ray. # # This program is free software: you can redis...
d966cc0ce449df7b910a6c7b89be35337eabc2da943276e4d4c11dd698efe61e
R
69,269
1,547
#!/usr/bin/env Rscript #--------------------------- # Batch CNV Interval Genotyping # Talkowski Laboratory # # Harrison Brand, Ryan Collins, and Joseph Glessner # Update May 2017 (implementation for SV-pipeline) # Update June 2016 (clean modules, smaller windows, multiallelic binning, denovo visual) # Update October 2...
7392384a7a92c614180904d20ebd4d30bf47247f4b8aa1e5f7da29be8d993a6c
R
69,375
1,750
#!/usr/bin/R # ----------------------------------------------------- # Investigate selective vulnerability of the EC neurons # Updated 03/08/2021 # ----------------------------------------------------- library(cbrbase) set_proj('DEVTRAJ') source(paste0(bindir, 'multiRegion/load_metadata.R')) library(tidyr) library(lm...
87718329b667ce116ca0caba4f897a6a99af0a020e2172714343eb56436ca791
R
69,897
1,923
--- # For vignette --------------------------------------------------------------- title: Introduction to Package "hyperSpec" subtitle: 'The Main Manual of Package "hyperSpec"' description: "Introduction: hyperSpec's main manual." # Authors -------------------------------------------------------------------...
861758220a8f37ca04b2d7ca78b8ef0a66a25ceea3db3a3b666ee5df01303f39
R
71,009
2,036
# Define global variable # sccomp_stan_models_cache_dir = file.path(path.expand("~"), ".sccomp_models", packageVersion("sccomp")) # Define global variable (without version - version will be added in load_model when needed) #' Default cache directory for Stan models #' #' A global variable that defines the default c...
0dbd23e0087771e19059c56cf523229b22481b5d06024f1fcbc04e7c18d1a87a
R
72,216
2,121
# For the specified k, conduct PLSC where X = frequency metrics and Y = 10 cognitive # tests of interest. Do PLSC to find direction of loadings to flip, conduct # permutation testing on singular values, investigate bivariate normality and # outliers for significant latent variable pairs and correlate, # conduct boo...
a624c2d9fae26e1960c2aa1d8e474602b0c7d52689727d2e726b8180757196e7
R
72,263
1,514
library(data.table) library(survival) library(survminer) library(tableone) library(ggplot2) library(GGally) library(patchwork) library(gtools) library(plyr) library(Hmisc) library(mltools) library(RColorBrewer) library(ResourceSelection) library(pROC) library(corrplot) absolute_risk <- function(coxmodel,data){ cum...
c2d2c1b4ddadc9f07d6e185b8d726dbc092ac11ff25d48931a3e1722c1d6896a
R
72,428
2,126
# For the specified k, conduct PLSC where X = distance metrics and Y = 10 cognitive # tests of interest. Do PLSC to find direction of loadings to flip, conduct # permutation testing on singular values, investigate bivariate normality and # outliers for significant latent variable pairs and correlate, # conduct boot...
73d8b375d31adfe75104448349d13fc03a3ab7f4306094093b501fe574a9d8b5
R
72,756
2,131
# For the specified k, conduct PLSC where X = network # reconfiguration metrics and Y = 10 cognitive tests of interest. Do PLSC to find # direction of loadings to flip, conduct permutation testing on singular values, # investigate bivariate normality and outliers for significant latent variable pairs and correlate, # ...
ac1c8badda4ce70cfadbc41ae3d0c3301f792714016d0e981051e20c821c16a1
R
72,779
2,142
#' The application server-side #' #' @param input,output,session Internal parameters for {shiny}. #' DO NOT REMOVE. #' @import shiny #' @importFrom rlang .data #' @import data.table #' @import statmod #' #' @noRd app_server <- function(input, output, session) { # PERFORMANCE SETTINGS n_cores <- getShinyOption(...
6db5ec8aa597be492ccec100e737189ff9692b416a6e0c3fd52578b2c1a7106c
R
76,075
1,957
#!/usr/bin/R # ---------------------------------------------------------------------------- # Investigate the co-variation of selective vulnerability in EC/HC and others: # TODO: Neurons alone and neurons + glia # Updated 05/10/2021 # ----------------------------------------------------- library(cbrbase) set_proj('DEV...
17d08e7ccba693059470b4e792dd704d239ea4683d74c471c71fd58278aa794d
R
76,779
2,368
--- title: "Bilateral adrenalectomy: MPA (Pre, after adx, ADX+UBI, hand, machine)" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "9/23/2021" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline --- ```{r setup, include=FAL...
119b9a1c749c322a92b49c5def2b3acc9ca6b28eeb589533c0b88a21fdff5f6a
R
82,487
1,051
# This script creates plots for the paingen fmri placebo paper # Written by Rotem Botvinik-Nezer ################ # PREPERATIONS # ################ # load libraries library(ggplot2) library(tidyverse) library(ggpubr) library(Rmisc) library(Hmisc) library(png, include.only = 'readPNG') library(gridExtra) ## Clear wor...
2c1419030b1c9cc9676bd840ffc5e018c974273e2bd8f4712cb3501c65841c60
R
84,263
2,798
# Unit tests for build_design_matrix and all helper functions # These tests focus on individual function behavior rather than integration testing # ============================================================================== # Test fixtures and helpers # ==============================================================...
015984a0f156775191aafe982275412f8538a1ebf1db3499432a03eb8d2d6bd3
R
86,578
2,684
--- title: "SF, CI Variances" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "12/30/2021" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_output_type: inline --- ```{r setup, include=FALSE} # # rm(list = ls()) # gc() source("../Bayesian...
0403ba59106c338ed2e10cfd73d021ff21aee1f1a2c79130926a48e60478c2da
R
86,835
2,067
--- title: "Testing empathy hypothesis in pair bonding _Ranitomeya imitator_ males" author: "by Camilo Rodríguez" subtitle: "Statistical analyses Noteboook" date: "`r Sys.Date()`" output: pdf_document editor_options: markdown: wrap: sentence chunk_output_type: console --- # **Description** This is the deta...
b24c0987a1bad7cb662236d287033147f2687995d1aa17e263541787003b4f83
R
88,894
1,017
# Setup ------------------------------------------------------------------- library(raincloudplots) library(tidyverse) library(stats) library(parallel) library(lm.beta) library(summarytools) library(psych) library(GGally) library(cifti) library(ciftiTools) library(ggseg) library(ggsegGordon) library(visreg) library(mgc...
9385ce0acb76f2340b17df94fec41644f97789dfac32d179ef303edc934b0b57
R
97,156
922
--- title: "Longitudinal RSI~AP by Sex" author: "Devyn Cotter" date: '2022-04-28' output: html_document: fig_caption: yes toc: yes toc_depth: 4 toc_float: collapsed: no word_document: toc: yes toc_depth: '4' pdf_document: toc: yes toc_depth: '4' editor_options: chunk_output...
68decbda039814bf8b0f300fd209a1ebd27494386313bde38f96df780660522f
R
99,430
2,723
--- title: "Lung-brain axis" author: "Mark Ziemann" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: true code_folding: hide fig_width: 7 fig_height: 7 theme: cosmo --- Source: https://github.com/markziemann/lungbrain # Introduction Eslam’s Summary of RNA seq * Project title...
6467553d1d2ebc350fef79c123462728045d46def1165aea7cbc7ce9c974436f
R
104,116
2,642
#' Wrapper for running an AFNI command safely within R #' #' @param args AFNI command string to be run #' @param afnidir Location of AFNI installation. If NULL, the function will search the environment for AFNIDIR or afni on PATH #' @param stdout File target for redirecting stdout. If NULL, stdout will not be written t...
ef02a748310a61a004893eba62eb8192080dfd9015892fa77043b8ef7224b789
R
113,304
3,269
#load the packages library(edgeR) library(DESeq2) library(limma) library(org.Hs.eg.db) library(tximport) library(csaw) library(readr) library(ggplot2) library(ggrepel) library(WGCNA) library(ggpubr) library(bestNormalize) library(ComplexHeatmap) library(reshape2) library(tidyverse) library(caret) library(MASS) library(...
f7d66ef4fd339175b67b6b13160e42eae1b31a61bc4f15c46f3ca7910f6e610a
R
116,955
3,584
--- title: "SF, LR AI (Ctrl, BNI, FNA): Bayesian regression of smoothed stretch forces" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "Date: `r format(Sys.time(), '%d/%m/%Y')`" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options: chunk_ou...
fa3d2d163ea3c2b24354b6924be8737edb93fd14a42acb1813aa80ed557a20ff
R
133,613
3,977
--- # title: "SF, CI AI: Bayesian regression of smoothed stretch forces" title: "SF, LR AI: Bayesian regression of smoothed stretch forces" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "12/27/2021" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options...
9888ddb54f813ca4b4fa677f544945b02d27b934669d19d48a65d659c45a9eb8
R
133,802
3,961
--- # title: "SF, CI dW: Bayesian regression of smoothed stretch forces" title: "SF, LR dW: Bayesian regression of smoothed stretch forces" author: "Yaromir Kobikov <kobikov.yaromir@gmail.com>" date: "12/14/2021" output: word_document: default html_document: toc: true toc_float: collapsed: false editor_options...
6a30412a1fca935bf409a18f9edc66aa8256dd4277000af86eb2261c5329d06f
R
145,178
3,845
#' @include zzz.R #' @include helpers.R NULL #' Server function for the mapping app #' #' @param input,output,session Required Shiny app server parameters #' #' @return The shiny server logic #' #' @importFrom BiocGenerics width #' @importFrom BSgenome.Hsapiens.UCSC.hg38 BSgenome.Hsapiens.UCSC.hg38 #' @importFrom data...
f94316794e7b3b05e0c5e0a24773f380a0581642cb4d222f0bf88c6367e1b239
R
149,921
2,696
--- title: "NeuralSpatial: Statistics for Distinct neural mechanisms for heading retrieval and context recognition in the hippocampus during spatial reorientation" author: "Manuel Miguel Ramos Álvarez and the Muzzio Lab" date: "`r format(Sys.time(), '%B %d, %Y')`" format: html: code_download: true toc: true ...