sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
3f429ea5584c9c34789aa8d43efcb6325fd5cce0dfe33896016ca121536ae999
R
10,063
184
#!/usr/bin/env Rscript # Variables table <- "" cond1 <- "" rep1 <- "" # Number of replicates for cond1, automatically determined cond2 <- "" rep2 <- "" # Number of replicates for cond2, automatically determined output <- "" siglfc <- 1 # |Log2| fold change to be used as significant. Set at 1 by default,...
80330cb24ff4787beac0b3a812b12f7fb1ad061831e2748b2bb848d9c07f6163
R
10,077
134
# Primary analysis: refuses to run without a verified pre-results freeze. .libPaths(c(normalizePath('.Rlib'),.libPaths())) suppressPackageStartupMessages({library(DESeq2);library(fgsea);library(jsonlite);library(ggplot2);library(digest)}) source('src/transcriptomics/helpers.R') if(!file.exists('provenance/analysis_free...
f78681d80452740afd7350356c78b3c517009b85aafd81eddbd066e2f7557473
R
10,085
313
################################################################################ ### 1. script to process dnn predictions --------------------------------------- ### Marc Grünig --- 17.09.2024 ------------------------------------------------- #############################################################################...
ee1bda04c7acbf227f909a106ab6d44c4e995344cbe371429686b27209cf677e
R
10,127
280
--- title: "High-Grade Glioma Molecular Subtyping - Defining Lesions" output: html_notebook: toc: TRUE toc_float: TRUE author: Chante Bethell for ALSF CCDL date: 2019 --- This notebook looks at the defining lesions for all samples for the issue of molecular subtyping high-grade glioma samples in the OpenPB...
359213dac65f2097d2e5da1f8298e1b1cde50d17a5361a9e72d06e7ad3cdbee7
R
10,156
188
--- title: "tICA_Interspecies_Correlations" author: "AZ" date: "`r Sys.Date()`" output: html_document --- This script performs a comparative analysis of functional brain components derived via temporal Independent Component Analysis (tICA) from movie-driven fMRI data in marmosets and humans. The goal is to assess both...
fedd8717796844f96d65666020fb88795dc5d750efcff2d55a28478e9ee7527c
R
10,159
220
block <- function(){ # Preprocessing of detailing the metadata when available (Unused) ##### Detailing metadata ##### setwd("D:/valentin/main") BDR_all = read.csv("raw_data/BDR_FULL_PHENOTYPING.csv", sep = ";") #709 samples pheno_PFC = read.csv("./BDR_pheno.csv", sep = "\t") #1221 samples BDR_filter = BDR_all[...
3ad5257fa98f54098b8686dbc564919d45e2465157e6229c03f4ad978e72761d
R
10,181
391
test_that( "olink_qc_plot - works - OSI", { skip_if_not_installed(pkg = "ggrepel") osi_data <- get_example_data("example_osi_data.rds") # ---------------------------- # OSICategory invalid value # ---------------------------- df_bad_cat <- osi_data |> dplyr::mutate( OSICatego...
53404ee03ccc3b62ab9ef2e25dce91953b0f0545593bc74fab193e40b981bd54
R
10,189
340
--- title: "Gather CNV changes to subtype LGAT biospecimens" author: "K S Gaonkar (D3B)" output: html_notebook --- In this notebook, we will look for the following CNV changes that define subtypes of LGAT - LGG, FGFR harbors FGFR1 TKD (tyrosine kinase domain tandem duplication) - LGG, CDKN2A/B harbors focal CDK...
5cabf33a47f8a11aa0f3eb10b827e53734499a06210bc47c0294f08cbec8350b
R
10,196
345
#' Bridge selection function #' #' @description #' The bridge selection function will select a number of bridge samples based #' on the input data. It selects samples with good detection that pass QC #' and cover a good range of the data. If possible, Olink recommends 8-16 #' bridge samples. When running the selector, ...
409e4e5862ca5dc4360ed839c4f98bad0600e887a64199da56c2911f5b54d1a7
R
10,204
270
#--------------------------------------------------------------------------------------------- # R (version 4.2.1) code for visualizing hitgrams of climate datasets. # This code is developped for the following paper: # 'Predicting dominant terrestrial biomes at a global scale: # Assessments of machine learning alg...
d1bcf915ad272ecb0163a1cebcb10422d090fae4677bb6bc9b87e6c5ddda85ee
R
10,223
366
test_that( "olink_heatmap_plot - works", { skip_if_not_installed("ggplotify") skip_if_not_installed("pheatmap") skip_if_not_installed("vdiffr") # Load data with hidden/excluded assays (all NPX=NA) npx_data_format_oct <- get_example_data("npx_data_format-Oct-2022.rds") check_log_oct <- check...
7123339eebf2d1648e1d333c81855d54ce03a367360804ec16c616eafffe302a
R
10,234
222
### version of some panels without genetic insight filter cat(file=stderr(), 'Generating alternate pipeline tables without genetic insight filter...') combined_ti_germline_unfiltered = pipeline_best(merge2, phase='combined', basis='ti', require_insight=F, include_missing=F, verbose=F) combined_ti_omim_unfiltered...
a73121c9ea2bb046f30fe99c2805ee070d3b2331072e622312f0e69c21947961
R
10,262
209
--- title: "Using WHO 2016 CNS subtypes to improve LGAT harmonized diagnosis" output: html_notebook: toc: true toc_float: true author: JN Taroni for ALSF CCDL (code) ; K Gaonkar, J Rokita updated for LGAT date: 2021, 2022 --- CNS lgat have subtypes per the [WHO 2016 CNS subtypes](https://link.springer.com/c...
822ff2a096606fb388b5b879bace5d14fe9056217250ca51074201dc8eeab5a3
R
10,295
223
# Author: Sangeeta Shukla # This script servers as a precursor to the DESeq analysis step, as it calculates the GTEx_index, Hist_Index values # This script also creates Histology and Counts data subsets which satisfy given clinical criteria # Load required libraries suppressPackageStartupMessages({ library(optpar...
63378606ff860fe83422fd4779a9094b7e93826904b610d5a427ddbbcb542290
R
10,307
256
#'--- #' title: "Counts Summary: `r paste(snakemake@wildcards$dataset, snakemake@wildcards$annotation, sep = '--')`" #' author: #' wb: #' log: #' - snakemake: '`sm str(tmp_dir / "AE" / "{annotation}" / "{dataset}" / "count_summary.Rds")`' #' input: #' - ods: '`sm cfg.getProcessedResultsDir() + #' "/...
2a357f112d5cb206bc812533933dfb998fcd235d24d1a923176fff197c3910ca
R
10,325
202
library(tidyverse) library(data.table) library(dplyr) library(mice) library(survival) library(bigreadr) #read into files setwd("/path") # Logistic Regression Functions # Function for brain imaging traits (includes scanner position covariates) log_reg_brain <- function(phenotype, inputdata){ logres <- a...
2ba1f9c68a30473c7db4ee6e13781dda04f4565ff0e07f9ce540c25636f5c6b8
R
10,340
291
library(scSeqComm) library(scrattch.hicat) library(scrattch.vis) library(scrattch.io) library(Matrix) library(Seurat) library(dplyr) library(rhdf5) library(pbmcapply) library(OmnipathR) library(graphite) library(data.table) library(corrplot) library(ComplexHeatmap) library(stringr) library(ggplot2) setwd("/mnt/DD/Sc...
8c60ce4d9694ba1739fc66afce18d1a52408d522eb7526d77095f1e0863df399
R
10,369
210
#Author: Kim Kundert-Obando for questions please reach out to me at k.rogge.obando@gmail.com #This code will be a function that runs mixed model while correcting for age, #gender, and, ethnicity in the FC comparisions with state and trait anxiety and outputs the beta an p-values results #install and open packages #i...
80b3c964375f8ddcd97a4d289154f5e5fb7c7af1e1b73dadcf9ccf45b38c2037
R
10,407
173
# similarity analysis of ciliopathies using propagation scores # Libraries ---- library(tidyverse) library(ComplexHeatmap) # Load necessary files ---- pageRankScores = readRDS('data/pagerankScores.rds') #calculated network propagation scores for ciliopathies traitAnnotation = read.csv('data/traitOverview.csv') #la...
9ae2c628d1915eff8295cbb46ba8b601ec95364aa797ad1a32885307ff493903
R
10,421
275
--- title: "NanoFlow: cDNA Transcriptome Report" date: 'Report created: `r Sys.Date()`' #bibliography: Static/Bibliography.bib output: html_document: css: Static/UoG.css df_print: paged highlight: null keep_md: yes number_sections: yes self_contained: yes theme: default to...
9c118bcec4b03555fdb25b549e98e8005777b9cbaa746eccd91b29e985635275
R
10,435
357
#' Convert Illumina IDAT Files to Beta Values Using sesame #' #' This function takes Illumina IDAT files, #' processes them using the sesame package, #' and returns beta values (DNA methylation values) #' along with quality control statistics and plots. #' #' @param idat The path to the directory containing Illum...
96a14f6a8914cbc0bc21d0ce8ac6399e2c0c43d8a56d026125e4d2099e8f3f70
R
10,440
289
#!/usr/bin/env Rscript # Load a Visium HD dataset into Seurat, run QC, normalization, clustering, UMAP, # and save the resulting Seurat object as an RDS file. library(Seurat) library(hdf5r) library(ggplot2) library(future) library(argparse) # give good tracebacks on errors options(error = function() traceback(2)) err...
ca14c09ddef46b22838a87ff7d1f8cd7a0e871e83ab87eb236e894d44cd4e95a
R
10,448
263
# Hua Sun # Edited original 'ScType' codes (https://github.com/IanevskiAleksandr/sc-type) # v3.2 2024-07-26 (Updated to support Seurat v4 & v5) library(dplyr) library(HGNChelper) library(readxl) ## gene_sets_prepare gene_sets_prepare <- function(path_to_db_file, cell_type){ cell_markers = openxlsx::read.xlsx(...
5fa89756a9c49f9ce5ab94bc0c42bca0fda86e96865d11135492172cea9ed245
R
10,458
345
--- title: "Circos Plots Examples for Visualizing SV and CNV data" output: html_notebook: toc: true toc_float: true author: Candace Savonen for ALSF - CCDL date: 2020 --- This notebook shows examples of how to use the circos_map_plot function for mapping data that corresponds to chromosomal coordinates....
cc1f2ef12ef85bd95c451eabdd319d8c8d1dad1fe313f062997b56c0026c07f0
R
10,466
341
# This script displays an oncoprint displaying the landscape across PBTA given # the relevant metadata. It addresses issue #6 in the OpenPBTA-analysis # github repository. It uses the output of 00-map-to-sample_id.R. It can # accept a gene list file or a comma-separated set of gene list files that will # be concatenate...
0092db9c4952daf4246045f133cdb94d337a8400fe4ea8e2de014da3e8ddde09
R
10,488
315
--- title: "Survival analysis by immune scores and molecular subtypes" authors: Run Jin (D3B), Stephanie Spielman (CCDL), Jo Lynne Rokita (D3b) output: html_notebook: toc: true editor_options: chunk_output_type: inline --- ## Setup #### Packages ```{r Set up library} library(survival) library(ggpubr) libra...
405231ba542cc54190227d264ebeeebb21d101553a919cd1d1f099a85834891c
R
10,529
272
library(catmaid) library(data.table) library(tidyverse) # get list of cell types in project -------------------------------------------- # assumes they have an annotation starting with "celltype:" get_celltypes <- function(pid) { annotations <- catmaid_get_annotationlist(pid = pid) celltypes <- annotations$annotat...
dc1bce398801f95cd170a073b95b1cec6f1692ecdbbe2743b44b569e9a34fe1e
R
10,533
294
--- title: "Statistics Functions" date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' output: rmarkdown::html_vignette theme: united vignette: > %\VignetteIndexEntry{Statistics Functions} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- *** <style> p.caption { font-size: 0.9em; } </style> `...
d2ea109f7ba346e13cec343c382df329a560493a60982923d63c5cd6a0029d23
R
10,566
191
Boxplot2 <- NeuroMET %>% filter(visit == "t1" )%>% select(record_id, diagnose, glu, gaba, glu_gaba, pTau_v1_group, diagnose_group, glu_CRLB, gaba_CRLB)%>% pivot_longer(cols = 3:5, names_to = "biomarker", values_drop_na = TRUE)%>% mutate(biomarker = factor(biomarker, levels = c("glu", "gaba", "glu_gaba"))) %>% #...
240ae9aff47fa2c0b0363650436ddd5273fd54b2e8976bd1947d2425e2a62e93
R
10,570
332
#' Function to simulate the protracted speciation process #' #' Simulating the protracted speciation process using the Doob-Gillespie #' algorithm. This function differs from pbd_sim_cpp that 1) it does not #' require that the speciation-initiation rate is the same for good and #' incipient species, and 2) that it simu...
f6b9eb02bc467e323656f690a4d6de7dc30b49a4ab568162b6354a295d9c3ab4
R
10,576
223
#' Function to parse CIGAR string into a set interval ranges. #' #' @param cigar.str A character string containing alignment represented as a CIGAR string. #' @param coordinate.space A used defined coordinate space given CIGAR should be parsed against, either 'reference' or 'query'. #' @importFrom GenomicAlignments exp...
550e9c6ab0978f8b007b21378ff17562e08652254cca487b9975a177dcdfb316
R
10,581
263
# Functions for chromosomal instability plots # # C. Savonen for ALSF - CCDL # # 2020 make_granges <- function(break_df = NULL, sample_id = NULL, samples_col = "samples", chrom_col = "chrom", start_col = "start", ...
d10fa418fc144becb8776833c88333ff7cd077f111ae80c9f9314ffd05613f9a
R
10,582
267
# Meta-analysis of scRNA-seq data of Neocortex developmental time points - Part 2 : Clustering --------------------- # E10-P4 # Rahul Jose # SCB, RGCB # October 2024 # Primary Aim : # For the identification of NIHes1 and NDHes1 cells across developmental time points # Data -----------------------------------...
f08b54728ad97357171331a469ed9116442c173975fc571fe2f35be2cc89a4f5
R
10,582
353
#' Function to plot an overview of a sample cohort per Panel. #' #' @description #' Generates a facet plot per Panel using ggplot2::ggplot and #' ggplot2::geom_point and stats::IQR plotting IQR vs. median for all samples. #' Horizontal dashed lines indicate \eqn{\pm}\var{IQR_outlierDef} standard #' deviations from the ...
a3d857eb212425aa25b131cfe575d985bc9c8ec3c0da1a28f199cb6253359eda
R
10,598
314
--- title: "Scanner_plots" author: "HannahSavage" date: "2023-08-21" output: html_document --- ## SET ENV ```{r setup, include=FALSE} library(readxl) library(dplyr) library(tidyverse) #library(ggplot2) library(reshape) #library(scales) library(sjmisc) library(scatterpie) library(showtext) library(psych) library(tidyr)...
8c5b6cdbfd26c4abb960a112a59b7da9d584155aab9058b4857b156aef23c741
R
10,601
378
# This script performs the following functions: # 1. DESeq2 tumor-only analysis with RUVg by molecular subtype # Authors: Komal Rathi, updated by Adam Kraya suppressPackageStartupMessages({ library(optparse) library(tidyverse) library(DESeq2) library(RUVSeq) library(EDASeq) library(edgeR) library(stringr...
8f8f6b4e9548fe9943beb1de68242b60081a853b3fdfebd50e38eda212a1089e
R
10,613
266
# Code to generate Figure 1 Supplements of the Jokura et al 2024 Ctenophore apical organ connectome paper # source packages and functions ------------------------------------------------ source("analysis/scripts/packages_and_functions.R") # show just a subset of celltypes, just the interesting ones celltype_map <- ...
a3a6ac24bd909eeee49dd053a7ce7ed3faec23a6ed2569f2a759be5b49cae65c
R
10,613
227
# modes that olink normalization functions may have olink_norm_modes <- list( "bridge" = "bridge", "subset" = "subset", "ref_median" = "ref_median", "norm_cross_product" = "norm_cross_product" ) # pre-populated dataset with column names and classes that the reference medians # input dataset may have olink_norm...
e341feddcf58052ddce74cd3cd0da5fd048d59ce4f4365bb4b4290d27bd5e5e5
R
10,623
362
# Instructions for creation of package msigdb gene lists # Create Gene Symbol Lists -------------------------------------------------------------------- library(dplyr) library(msigdbr) msigdbr_species() msig_dbr <- msigdbr(species = "Homo sapiens", category = "H") msig_oxphos_direct <- msig_dbr %>% dplyr::filter...
c67cd993bb5cd2736b1602a9856301a970e8c5b823396d2fa9fe03bcea2ddccd
R
10,632
291
--- title: "Pathway_Enrichment" author: "Tingting Wang" date: "2/28/2025" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = F) library(tidyverse) library(readxl) library(dplyr) library(ggsankey) library(tidyverse) library(cols4all) ``` # Create a list of selected metabolites (PATHWAY...
7347b8ec6e0c780f7b258447ea1a8587317b552e8a44452b567fd6dd331565fe
R
10,664
275
# Intended for import only # Chante Bethell for CCDL 2019 # # Assign function to perform the dimension reduction techniques perform_dimension_reduction <- function(transposed_expression_matrix, method, model_filename, ...
d19b4c52fc84b36e5ce5c6be7b260e22bd026be457110da2005388445319a2d0
R
10,676
198
source('src/figures/figure_style.R') .libPaths(c(normalizePath('.Rlib'), .libPaths())) suppressPackageStartupMessages({ library(ComplexHeatmap) library(circlize) library(DESeq2) library(jsonlite) library(grid) }) out_dir <- 'figures/transcriptomics' dir.create(out_dir, showWarnings=FALSE, recursive=TRUE) sp...
b6144c5c74bbe4dfc446d9390c2ead93db8d9cc46c8c39507837b3e5a87673cb
R
10,688
375
#' Help function to read long or wide format #' `r ansi_collapse_quot(x = get_olink_data_types(), sep = "or")` data from #' delimited #' `r ansi_collapse_quot(x = get_file_ext(name_sub = "delim"), sep = "or")` #' files exported from Olink software in R. #' #' @description #' The function can handle delimited files in l...
702cb7da9718d0683fc909a5fec0a563f093c3a07f7538869933f3b4a27768a7
R
10,713
227
rm(list = ls()) library(SummarizedExperiment) library(ComplexHeatmap) library(circlize) library(corrplot) library(limma) library(tidyverse) library(xlsx) library(ggrepel) #differential analysis function limma_comparsion <- function(data, meta, group_col, control = 'Control', case = 'Disease'){ compair.me...
20b61ba51ca3d2a103f82ae6e141e353c070f523de8565aa88c82f9c7c27fc9d
R
10,721
350
#' Function which performs a t-test per protein #' #' @description #' Performs a Welch 2-sample t-test or paired t-test at confidence level 0.95 #' for every protein (by OlinkID) for a given grouping variable using #' stats::t.test and corrects for multiple testing by the Benjamini-Hochberg #' method (“fdr”) using stat...
8229dd296311c17e2cafa07e43b471fbd3147fcf54d10eabbfcc6d0d9a1f79da
R
10,722
297
## Load data and wrangle # load packages library(tidyverse) library(readxl) library(gtsummary) library(ggdist) library(modelsummary) library(lmerTest) library(performance) library(datawizard) library(glmmTMB) library(emmeans) library(Hmisc) library(ggdist) # load data df_raw <- read_xlsx("Base de datos rTMS S1.xlsx",...
e6c1d1ea04287a324ffc2a086755d31dd4eeab2bc7862ae91f404e35ca7d29fc
R
10,730
312
#' @export mean_difference mean_difference <- function(x, y) { if (length(x) != length(y)) { stop("Vectors must be the same length") } mean_diff <- mean(x - y) return(mean_diff) } #' @export all_differences all_differences <- function(x, y) { if (length(x) != length(y)) { stop("Vectors must be the ...
810bc60d33dcc5f8dcbb3eb05dd18c5f0a05cb5dddf57a5b1ef5abe8a5cc7ce9
R
10,754
206
library(data.table) library(dplyr) library(mgcv) library(parallel) library(rjson) library(stringr) library(tidyr) source("/cbica/projects/luo_wm_dev/two_axes/code/fit_GAMs/gam_functions/GAM_functions_tractprofiles.R") # This script fits developmental nodewise GAMs on tract profiles data using functions from GAM_functi...
cf977fc20bce4ede82845e54c2f741d29b15a0d4872713c3b4d0341adfb0b9fa
R
10,769
269
library(pROC) data(aSAH) context("power.roc.test") # define variables shared among multiple tests here test_that("power.roc.test basic function", { res <- power.roc.test(r.s100b) expect_equal(as.numeric(res$auc), as.numeric(r.s100b$auc)) expect_equal(res$ncases, length(r.s100b$cases)) expect_equal(res$ncontr...
58a7ea30fb87cbd65697c60b5299d48c772933a513c9751343fb92568d014f44
R
10,772
338
--- title: "High-Grade Glioma Molecular Subtyping - Mutations" output: html_notebook: toc: TRUE toc_float: TRUE author: Chante Bethell and Jaclyn Taroni for ALSF CCDL date: 2020 --- This notebook prepares consensus mutation data for the purpose of subtyping HGG samples ([`AlexsLemonade/OpenPBTA-analysis#24...
5d28d4f76b1884972f5ba4b13fdb161707aafd6a1b4caff892742101f50b2ef5
R
10,780
200
############################################################################################################################################################# ############################################################################################################################################################# ###...
b39df5a6e6c938f1f887dc79a6eae1632a94e5c6a3327f8871d72f5fb08da359
R
10,785
337
# Analysis c) to investigate whether an increased PAD at baseline is associated with future conversion from CN/MCI to MCI/AD. # Load required libraries library(mvtnorm) library(data.table) library(LMMstar) library(mets) library(riskRegression) library(dplyr) library(lava) ### Script # Load excel file file_path <- her...
d3b8629ea9ea99d88ba430dd185baa75591619ec0b79957c0963fd930e486f57
R
10,812
253
# pROC: Tools Receiver operating characteristic (ROC curves) with # (partial) area under the curve, confidence intervals and comparison. # Copyright (C) 2010-2014 Xavier Robin, Alexandre Hainard, Natacha Turck, # Natalia Tiberti, Frédérique Lisacek, Jean-Charles Sanchez # and Markus Müller # # This program is free soft...
b07ac2f9719405fe4766c883f9b36e5d918a6ed9dcd6293f98c877e423fdb66a
R
10,860
319
# S. Spielman for CCDL 2022 # # Makes pdf panels for supplementary Figure S2, specifically those that are derived from the `snv-callers` analysis module. library(tidyverse) # Directories ------------------------------------------------------------------- # Establish base dir root_dir <- rprojroot::find_root(rprojroo...
32b09c67e5a015d24352116db59e59b1f6ab6f13a77c840a881c035cfa15a8ce
R
10,875
306
########################### Ground truth disease simulator ################ # # Objective: Simulate cancer targets, background mortality data, and relative # survival data for ground truth model ########################### <<<<<>>>>> ############################################## rm(list = ls()) # Clean environmen...
cfc0c3d3d23edcb84c891f5f24724108487b9952868a66ecd5ccb15d8951b137
R
10,882
292
--- output: html_document author: "Delphine Potier" output: html_document: code_folding: hide code_download: true editor_options: chunk_output_type: console --- ################# Script for histone marks (H3K27ac, H3K4me1, H3K4me3) in Jurkat WT and Jurkat CRISPR-edited clones (1D9,2G5 and 1B6). Made with ...
dce9cd8b1368d9f7f1900433a5af85b02ac5fd52eb70aebbeba61717ae89368b
R
10,885
359
#' Function which performs a Mann-Whitney U Test per protein #' #' Performs a Welch 2-sample Mann-Whitney U Test at confidence level 0.95 for #' every protein (by OlinkID) for a given grouping variable using #' stats::wilcox.test and corrects for multiple testing by the #' Benjamini-Hochberg method (“fdr”) using stats:...
f5b8bd817034a860d365e4b413c84c19a37bd6d5651a9ab0bb1d577f20ae37c6
R
10,934
386
# This script performs the following functions: # 1. DESeq2 tumor-only analysis with RUVg by molecular subtype # Authors: Komal Rathi, Adam Kraya suppressPackageStartupMessages({ library(optparse) library(tidyverse) library(DESeq2) library(RUVSeq) library(EDASeq) library(edgeR) library(stringr) librar...
42c117927f545affe6975524eb418b5cf04ffed9e3431bc8416cf4b0ecf1c05a
R
10,944
332
### analysis nuclear intensities single channel with different thresholds # go to main directory (parent directory of scripts) if (basename(getwd())== "00_scripts"){setwd("../.")} #load packages library("tidyverse") library(colorRamps) library(lmerTest) #define working directories in_dir = "./04b_int...
768323cfac84dedd013c449096f3cea2ec4240d202fb9e04eb85f6e60aa8c799
R
10,962
187
library(dplyr) library(parallel) library(tidyr) source("/cbica/projects/luo_wm_dev/two_axes/code/results/main_figures_functions.R") source("/cbica/projects/luo_wm_dev/two_axes/code/results/supp_figures_functions.R") # Spin tests for supplementary figures: tract-level Pearson's (age of maturation vs. S-A rank), and par...
ff4fb7fba5f546022eca33c7b4fe216e56993e38ad5fda636267df655443704f
R
10,983
237
#!/usr/bin/env RScript library(ggplot2) library(ggiraph) library(grid) library(optparse) # Getting options from command line option_list = list( make_option(c("-e", "--expMatrixTrans"), type="character", default=NULL, help="transformed expression matrix file path", metavar="character"), make_option(c...
0465c23a90fdc97a9f2e3866f1ed0299a9d23e1154356da3a55f28d8ab5d3440
R
10,996
239
#' Enrichment analysis for any type of annotation data #' @param x vector contains gene names or dataframe with DEGs information #' @param object annotation data #' @param ontology ontology type #' @param pvalue cutoff pvalue #' @param padj cutoff p adjust value #' @param organism organism #' @param keytype keytype for...
d2bf8c20e5638f5b88fc23fc4868fe7961831d4d21108ac3a6104d6f04c8fc87
R
11,006
267
setwd("./2ndCohort/spacexr") #### convert seurat object to anndata for neigborhood enrichment analysis #### use R 4.2.2 options(stringsAsFactors = FALSE) .libPaths(c("./R-4.2.2-latest/", "./Rlib4.2.2/")) library("Seurat", lib.loc = "./R-4.2.2-latest//") library('SeuratData') library(SeuratDisk) library(ggplot2) librar...
d7ab4d2f0c83f36307a4613d7308197432400f372d487bc9c4f4fe7331d28fa6
R
11,078
333
library(MOFA2) test_that("a model can be created from a list of matrices", { m <- as.matrix(read.csv('matrix.csv')) expect_warning(create_mofa(list("view1" = m))) # no feature names provided rownames(m) <- paste("feature", seq_len(nrow(m)), paste = "", sep = "") expect_s4_class(create_mofa(list("view1" = m)), "MO...
15356a8f1c630501bbdf4e3f8c51f29f3b2277f2b4259056ad8a3ca4e04d1e9b
R
11,085
388
#' Generic function for plotting channels #' #' This generic function provides a common interface for plotting channels. The #' behavior of this function depends on the class of the input data. #' #' @param x Input data. Depending on its class, behavior varies. #' #' @return A plot representing the channels. #' #' @exp...
f439bc0826fdf948238ae9b5eced74f066b6fc60cddea12174f3bb335453f032
R
11,087
396
############################################################ ## Main Figure 3 ############################################################ ## Load helper functions source("path/to/function_definition.R") ## Packages library(ggplot2) library(dplyr) library(tidyr) library(tibble) library(data.table) library(anndata) li...
9d8700f5545af05b570489b9099b7d23a9eeb9a0b97cc7c88ddecba73e02abb8
R
11,088
297
#' Create CNVRs in a set of CNVS based on network analysis #' #' A network is defined a set of CNVs that overlap with each other. Usually there #' are several ones in each chromosomal arm. Given a minimum IOU value #' each pairs of CNVs is considered as two connected nodes. The CNVRs are #' computed using community the...
4fd7f08b49d8526e70582af9085089455fb5887114748763c92b53201da8e056
R
11,094
291
######################################################################## ### 4. mapping of competitive strength --------------------------------- ######################################################################## ### libraries library(tidyverse) library(dplyr) library(ggplot2) library(tidyterra) library(sf) li...
69a232b5a9908a82e2f49c53fcd77f1a785c7bf0a81a2de8d70b8be9b3dbce1b
R
11,121
394
############################################################ ## Burden tests for DNV and rare variants in EUR / EAS ## 1) DNV ## 2) DNV in constraint genes ## 3) Rare inherited variants ## 4) Rare inherited variants in constraint genes ## 5) Ultra-rare inherited variants ## 6) Ultra-rare inherited variants ...
4599245ede9d878be4c8fe4f4b87e238b6c8b53a7bf8eb818c1866a2da6aa233
R
11,144
381
--- title: "MSLc Primed Genes Heatmaps in Neurons and Astrocytes" author: "AF" date: "`r Sys.Date()`" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) suppressPackageStartupMessages({ library(circlize) library(ComplexHeatmap) library(rstudioapi) library(dplyr) library...
16442504b1844fcdcdc51decc8da562a98bccd61f9d401842935a2221dbfefc4
R
11,183
246
test_that("lgb.convert_with_rules() rejects inputs that are not a data.table or data.frame", { bad_inputs <- list( matrix(1.0:10.0, 2L, 5L) , TRUE , c("a", "b") , NA , 10L , lgb.Dataset( data = matrix(1.0:10.0, 2L, 5L) , params = list() ...
451e3ff07871e367a51611188ac2920fdc902f757f642a44eed488e6373a6a16
R
11,187
507
#Video1 of the Jokura et al ctenophore AO paper #Sanja Jasek, Kei Jokura, Gaspar Jekely #load packages and functions ------------ source("analysis/scripts/packages_and_functions.R") #create temp dir to store video frames ----------- mainDir = getwd() dir.create(file.path(mainDir, "videoframes"), showWarnings = FALSE)...
81fffe8584a98ea1ec5e50a3eb816b3588c5ad18df78cf7d682bf86a4623e01b
R
11,196
387
#' Volcano Plot for DMPs/DMRs #' #' Publication-ready volcano plot showing log2(fold-change) vs -log10(p-value) #' #' @param df Data frame with DMPs/DMRs #' (columns: deltabetas or maxdiff, adj.P.Val or HMFDR) #' @param fdr_threshold FDR significance threshold (default 0.05) #' @param deltabeta_threshold Delta beta t...
8aa680ed68ddae9234839d48404fbd6d65ed8fba06731418700da995921310c3
R
11,218
255
--- title: "HeMoVal: Recomputation of the Primary Outcome Analysis" date: "2025-01-28" authors: "David Kronthaler" output: html_document editor_options: chunk_output_type: console --- ```{r setup, include=FALSE, echo=FALSE} knitr::opts_chunk$set(echo = TRUE, cache = TRUE, ...
0cafece199aac3b7fa2609f36d661d07c96e63a814cc6b69082f1e37d3dea3a7
R
11,259
290
--- title: "03-subtyping" author: "Aditya Lahiri, Eric Wafula, Jo Lynne Rokita" date: "11/14/2022" output: html_notebook --- ## Objective To subtype `Neuroblastoma`, `Ganglioneuroblastoma`, and `Ganglioneuroma` biospecimen into either `MYCN amplified` or `MYCN non-amplified`. This script loads the table `input/altera...
ee18b61452332fc2837659e01505ba71b4f06a8c27497a5b97490fc9db090518
R
11,265
418
--- title: "ATRT Molecular Subtyping - Data Prep" output: html_notebook: toc: TRUE toc_float: TRUE author: Chante Bethell for ALSF CCDL date: 2019 --- This notebook addresses the issue of molecular subtyping ATRT samples. # Usage This notebook is intended to be run via the command line from the top direc...
51e7d4d29889694d88589a7939dd79ae0766af802c0a35941fe6e9dba12c26d5
R
11,286
409
#' Multiple plot functions #' @param dat A data frame or matrix #' @param group Class group #' @param position Legend position. The default is "bottomright" #' @inheritParams graphics::plot #' @return A plot object #' #' @export plot_tSNE # plot tSNE plot_tSNE <- function(dat, group = NULL, label_group = T, position =...
5c70e7c771bad2e6045c3f1837391a56011cd7bdc2da202d651eebbd1ac37e16
R
11,298
272
--- title: "Preliminary QC Report for Sample `r params$sample`" subtitle: "Initial Sample Preprocessing" date: '`r Sys.Date()`' output: rmdformats::robobook: lightbox: true number_sections: true gallery: true code-fold: true toc_depth: 3 params: seuratdir: seurat sample: ...
5e62c17372da7424f8f8fd8e0d5637bb1ba13597b52f7381a2dd59517cc7a2c6
R
11,329
324
# Calculate TMB for a given SNV consensus MAF file from Strelka2, Mutect2, # Vardict, data Lancet callers # # Eric Wafula for Pediatric OpenTargets # 12/10/2021 # Adapted from AlexsLemonade OpenPBTA-analysis snv-callers analysis module # # Load libraries: suppressPackageStartupMessages(library(optparse)) suppressPac...
9f613578f1acb492c197791d5f9cac36ae7ab889537046971f92814e9189124c
R
11,368
284
# pROC: Tools Receiver operating characteristic (ROC curves) with # (partial) area under the curve, confidence intervals and comparison. # Copyright (C) 2010-2014 Xavier Robin, Alexandre Hainard, Natacha Turck, # Natalia Tiberti, Frédérique Lisacek, Jean-Charles Sanchez # and Markus Müller # # This program is free soft...
833e206cabe667dfcbc4fd21e726c6dfddd15ea3c9e03d769972b5bee9edf64e
R
11,369
282
# Author: Run Jin # Add PedCBio Sample Name Column Addition suppressPackageStartupMessages({ library("optparse") library("tidyverse") library("readr") library("tidyr") }) #### Parse command line options ------------------------------------------------ option_list <- list( make_option(c("-i","--hist_file"),t...
73d569c3f4c0323d7a543e309f1a85742a3d412a3b53728c4524bcfed50dd3d0
R
11,370
331
# gets statistics about synapses and mitochondria and which itochondria are part of a synapse source("analysis/scripts/packages_and_functions.R") # calculate average number of post-synaptic sites per synapse ----------------- pre_connectors <- catmaid_fetch( path = paste(pid, "/connectors/", sep = ""), body = l...
0c846be06cf5bbc07afe8b156813903e80829b2726cc6467e6d60b53ea5d822e
R
11,416
224
#' Export FASTA sequences from a set of alignments reported in PAF formatted file. #' #' @param alignment.space What alignment coordinates should be exported as FASTA, either 'query' or 'target' (Default : `query`). #' @param order.by Order alignment either by `query` or `target` coordinates. #' @param bsgenome A \pkg{...
07a27ced3cc86d0905100fbba843dd37b666ba06abd7913a104358232cf6730f
R
11,418
175
#!/usr/bin/env Rscript # Copyright (c) 2015 Tobias Neumann, Philipp Rescheneder. # # This file is part of Slamdunk. # # Slamdunk is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the ...
40acfd6a4c6f3a0e68072bf586df843087ae9c8af71183a6d6e66603a44b737c
R
11,453
276
# targets-safe tidymodels wrapper functions ---- # to fit cross-validated models small enough not to be run in matlab # assumes that all predictor cols and all outcome cols share a respective prefix. easy enough make_recipe <- function (in_data, x_prefix, y_prefix, additional_steps = NULL) { in_recipe <- recipe(in_d...
50ae45612651037dbe5ffe89ad8bffba82e785167f2dfbd28ce3abce9ca1a632
R
11,464
298
########################### Create prior distributions ########################## # # Objective: Refine data-driven prior distributions for model parameters ########################### <<<<<>>>>> ######################################### rm(list = ls()) # Clean environment options(scipen = 999) # View data without ...
affffb5f470b3d7f31730ee1527027b71f2715c583fa13c150496ecaf6a44827
R
11,476
319
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(data.table) library(edgeR) library(limma) }) # ============================================================ # infer_handedness_multiROI.R # # Goal: # Infer handedness / language laterality orientation from RNA-seq # expression patterns across m...
55545f9112bd4fafa23e4e6614534184405a048cc0ac3765843b1f9b7f6f5824
R
11,491
369
# Test check_columns ---- test_that( "check_columns - works - tibble", { tmp_data <- dplyr::tibble( "A" = c(1L, 2L, 3L), "B" = c(TRUE, TRUE, FALSE), "C" = c("A", "B", "C"), "D" = c(FALSE, FALSE, TRUE) ) # both A and B exist expect_no_condition( object = check_columns(...
cc0c99f9d6807439239324687c2c039b1cf59669d3a813b0694ffaa08e2758cd
R
11,560
430
test_that( "olink_umap_plot - works - snapshot", { skip_if_not_installed("umap") skip_if_not_installed("ggrepel") skip_if_not_installed("ggpubr") skip_if_not_installed("vdiffr") withr::local_seed(123) cfg <- umap::umap.defaults cfg$random_state <- 123 npx_df <- npx_data1 |> ...
5ad7989619de63e66414dfff7ee4986a0fdc1d6932436506e14dc3973cd1f06d
R
11,563
283
library(pROC) data(aSAH) context("multiclass-roc") test_that("univariate multiclass roc/auc works", { expect_warning(uv.mr <- multiclass.roc(aSAH$gos6, aSAH$s100b), "2") expect_equal(class(uv.mr), "multiclass.roc") expect_equal(length(uv.mr$rocs), 6) expect_equal(as.numeric(auc(uv.mr)), 0.6539999352) expect...
315430f69d5fc4a050b8d1913c2eea1fff1d451a59bba9186a4237a1630c653e
R
11,564
257
# ============================================================================== # S5_cell.R # Server logic for Step 3: Clustering Analysis and Cell Annotation # Implements: # - Step 3.3: Cell Type Annotation (Handles cell type assignment via SingleR, custom upload, or manual entry) # ============================...
6f800f24466cab5ff1dd9ec5ce6e7f0c3b8a39396507ad28a49c64d7b9f40037
R
11,568
281
library(Seurat) library(SummarizedExperiment) library(ggplot2) library(future) library(scrattch.hicat) library(data.table) library(dplyr) library(tibble) library(pbmcapply) library(gplots) library(scales) library(scubi) library(paletteer) library(SeuratWrappers) plan("multicore", workers=10) plan() options(future.gl...
8e3c3884bd2265dd7cef8eebacf7b451f44fc8d0e4d0b4e95b80b035ff1f0203
R
11,581
362
--- title: "Mutation Frequencies Table Summary and QC Checks" output: html_notebook: toc: TRUE toc_float: TRUE toc_depth: 4 author: Eric Wafula for Pediatric OpenTargets date: 2022-05-01 params: current_table: label: "current mutation frequencies table" value: current/gene-level-cnv-consensus-a...
9bf35edb1ebb4ae26fbb4a8d436ec5096eb2c20e138b70bd9675f1de75e4acf5
R
11,595
280
--- title: "`r paste0('Preliminary QC Report for Sample ', params$sample)`" subtitle: "Initial Sample Preprocessing - scATAC-seq" date: "`r Sys.Date()`" output: html_document: toc: true toc_float: collapsed: false number_sections: true code-fold: true toc_depth: 3 fig_height: 5 fig...
d38b5a2e08f3c3201fe356aa864ef687f790d6845986a1f5d0d7f48bd0970db8
R
11,607
311
library(RCurl) library(stringr) # Data processing for human # download protein annotation from STRING v11.0 (9606.protein.info.v11.0.txt) pinfo<- read.table(file = '9606.protein.info.v11.0.txt', stringsAsFactors = F, sep = '\t', header = T) pinfo$protein_extern...
db26496867c262ed530800ba69201c0c74349c88ad882082c36197674fd1c34d
R
11,615
234
--- title: "Customized Color Palettes & Themes" date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`' output: rmarkdown::html_vignette theme: united df_print: kable vignette: > %\VignetteIndexEntry{Customized Color Palettes & Themes} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- *** <style> p....
18fa0830955d7c60d2a7cd095803c461fcf665d290c511100ef4cc1eb070ac3f
R
11,625
275
"predict.randomForest" <- function (object, newdata, type = "response", norm.votes = TRUE, predict.all=FALSE, proximity = FALSE, nodes=FALSE, cutoff, ...) { if (!inherits(object, "randomForest")) stop("object not of class randomForest") if (is.null(object$forest)) stop("No forest compo...
3c40c2ec5dde89b2848834764bc453563e3d6c9bfd9cc26bfc8c3942b27c34d2
R
11,641
419
#' MRF variable selection #' #' @export # This function performs variable selection for multi-omics data using MRF mrf3_vs <- function(mod, dat.list, method = "filter", # Selection method: "filter", "test", "mixture" se = NULL, # Sta...
0d0d23b4dffde6b18ac85fb06b6c6db6ed30e120af9345f6bd74fa3e38fed3df
R
11,656
337
# Load all relevant libraries to the project library(SNFtool) library(Spectrum) library(cluster) library(ConsensusClusterPlus) library(CancerSubtypes) library(iClusterPlus) library(ANF) library(ggplot2) library(factoextra) library(grid) library(gridExtra) library(gtable) library(gplots) library(r.jive) ...
1f17e221f00835e4bfa935187a3214c1664e5e884ddccafea4e35974642a6f41
R
11,668
247
#!/usr/bin/env Rscript ################################################ ################################################ ## REQUIREMENTS ## ################################################ ################################################ ## PCA, HEATMAP AND SCATTERPLOTS FOR SAMPLES IN CO...