sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
c2d2ebff731c839d5a61b16fa264149bd5514ce4b00bfc2cabfdd6183559c35e
R
5,938
151
############################################################################################### # Script to clean confounder effects from expression data # This script performs: # 1. Loads preprocessed RSE data with outliers removed # 2. Handles duplicate samples (keeps RiboZeroGold or highest RIN PolyA samples) #...
d1a20b46a3d305032c7acd08ba6eeb5d5b13cb26af1e60021b394c37629e34d7
R
5,938
109
################################## # Inspect the longitudinal differentially accessible genes across malignant cell states # Author: Kevin Johnson ################################## library(tidyverse) library(ggpubr) library(EnvStats) proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut" fig_dir <- file.pat...
154a4c7aa47189292ddbf7935a8b9d843c5982d1fd8c716a8f2467f55d3be033
R
5,946
133
#' banc-community — Build the BANC ↔ MANC per-neuron community lookup. #' #' Joins NBLAST + manual matches for community-curated downstream analyses. #' #' @section Reads: #' - SeaTable `banc_meta`, `banc_manc_v1.2.1_nblast.feather`, `manc_neuprint_meta()` #' #' @section Writes: #' - `banc_manc_community.csv` ####...
7cb130f90ac6bf3d56e2f8860506a3ef147854f31fe20a2da7e1adec769650d6
R
5,947
161
# Outline: The purpose of this script is to compute Bayes factors for mu and beta ERS and ERD, in a selected sensor (ususally C3) and in a set of labels (i.e., ROIs) # Import packages library(BayesFactor) library(reticulate) library(ggplot2) library(scales) library(effsize) library(abind) np <- import('numpy') # This ...
0b35db8c2ffbc2545b8d051e047c3d66ac43523ad894f340454c564d3a4aafbe
R
5,952
114
# Load necessary libraries library(ComplexHeatmap) library(Cairo) library(circlize) # For colorRamp2 # Choose Dataset_H <- 'GSE160189_186538_Integration' Dataset_M <- 'GSE185862' row_order <- c("ExN_H", "InN_H", "Astro_H", "Micro_H", "Oligo_H", "OPC_H", "Endo_H") column_order <- c("ExN_M", "InN_M", "Astro_M", "Mic...
be5272af59f8ffbb8b8121bd97589b5a40c9eec282fada69ada89618ed02ce94
R
5,955
162
--- title: "Linear models for ECG data" author: "Joonatan Palmu" date: "`r format(Sys.time(), '%d.%m.%Y')`" editor_options: chunk_output_type: console --- # Init ```{r options, include = FALSE} knitr::opts_chunk$set(include = TRUE, echo = TRUE, message = FALSE, results='asis', cache=FALSE, warning=FALSE, collapse ...
87f01e340e04cf7ff45463c4bf437af33f2a8292390f47d219646b1bda4e2ecd
R
5,962
211
--- title: "Diffusion Decision Model (DDM)" description: "A step-by-step DDM workflow in EMC2" author: "Niek Stevenson" output: rmarkdown::html_document bibliography: refs.bib vignette: > %\VignetteIndexEntry{"Diffusion Decision Model (DDM)"} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r...
922cc8dec4951055a75b5f08a5dcb4f64c4eb5abbf3ddba25d2b3e4997fe27f9
R
5,977
114
# Moderate effect size genes project # Author: Madison Caballero # Desription: Parsing a variant file and reorganizing information into families. library(data.table) library(stringr) args = commandArgs(trailingOnly=TRUE) # Arg is family (Father_Mother) id system(paste0("rm intermediates/", args[1], "_valid_probands.t...
e052d8cde78a3f9de515ff8a24bdec6a27d7d10a71f1ef8a8c01548d8d6c7e51
R
5,981
104
ReadTSV = function(tsv_file) { # We need to filter out header lines beginning with '@'; # however, the standard 'fread("grep ...")' causes issues with the default Docker container, so we use a temporary file. # See https://github.com/broadinstitute/gatk/issues/4140. temp_file = tempfile() system(spr...
b82f723002234998dd20d8070aeecb49ba0f3ca9ee6eb41feec7c589691d57bb
R
5,982
191
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(patchwork) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) .winsorize_sd <- function(x, ...
034c0af064fe2786c5f38297f5050143d23869e210bd7cf030c661377d48fc3e
R
5,983
222
library(Seurat) library(ggplot2) library(scCustomize) library(patchwork) library(RColorBrewer) library(viridis) library(dplyr) library(stringr) #Use the diet Seurat object data <- readRDS("diet_nodomap_metadata_updated_2510.rds") DefaultAssay(data) data <- SetIdent(data, value = "cluster_number") table(Idents(data)) l...
f7b382d43a18b348de598723f9e5ba7ffe97da2baf4fda37e2b34a3b1ceb859d
R
5,985
190
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(patchwork) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) .winsorize_sd <- function(x, ...
4a3dc0d56233b6c0904b8ca1b1854ea36e77697190d1a61069fd1ade794159cb
R
5,987
158
#' Plotting debarcoded sample yields as a function of the separation threshold #' #' @param bc.res The debarcoding results to plot #' @param sep.threshold If provided, adds a red line corresponding to the separation #' threshold in use #' #' @return Returns a ggplot object #' @export plot_barcode_separation <- functio...
dc441193b9d14520464250b682754e137bc72d37b40f2fa5c96e5b17ff051e1c
R
5,998
147
######################################### ### Calculate accurate BANC skeletons ### ######################################### source("banc/banc-startup.R") # Direct us to the BANC dataset choose_segmentation("flywire31") # must do this due to bug in skeletor R code? # Read IDs banc.meta <- banctable_query() %>% dpl...
78b5ee1e3668b27fd03faa84f7d35ec7073ea2e81ee8845e5b75828b030fb39a
R
6,015
141
######################################################### # DISPLAY JITTER PLOT WITH FEATURE WEIGHTS FOR FACTOR 8 # ######################################################### library(MOFA2) library(dplyr) library(ggplot2) library(ggrepel) library(scales) library(ggthemes) library(...
1765b399a6d58773880f0618362f515b908345c10b1765ee7c3d5166e5892cfd
R
6,018
158
#packages library(knitr) library(dplyr) library(ggplot2) library(tidyr) library(ragg) #Load data chr.frq.data <- read.csv("D:/Stats.stuff/chr.freq.csv") chromosome_order <- c(as.character(1:22), 'X', 'Y') table1 <- table(chr.frq.data$Sig.con.vs.ad) table2 <- table(chr.frq.data$sig.ad.vs.add10) freque...
9c818aa1d24c4d329d728c7bcdb9cf9d786611e06ec865dfb951cf1e1ce67dda
R
6,025
127
library(dplyr) library(tidyr) library(readr) ############# Mouse ############ #### Create gene coverage matrix gtf_path_M <- "/data/resource/reference/mouse/Mus_musculus.GRCm39.112.gtf" gtf_table_M <- read.table(gtf_path_M, header = FALSE, skip = 5, sep = "\t", quote = "", comment.char = "") colnames(gtf_table_M) <- ...
53fa00d15611b5aeeb4c53914bcc3e3986635afcc8250d79b927a8d7115928fb
R
6,027
166
#!/usr/bin/env Rscript # ============================================================================ # ## mgngtus_figureS3.R ## MGNG-TUS study: Make plots for Figure S3A-C. ## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025. rm(list = ls()) # ==========================================...
7c30af6ae1addb78201d6232703a637d575a346b93588fd3521350ff16f5dcff
R
6,028
157
library(ggsankey) kegg_data <- ego@result kegg_data2 <- kegg_data %>% separate_rows(geneID,sep = "/") kegg_data2$logFC <- d$avg_log2FC[match(kegg_data2$geneID,d$X)] sankey <- kegg_data2 sankey <- sankey %>% arrange(Description) %>% mutate(Description = factor(Description, levels = unique(Description))) sankey2 ...
d183e90a5bb3440180a98370010e6f5a79ee03fea946b818b22e662228c1c4eb
R
6,034
132
#makes diag plots for all .rds files in dirname and outputs to same dir ml_plot = function(runname, datatype){ #label names based on data type if(datatype %in% c("bind", "bindv2", "bindv3")){ xlabs = c("Error (log10(M))", "Observed Delta(log10(Ka)) Binding") ylabs = c("Predicted Delta(log10(Ka)) Binding...
b8921085562661f9a1d513020da8a6ac9c5915a726a89d80f9c1c59e67aa80ea
R
6,036
110
ses_theme <- theme(axis.line = element_line(linewidth = 0, colour = "black"), strip.background = element_rect(color = "black", fill = NA, size =1)) + theme(panel.margin=unit(.1, "lines"), panel.border = element_rect(color = "black", fill = NA, size = 1), strip.background = element_rect(color = "black", fill = NA, ...
0387fef0e011bce8394361755c268af49f26157b81d3e951ea4bb66817641e79
R
6,052
139
library(VariantAnnotation) library(tidyverse) ## Parse snakemake if(exists("snakemake")) { vcff = snakemake@input[["vcf"]] ssvcff = snakemake@input[["ssvcf"]] mfcvf = snakemake@output[["mfcov"]] genof = snakemake@output[["geno"]] infof = snakemake@output[["info"]] case_barcode = snakemake@wildcards[["case...
61166c465b2a7ee2c014fa5e4a70bc4f7c87fe2d0101845db6f19f7a335fd2ae
R
6,052
169
##################################################################### # Brain Tissue Gene Expression Prediction Training Pipeline (Basic Elastic Net) ##################################################################### # Required packages required_packages = c( "data.table", "dplyr", "glmnet", "parallel", ...
bf36b54006e8bb8d792bcee715d281a5b00870872d05d7f6aa75a1718cad57bf
R
6,063
139
## ============================================================================ ## Alpha diversity comparison between two groups ## - Reads a wide-format diversity-index file (one column per group) ## - Performs IQR-based outlier removal (optional) ## - Tests group differences with Kruskal-Wallis + pairwise Wilcoxon (F...
69b7b609fdcd786e1507e5b0d5962040e49575080f16e967b62d0f1b5fd77e3a
R
6,066
193
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(patchwork) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) .winsorize_sd <- function(x, ...
becaabe68bcddf88623bed16eaeb99d836dbcab50541847db1cd2ec36aae4076
R
6,067
175
packages <- c("ape", "nlme", "ggplot2", "ggimage", "rsvg") installed <- installed.packages() for (pkg in packages) { if (!pkg %in% rownames(installed)) { install.packages(pkg) } } # Load required libraries library(ape) # For phylogenetic tree handling library(nlme) # For gls() and correlation struct...
e9d09f5dab2028fc75e7f28d8e76c41f337648fce160faa81c3b0215ea791642
R
6,076
148
here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS7.R") library(tidyverse) library(cowplot) library(ggtree) library(CroCoNet) library(RColorBrewer) library(here) wd <- here("data/neural_differentiation_dataset/CroCoNet_analysis/") source(here("scripts/4.paper_figures/helper_functions.R")) fig_dir <- here("d...
b8691d0b074e06ea00a8ffb72c6bdae41e94224f8d613829d7d8506ace5ac894
R
6,077
162
cover_dt_weighted <- function(dt, weight_col = NULL, by = c("seqnames", "strand", "sample"), return = c("rle", "pos"), nworkers = 1L, # zero-fill options ...
2aaba42c6751b074f423d44c3b7f43ff9fe972ae321fd5feba571b89cb70d522
R
6,081
218
--- title: "LC-MS/MS analysis RAD50" author: "Thomas Boutet" date: "11/14/2023" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` # libraries ```{r} library(ggplot2) library(ggrepel) library(dplyr) library(magick) library(cowplot) library(patchwork) library(stringr) ``` # p...
636ee15d2002ae5b279604e9090a89c77df3d4467d14e9c6f0afc13aa7c238f5
R
6,081
170
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
79a6c282d88c7878b707eaf556b0395c822fa483692f9fcf8689d625c788b763
R
6,082
154
--- title: "Adjustment of Alignment Strength with conos" output: rmarkdown::html_vignette: vignette: > %\VignetteIndexEntry{"Adjustment of Alignment Strength with conos"} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- This tutorial uses the same data and methods as the main [Conos Walkthrou...
14f313acb2e7b82f36438b3856d0d7f5ad22ca032abb076764160567afea3941
R
6,083
156
## Figure S2 #### tell_user('done.\nCreating Figure S2...') resx=300 png('display_items/figure-s2.png',width=6.5*resx,height=3.0*resx,res=resx) layout_matrix = matrix(c(1,2,2), nrow=1, byrow=T) layout(layout_matrix) panel = 1 ### A CRL abundance #### par(mar=c(3,4,3,1)) pep_stds = read_tsv('data/crl_pepstds.tsv', ...
07f3dcf4a690d159dc9b3403193f16034f87729d1a0070f4af8aedcbe37dcc84
R
6,084
144
# plot SPP1 locus: HiC and ATAC data highligthing loci of interest setwd('/work/tdietl/collabs/Anita/') hg38 = c('chr4', 87850650, 87993426) macFas6 = c('chr5', 85478479, 85611097) hic_tracks <- list(hg38=c("hic.H_IPSC.score_k100"), macFas6=c("hic.M_IPSC.score_k100")) hic_track_names <- list(hg3...
8a99e754abd404c101778ee0183ec109e87305cd8fb4acabae9d0e2cbdcad335
R
6,085
209
# Note: These codes were transferred from RVenn 1.1.0. # The author is Turgut Yigit Akyol. # Method for intersection ======================= #' Intersection of many sets. #' #' \code{overlap} returns the same elements of the sets in a \code{Venn} object. #' #' @param venn (Required) A \code{Venn} object. #' @param ...
7e3a84e1d2d5a9ce0a0c83433d66d19fad49c70b2f79aca54dc7f43dfa2d0209
R
6,089
144
## Source data need to be imported as "data". See README file on github for further instructions. library("easypackages") libraries("tidyr", "dplyr","openxlsx", "readxl") # Start from scratch, data import and { data_NT <- read_excel("Supplementary File S1 (input file for sign prediction and rendomization).xlsx", sh...
8d27898effec65b123254b5cc9ba98d071315820395a6a5673bb328a2c9bf52c
R
6,092
181
################################################################################ ###############----------- TASK SIMULATION FUNCTION -------------############### ################################################################################ ## Simulates task data given a set of parameters --------------------------...
7e92fe50f2f99becf4c6e4962987a944e7929987f223686fe7b76bd2cfd35b8b
R
6,095
197
library(shiny) library(bslib) library(bsicons) library(DT) theme <- bs_theme( version = 5, bg = "#070B14", fg = "#E5E7EB", primary = "#3B82F6", base_font = font_google("Inter"), heading_font = font_google("Inter"), border_radius = "0.9rem" ) stepper_ui <- function(active = 1) { steps <- c("Upload", "F...
053d6b58c028e494375c341e46caeb677076cc113b0f8042c69795b054a75e47
R
6,096
137
## ##Load regNet package ## #- See https://github.com/seifemi/regNet for details how to install regNet. library( regNet ) ## ##Set the following paths according to your system ## #- Must be modified to fit to your own system #- Central project path prefix for regNet to store outputs of regNet centralProjectPathPrefix...
588553baac8c60d994b3371e6692846a87ed35c910f2d419dfbf81a5f3151880
R
6,099
158
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "ggplot2", "reshape2") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies = TRUE) } library(pkg, character.on...
51b2d25e17dbff7aba8012cd241b0b7026d6f3bf904837c606e81b8df837a062
R
6,113
257
--- title: "Add probes to comb-p results" 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: paged code_download: false ...
c00b898dcf5085d712a5beaae3a21a176bdced94ae65396a89214f6827a2227f
R
6,119
257
--- title: "Add probes to comb-p results" 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: paged code_download: false ...
bcbda6a4937e1ebb6aec880b60be4ada2dc8004fe6af95b10ffa3439daaa648b
R
6,122
164
#' Identify the image limits #' #' This function is useful for automatically cropping the images. It finds #' the edge points (min and max on both the X and Y axis) in pixels based #' on a particular image. This function takes advantage of the known design #' of Visium slides as documented at #' <https://support.10xgen...
9414079d68facb94edcb4bd45a1abc65c725bab3978e232c0126ae0ea7150ef0
R
6,124
166
# ================================================================================================= # DotPlot_allow_dups() # ------------------------------------------------------------------------------------------------- # Purpose: # A wrapper around Seurat::DotPlot() that accepts duplicate gene names in the featur...
ad06ddf002e3e435181013b3fa2811a74724d1941e589c30297cfd6dd75cf3d9
R
6,124
147
#' RESCUE #' #' Y_\{G x J\} ~= X_\{G x K\} alpha_\{K x J\} + R_\{G x J\} #' #' @param Y.count Gene x Grid (or Spot) raw count matrix #' @param X.count Gene x Cell raw count matrix from reference data #' @param X.cluster vector of cell type annotations for each cell from reference data #' @param C.grid vector of tuning ...
d4bf48ec1bf39f71064211e7b1c57e984187bb045314c352d3435aba8c81abd7
R
6,127
143
library(ggplot2) #### Define count matrices to process #### count_matrices <- c( "merged_matrix_R", "adjusted_merged_matrix_R" ) #### Read coldata (once, before loop) #### coldata_df <- read.table("/home/joonho345/1_Epilepsy_RNA/RNA_Animal/02.Quantification/filtered_coldata_R.txt", sep = ...
51a36faab09714010ee6a7a1e4df57eaca1131720c5784b59b4a1bc04d41e2c7
R
6,133
158
library(edgeR) library(biomaRt) library(nichenetr) # Get FADS1 neg genes i.e. geneset of interest Neg_net <- readRDS("my_big_negative_GTEx_DLPFC_list.RData") Neg_net <- Neg_net$ENSG00000149485_ %>% as.data.frame() Neg_net <- Neg_net$c..ENSG00000187961....ENSG00000236423....ENSG00000097021....ENSG00000116329... mart ...
c30fef8be1b748aae3bf51b29b9cd756ce6b05db4c86806725bdcaa160cf5e20
R
6,136
162
library(tidyverse) # Helper functions for constructing yHat of interest from asreml model coefficients output # ################################################################################ # Function to extract the specific part after the second colon extract_third_part <- function(name) { parts <- unlist(strsp...
af6187169cf334e43a7d8b7677dddf2fe43272d73447757aaa11a32d8f2cedc6
R
6,144
84
#' Get transcriptional regulators #' #' Selects relevant transcriptonal regulators by intersecting highly variable genes with known transcriptional regulators from the specified source(s). These regulators can be used in subsequent steps of the CroCoNet pipeline to assemble modules around them. #' #' This approach comb...
4a4981cf11380632efacd03eeb418c593dcdaab035681c5d0b68fd1a33e607c3
R
6,148
262
--- title: "Read in ADNI DNA methylation data" subtitle: "Filter to tripl Aplus samples" author: - David lukacsovich^[University of Miami] - Lily Wang^[University of Miami] date: "`r Sys.Date()`" output: rmarkdown::html_document: highlight: pygments theme: yeti toc: true number_sections: true ...
933359f0584cf40699fb75e3d86c58e021786d51ca6db6b5112a8b80cd423a4c
R
6,149
208
--- title: "Response Models" description: "Ordered and multinomial response models in EMC2" author: "Niek Stevenson" output: rmarkdown::html_document bibliography: refs.bib vignette: > %\VignetteIndexEntry{"Response Models"} %\VignetteEncoding{UTF-8} %\VignetteEngine{knitr::rmarkdown} editor_options: markdown:...
c3560f009a62223eac86bb6f3480d2ff5d1722689beb659b76dab43c9e9ae5f3
R
6,150
118
library(Seurat) library(Matrix) library(Cairo) ######################################################### #### Integration of two human datasets #### seurat_human_1 <- GSE160189_hippo_int seurat_human_2 <- GSE186538_hippo_int integration_name <- 'GSE160189_186538_Integration' ## Find common genes between the two datas...
6354d2707602f537149ca5dc5859b7d153fdc025807668f18a87e6f9d689ef0f
R
6,159
178
#' @title T-tests for symptom mapping (fast) #' #' @description #' Lesion to symptom mapping performed on a prepared matrix. #' T-tests are performed using each column of the #' matrix to split the behavioral scores in two groups. If #' var.equal=TRUE the Welch test is performed instead. #' This function relies on TTfa...
a20e2389bb87e4b142f8fac0071692cc6e5d16bbaf592664d7d7f332d27877c6
R
6,161
193
.oo_model_list <- function(model) { if (is.function(model)) { return(model()) } model } .oo_expanded_designs <- function(dadm, row_idx = NULL, model = NULL) { if (!is.null(attr(dadm, "design_pool"))) { out <- get_designs_expanded(dadm, model, order = "stored") if (!is.null(row_idx)) { out <- ...
e739acfb34db84b52a8af8e91b4cd7c06e1b875e05191bfff627e2c2c7042215
R
6,163
195
# Load libraries suppressPackageStartupMessages({ library(ggplot2) library(ggrepel) library(ggpubr) library(data.table) library(RColorBrewer) library(tidyverse) library(preprocessCore) library(future.apply) library(DESeq2) library(pheatmap) library(sva) }) dir.create("dge") load("futcounts/Expression_Input.RData") p...
d62ed2489f9b785ec3eb0d73d3be6d66c03b987306b84f71c1e4c555f9064f59
R
6,164
134
############################### ### GET HEMIBRAIN META DATA ### ############################### source("banc/banc-startup.R") library(neuprintr) # Get the meta data all.neurons.meta <- neuprint_search("Traced",field="status",dataset="hemibrain:v1.2.1") all.neurons.meta <- subset(all.neurons.meta, statusLabel!="Leaves"...
4c148421812dff874ad3d9e63139c0104bd88babfa1d4914c8faa425ce1f1252
R
6,169
120
########################################################### ### SUPERSEDED 2026-05-21 — use banc/metrics/banc-calculate-completion.R ### (section: "Proportion-on-cell ECDF") instead. That version is ### banc.version-aware and reads the 10 GB v2-enriched parquet ### (banc_meta.R output) rather than the raw 30 GB v821 CS...
7ef641c2caf6769a95def866b73329841fb187072356b41ab61a7e3194548010
R
6,170
109
library('BayesCircIsotropy') library('R.matlab') library('REdaS') library(tidyr) library(dplyr) # Computes the bayes factor in favor of the alternative hypothesis of von Mises # distributed data. # This version uses a conjugate prior. # conj_prior has mu0, R0, and c0, in that order. # prior 12 as in the ar...
564bd067a77f0f44150c347d9d4d0c2f72b4c116a12c4cbb527ca815c75b3205
R
6,174
148
#' selectSolutions.R #' author: Gavin Ha #' Dana-Farber Cancer Institute #' Broad Institute #' contact: <gavinha@gmail.com> or <gavinha@broadinstitute.org> #' date: May 14, 2017 library(optparse) option_list <- list( make_option(c("--ploidyRun2"), type = "character", help = "Directory containing TitanCNA results...
96a2754202b4659395582d497d335a917e9ddde00942f229c90acd30f12bb1ef
R
6,175
168
# script to check for inconsistencies in banc_meta source("banc/curation/banc_curation_init.R") # get banc_meta banc_meta <- banctable_query() # get franken meta franken_meta <- franken_meta() # select only the relevant columns of banc_meta # make sure columns with multiple entries are sorted banc_meta_sel <- banc_...
bc4b1cfef23b1b32acd788ecd8cbd5469bf12887f228a3f893e2af15c7cd215e
R
6,187
145
################################################################################ ###############----------- MODEL COMPARISON FUNCTION ------------############### ################################################################################ ## Conducts model comparison in a memory saving manner ---------------------...
eb52d6aa4e322b53d4e5d3148ffa85ec31106db283649465d074a3ff416e41a1
R
6,189
167
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # load influence scores ###################### #...
7d3d7b3b11a22705b0df9ed6a0ba92cf059ac5ffe1e7c93db9e4da61bf0cfcd2
R
6,191
143
# ================================================================================================= # apply_qc_thresholds() # ------------------------------------------------------------------------------------------------- # Purpose: # Apply the QC thresholds generated by qc_plots_by_sample() to a Seurat object and ...
894cededdc05d4c876482c80140d34e37b71a18b098b1b46ee97e4f2dfcb8034
R
6,192
133
library(foreach) library(dplyr) remove(list = ls()) #### Change Working Directory if Necessary #### #setwd("~/FC-Network-Replicability-Effects") # Set atlas parcellation directory path base_directory <- getwd() #### change the paths for your local paths #### setwd(paste0(base_directory,"/Data Preprocessing/Metadata"...
ec9d1b124578e9eb38535b242e9ebe0b961e77ec8472675a32384b418a22e49a
R
6,192
171
#' banc-nblast-search — Find BANC neurons matching a target cell_type via compiled NBLAST. #' #' Manual: set `search_cell_type` + `search_dataset` at the top; returns #' the top-N BANC NBLAST hits. #' #' @section Reads: #' - per-dataset compiled NBLAST feathers #######################################################...
ecaafbb15b4fd8e43a3e3f7e8f465ac38a2b241e76cb233291c685e8f20f5e19
R
6,192
147
#' banc-manc-nblast-images — Render per-query BANC↔MANC NBLAST review PNGs. #' #' @section Reads: #' - per-query NBLAST CSVs under `<banc.nblast.manc.save.path>/results/<ver>` #' - BANC + MANC BANC-space meshes #' #' @section Writes: #' - `<banc.nblast.manc.save.path>/images/<ver>/todo/*.png` #' #' @section Invok...
2129fdd0766d452bb756203824bad7ef3946f78408270c55e6342a5af6fb1727
R
6,196
180
--- title: "Feasibility and Acceptability Analysis" author: "Dr Emily Stanyer" date: "`r Sys.Date()`" output: html_document: toc: true df_print: paged params: data_dir: "Data/raw/feasibility" fig_dir: "Figures/feasibility" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE, message = FALSE...
36ee276791f33cfa2e438192fbe6a060779484c8f3c3b6f757709ba525a7e425
R
6,198
170
# ============================================================================ # Figure 2E: Dose Response — with individual replicate data points # Journal requirement: show individual data points behind mean ± SEM # ============================================================================ library(here) # Source t...
4bcd3c97b4bcd8ddc11340bb678d7eca3523e1371f63ae0e801b1e94a4d09cc3
R
6,198
183
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- ###################### ### load libraries ### ###...
9e405e13d512945722d08b1b1e94eb35f858906109108965e1a2e3120fba7d64
R
6,199
121
# MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score. library(dplyr) library(R.matlab) library(ggsegGlasser) library(ggsegSchaefer) library(ggseg) library(ggplot2) library(ggseg3d) library(cifti) library(stringr) library(factoextra) library(matrixStats) library(scales) libra...
6e489affb9f13190345d5288ca46b4cc19f0b5db804d5f2050f9b1c844ab8d73
R
6,201
196
--- title: "Follow-up Data Analysis" author: "Dr Emily Stanyer" date: "`r Sys.Date()`" output: html_document params: data_path: "Data/raw/follow_up/follow_up_data.csv" output_dir: "Output/follow_up/" fig_dir: "Figures/follow_up" --- ```{r setup, include=FALSE} library(here) # Define directories relative to the P...
c8b301bdc18dee6f278220be3f7a248428b20af7185e714573faf69ad3e58248
R
6,209
145
library(ggplot2) #### Define count matrices to process #### count_matrices <- c( "merged_matrix_M", "adjusted_merged_matrix_M" ) #### Read coldata (once, before loop) #### coldata_df <- read.table("/home/joonho345/1_Epilepsy_RNA/RNA_Animal/02.Quantification/filtered_coldata_M.txt", sep = ...
02b911ad915e1b2e068d1fb0f9b4b73d8ee5c5509e8c1ac19b915d25e586c258
R
6,214
216
## this imports the headers of a fast file quickly get_fasta_headers <- function(fasta.ref) { headers <- system(paste0("grep '^>' ", fasta.ref), intern = TRUE) return(headers) } ## this imports one sequence (according to the header argument) from a fasta file quickly extract_sequence_by_header <- function(h...
550b8eea7d6d8b3f80c6db9265715caa8fdeb540e53f4f1ad94a7092f61d19d3
R
6,221
206
######################################################################################## ### Cladogram - Endobiotics Cohort Proteomic GUSome ######################################################################################## ### Usage # Rscript ggtree_Endo_14_MPX.r ###############################################...
6490c72c7821c3cea1b465f33d02423631bb6ea39f238ab1b5ebc2df5bd72941
R
6,233
139
### KO efficiency 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") load(file = "./Output_Data/KO_LUT_paper.order2024-02-08.Rdata") load("./Output_Data/...
dd7d7eeaeda489d19ac5996b694b4e380df269b96f30b257347c07fceff98f98
R
6,245
104
################################################################################ # This R file contains codes to extract individual-level and injection venue-level parameters for HIV transmission model. # The synthetic datasets are in the forms of .csv and .rds. # Columns in the synthetic dataset resemble the actual ...
07434c1329cddcd70a837f5802276f68fa210f811e009716f4e647df3c1cb0e1
R
6,252
105
#' Function performs single inner fold nested cross-validation step. #' #' 1. Split data frame to training and test sets. #' 2. Perform model parameter tuning in training data using n-fold inner cross-validation #' 3. Test tuned model using independent test data #' #' @param #' #' @return #' #' @export nested_xgboost_c...
91511b3f6f61864f9e224646e2eb978381d7ba571f946cae1df4d7071c16ba7f
R
6,254
218
#!/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="input doublets scores") parser$add_argument("-m", "-...
0a098fd8a0e531409ec93bcea0da62601f8840222aa48d84cdfcb5ef50514e7c
R
6,277
211
#### Section: Model Fitting & Preparation #### prepare_stratified_anova <- function( df, responses, model, factor1_var = NULL, factor1_order = NULL, factor2_var = NULL, factor2_order = NULL, stratification = NULL, stratify_var = NULL, strata_order = NULL ) { req(df, responses,...
8a4a97b11126b0ebc79b1499654530928a1f20ec99e942e3474195151ab39c31
R
6,279
164
#------------------------------------------------------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...
e6ce2f561abcec527dff7cbfa506acbd6abb041edde984444c7c50311aa33f9a
R
6,282
161
#' These are wrapper functions for the ov.from.bam2 function, linear and parallel, respectively #' #' @export import.bams <- function( bamfiles, bamnames, write.filtered, bam.all=data.frame(NULL), force.create=F, filtering=c('all.reads.w.supp.ali', 'only.supp.ali.of.reads'), ...) { nbam <...
77899934df84de522dcafac2d8a750b839ebbfb95dedff694c5cb05aa2893f9d
R
6,290
194
# Make bed files to run LDSC # open R srun -n 10 -p interactive --pty /bin/bash module load cluster/gsl/1.15 module load cluster/htslib/1.9-devel module load cluster/build_tools/llvm/8.0 module load cluster/util/gcc/8.2 module load hdf5_18/1.8.21 conda activate r_env #conda deactivate R # Load required libraries ...
77b3650573679298757bdfb85438f5c9850864ce34aebb8a168353eec7d6ebe0
R
6,291
155
# Functions related to graph visualization of AUROCs. #' Convert AUROC matrix into a graph. #' #' This representation is a useful alternative for heatmaps for large datasets #' and sparse AUROC matrices (MetaNeighborUS with one_vs_best = TRUE) #' #' @param best_hits Matrix of AUROCs produced by MetaNeighborUS. #' @par...
a46b68c07e7fff5612c98b7f347e04fbbccf84a6d3052e1fdfcd622d8a08b975
R
6,302
170
#------------------------------------------------------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...
bb7d013a493c8bb7dcebba53a3b6df0eceadc6446e5929a6bd68dab53fbeb9e2
R
6,309
162
--- title: "Intersect_GO" author: "Iza" date: "2025-02-14" output: html_document --- This document is your **exact** script with added comments only. I did **not** change any code, names, thresholds, or paths. Caveats are marked with `# NOTE:` inside the chunks. ```{r} # NOTE: These RDS/CSV paths contain repeated "GO...
1e210c873328a18fea97e3b04afc18c2320cadcfa642c8db7bda5bfa07a087aa
R
6,311
183
--- title: "ldsc summary" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo=FALSE, warning=FALSE, message=FALSE, fig.align='center') ``` ```{r} library(tidyverse) require(forcats) library(RColorBrewer) library(pheatmap) library(qvalue) library(viridis) library(dendsort) sort_hclust <- fu...
0da056cc6253907b61fb697e5cd082a1b092846a7da8b4ee6caa55dbb59ebb46
R
6,314
135
# Load required functions from external scripts source("functions/count_occurrences.R") # Function to count categorical variable values source("functions/multiple_entries_to_vector.R") # Function to split comma-separated values source("functions/save_figure.R") # Wrapper for saving figures to fi...
c0dff4fdf5ab565e7dcd536f55c4b44b8a0c7192b1680be54ceb8a798b49bd20
R
6,325
153
#load libraries library(gwaRs) library(ggplot2) library(dplyr) library(ggrepel) #load in data Ext.DMR.Data <- read.csv("D:/ManhattanPlot/Ext.DMRs.con.vs.ad.meth.csv") Int.DMR.Data <- read.csv("D:/ManhattanPlot/Int.CONvsAD.DMRs.both.csv") ext.2 <- read.csv("D:/Second.Ext.Meth.Data.MtSinai.csv") #prepare dat...
d2a08a564e49e1096f9f52440f174bb2448ff3af86b219f88cf004c8cf42977f
R
6,327
176
##################################################################### # INGENE GTEx Prediction Pipeline ##################################################################### # Applies trained INGENE models to GTEx data to generate predictions ##################################################################### ...
5ba9f0f03dc0bd3ecf6585ad3b91cada02de3776a1d6d2b6f866210668e34c08
R
6,335
116
--- title: "Accessing the chunked graph server" --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ## tl;dr To set up programmatic access to FlyWire, use `flywire_set_token()` as follows: ```{r, eval=FALSE} library(fafbseg) flywire_set_token() ``` and follow the on-screen p...
c402aca38f95e707d9e16cba8e34b2e6d3f28e0bf12468cb5875675fbefbf6a9
R
6,339
243
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 ...
5d8bcacb2f3378464c49ef5fed19903dd2c34bc5cde7216218f2d0619f1f26a6
R
6,342
144
library(ggplot2) library(ggforce) 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 = '' screen...
98f9ddaa2837558b257a2480079154ec9e1ea86749f83956172b55d365e08e93
R
6,348
180
#' Extract significant genes #' #' From the layer-level modeling results, this function extracts the top `n` #' significant genes. This is the workhorse function used by #' [sig_genes_extract_all()] through which we obtain the information that can #' then be used by functions such as [layer_boxplot()] for constructing ...
22ebdae3007c99f522f1fa0b9738f25398f565d99af622c13c20d06a7496bae2
R
6,368
146
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Libraries source("banc/banc-startup.R") # Sett...
afc7055151c99708af6b9e3e6961bfc090c88d1c68624234ec93988cb5e966e0
R
6,381
156
#' Import cNMF results then export to an NMF object #' #' @param prefix \code{character} The run_name parameter from cNMF run #' @param metrics \code{character} Either score or TPM, default is score #' @param minRank \code{numeric} The minimum rank from cNMF run #' @param maxRank \code{numeric} the maximum rank from cN...
65c65dfda68d0ab51364c15e1932b41d3c340c0e8834c446954bacbbaa28686d
R
6,388
138
# ============================================================================== # Script 09: Figure 2D - FMI CDH1 Alterations (Local vs Distant Metastasis) # ============================================================================== # Description: Foundation Medicine breast diagnostic cohort: CDH1 alteration # ...
58c8d7eef3900c13f7df343a72a1d4f8f356651f218e1450dc90c467a3a9367f
R
6,390
192
################################################################################ # Faceted violin plots of gene expression # # - No hard-coded absolute/local paths # - Input/output are provided via command-line arguments # - Assumes an input table with columns: Gene, Expression, Group # - Produces a horizontal violin ...
9d0ac19484f1e3ac8646c2b879ac7a048d9739c71d27f9d68cf52bd5c56a8ffc
R
6,403
151
library(Seurat) library(ggplot2) library(patchwork) library(dplyr) library(data.table) library(viridis) data_dir <-"Br2720_all/Br2720_ant2/" brain <-Load10X_Spatial(data.dir = data_dir, filename= 'filtered_feature_bc_matrix.h5') # Change the co-ordinates from characters to integers brain@images[["slice1"]]@coordinat...
9d7e5144acddd54cb1a17708183575462333de024a780a24287b5b74f46b4453
R
6,412
200
.ordered_interval_prob <- function(lower, upper, pars, cdf_fun) { cdf_fun(upper, pars) - cdf_fun(lower, pars) } .ordered_cut_transform <- function(raw_cut, lR) { nr <- length(levels(lR)) if (length(raw_cut) %% nr != 0) { stop("cut vector length must be divisible by the number of response levels") } cut ...
9cb13282d267e9b7556c26fce4be15b07d7a19593945d7357130aff6f26a7c2b
R
6,421
184
--- title: "saraswathy_neurons" output: html_document date: "2026-02-18" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load Libraries ```{r} library(ggplot2) library(dplyr) library(tidyr) library(Seurat) library(readr) ``` Load datasets and visualize ```{r} # saraswathy dataset saraswathy_Ne...
0a4527a420bd98ee6e95e8dd3e1c9bbbf53946b6221507ac4abf28fb98c0a55b
R
6,424
145
library(parallel) # library(pbapply) #version 2 #optimizes meta-parameters using random search for given ml model according to best RMSE #writes tried parameter sets and error stats to file and returns best pred.df from crossval ml_tuner = function(x, y, filename, which.fold = 0, ...){ #unpack ellipses inlist =...