sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
969392065bab8987e5770816c8cbdf68e448e5dc12cb1e594ebcd28f759abbce | R | 7,142 | 139 | #' Function to break PAF alignment into matching bases between query and target sequence.
#' In addition, locations of inserted bases in query and target sequence can be reported as well.
#'
#' @param binsize A size of a bin in base pairs to split a PAF alignment into.
#' @inheritParams breakPafAlignment
#' @importFrom... |
e8e561e362eb874c6d351abf0100fd22782b40acf791d56d4e94306436d8f223 | R | 7,156 | 195 | ---
title: "Setting authorship order for OpenPedCan manuscript"
output:
html_notebook:
toc: true
toc_float: true
author: "Jaclyn Taroni for ALSF CCDL, Updated by Jo Lynne Rokita D3b"
date: "2022, 2024"
---
This notebook updates the current [manuscript metadata](https://github.com/rokitalab/OpenPedCan-manusc... |
469def05c4ba973c1af1447401b8c71134bccbc9f08772367ce80909e37a7a25 | R | 7,168 | 185 | ---
output: html_document
author: "Delphine Potier"
output:
html_document:
code_folding: hide
code_download: true
editor_options:
chunk_output_type: console
---
#################
Script for Cut & Tag analysis of H3K27Ac mark in Jurkat WT and Jurkat CRISPR-edited clones (1D9,2G5 and 1B6).
Made with Docker ... |
c6e2eaa7108f24ef0ef8694f34d8c0146418c86d65645e9bac33900aa204d4cc | R | 7,175 | 202 | # prior functions
# Fit spline
fit_spline <- function(x_vals,
y_vals,
wt = 1,
constraints = "none",
v_knots = NULL
){
# Set knots
if (is.null(v_knots)) {
# Sample every three values of ages for spline knots
v_knots ... |
bb15a02e225eaa24882fb7b55705a3834faa855176724971d00164e2add4aacb | R | 7,176 | 269 | library(tidyverse)
library(data.table)
library(scales)
library(ggforce)
library(cowplot)
library(dplyr)
# library(splitstackshape)
# library(ggridges)
# library(IRanges)
library(ggrepel)
# library(ggnewscale)
# library(ggside)
library(glue)
# library("tidylog", warn.conflicts = FALSE)
# library(patchwork)
# library(ggh... |
40fffd8040d1a03d9c638c5423f529994ed36a67ba02774dda71e88bf7b1ba17 | R | 7,178 | 152 | #### Functions needed for effect statistics (d and r), SE for each effect statistic, and CI calculations ####
## effect size calculations for linear mixed effects models based on Nakagawa & Cuthill (2007) ##
## equation numbers refer to corresponding equation in above paper ##
## repeatability/ICC value required f... |
5a06377d2ed49665c666dc5eb1c987110fbdaba05eae0481f024cf0637610b40 | R | 7,183 | 165 | ---
title: "PNC Final Sample Selection"
author: "Audrey Luo"
output:
html_document:
code_folding: show
highlight: haddock
theme: lumen
toc: yes
toc_depth: 4
toc_float: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(data.table)
library(dplyr)
library(purrr)
libr... |
5eac37e1b62811451db23064828819e4e96119cdcfcd4e20258bcc4febac4bcd | R | 7,186 | 147 | #' Add PAF alignments to a SVbyEye miropeat style plot.
#'
#' This function takes a \code{ggplot2} object generated using \code{\link{plotMiro}} function and adds extra PAF alignments to it
#' stored in the `paf.table`. This function can also be used to highlight already present alignment or to add other features such ... |
a2caf92068124762f5c5f87b6368a1bfb5208840f93f3f29c8b8881a5b358819 | R | 7,198 | 175 | #' diann: Report processing and protein quantification for MS-based proteomics.
#' @description A set of functions for dealing with mass spectrometry-based proteomics analysis reports.
#' @section diann functions:
#' diann_load
#' diann_matrix
#' diann_maxlfq
#' diann_save
#'
#' @docType package
#' @name diann
library... |
ba01c9395414b1019f49dcd632369b45c2c91997c51fcb8cf833151b2ff30623 | R | 7,201 | 153 | # K. S. Gaonkar 2019
# Identify recurrent fusion and genes per broad histology
#
# Sample selection criteria : removed cell-lines to only keep tumor samples
suppressPackageStartupMessages(library("optparse"))
suppressPackageStartupMessages(library("tidyverse"))
suppressPackageStartupMessages(library("reshape2"))
op... |
5493acabf33319159cb1348bc4be3091f51867b25bdbc6ec133918ebb444dc2d | R | 7,208 | 140 | rm(list=ls())
source("100.common-variables.r")
source("101.common-functions.r")
source("300.variables.r")
source("301.functions.r")
## 310-script
PATHS <- Create.Folders( "omega-Wand__.n0000" )
HOLDER <- Load.Subset.Wrapper( Tag="omega-Wand__.n0000", LSubset=TRUE )
HOLDER$MODEL <- readRDS( file.path( PATHS$MODEL, "b... |
71c46e2ccd20897a31694decd08d728b1c0904989c475ba08482081580454723 | R | 7,210 | 224 | # J. Taroni for ALSF CCDL 2022
# Counts alterations per cancer group to be reported in the manuscript text.
# These are counts for oncoprint plots that use genes of interest lists.
# The mappings between cancer groups and genes of interest lists in available in
# data/cancer_group_goi_list_mapping.tsv in this module, w... |
06b5025cdc8d39a6992c431fc7826052b02e85dd903c083bea5fcc85330b684b | R | 7,214 | 228 | # S. Spielman for ALSF CCDL & Jo Lynne Rokita for D3b, 2022
#
# Makes a pdf panel of forest plot of survival analysis on MB samples
# with immune cell fractions and PDL-1 expression predictors
library(survival) # needed to parse model output
library(tidyverse)
library(patchwork) # for this forest plot export, patch... |
eac50d6f848a35ba7f1d0e38a076c921c13fbb364060c66ab3b1fe188fa2e550 | R | 7,214 | 163 | ---
title: "HBN Final Sample Selection"
author: "Audrey Luo"
output:
html_document:
code_folding: show
highlight: haddock
theme: lumen
toc: yes
toc_depth: 4
toc_float: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(data.table)
library(dplyr)
library(purrr)
libr... |
14128f7462e3b8a2c83181d6cee4422a56f885a94872ac7930e3132bb49539d6 | R | 7,216 | 127 | # load libraries
library(magrittr)
library(dplyr)
library(readr)
# base directories
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
analysis_dir <- file.path(root_dir, "analyses", "independent-samples")
out_dir <- file.path(analysis_dir, "results")
dir.create(out_dir, showWarnings = F, recursive = T)
# s... |
c3137be753d1f0e68dd8e10a17bfe241a06eadc62f1edaca4c621ea9701b962c | R | 7,226 | 162 | ---
title: "Illustration of MEFISTO on simulated data with a temporal covariate"
author:
- name: "Britta Velten"
affiliation: "German Cancer Research Center, Heidelberg, Germany"
email: "b.velten@dkfz-heidelberg.de"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc_float: true
vignette: >
%\Vigne... |
82da15fb115b219b1d457259a093ef28c88c2fac8d662b10eed55b14c72c652a | R | 7,230 | 216 | library(miloR)
library(SingleCellExperiment)
library(scater)
library(scran)
library(dplyr)
library(scuttle)
library(ggrepel)
library(Seurat)
library(ggplot2)
library(gghighlight)
library(ggbeeswarm)
library(ggpubr)
library(RColorBrewer)
library(knitr)
library(cowplot)
##############################
#### Early vs Late ... |
00cce4cf6761770446a2787869c532b6737c96f61e8a3d5a8db8d5b4c797ae63 | R | 7,231 | 258 | #' Clear Report Cache
#'
#' Remove Quarto cache directories and intermediate files for a report.
#' Useful for cleaning up after analysis completion or forcing a fresh start.
#'
#' @param report A \code{MethylkeyReport} object (or character path to report directory).
#' @param recursive Logical. If TRUE, recursively de... |
636edc2e8aa21e937c5ce7874e523d0c1cfb0b3e491f302df42e93c83445331a | R | 7,234 | 99 | # Run from repository root. Technical QC and original-model reproduction only.
.libPaths(c(normalizePath('.Rlib'), .libPaths()))
suppressPackageStartupMessages({library(DESeq2); library(ggplot2); library(jsonlite)})
set.seed(104006)
dir.create('data/interim/schmidt/reference',recursive=TRUE,showWarnings=FALSE)
for (d i... |
db5ecc50f8c5315908c66c5e348075cb623dcab60d7af449793105a6f7cb768c | R | 7,249 | 218 | # S. Spielman for CCDL 2022
#
# Makes pdf panels for supplementary Figure S2, specifically those that are derived from the `tmb-compare` analysis module.
library(tidyverse)
# Directories -------------------------------------------------------------------
# Establish base dir
root_dir <- rprojroot::find_root(rprojroo... |
0443b94fec4db8215e177ab16e6d97dd1fe89e87ad12aceda5b977d47d72ae66 | R | 7,259 | 191 | # compile various statistics about cells and cell types
# uses csv files generated by the following scripts:
# organelle_counts.R
# cilium_lengths.R
# synapse_and_mitochondria_stats.R
source("analysis/scripts/packages_and_functions.R")
# statistics (one number per cell): --------------------------------------------
#... |
f7570f83dc4312cd484398b4305d0ae91f6db67d398b084089049edd4252cb69 | R | 7,261 | 244 | # Test funcs. in computation.R
library(SummarizedExperiment)
library(SingleCellExperiment)
library(SpatialExperiment)
data(rings)
spe <- rings
sce <- SingleCellExperiment(spe)
assay(sce) <- NULL
assay(sce, "counts") <- assay(spe, "counts")
colData(sce) <- cbind(colData(spe), spatialCoords(spe))
test_that("computeBan... |
ee1672e8346d62f9b39549eebf838d020a9372e15e115dbd34651466abd47e93 | R | 7,262 | 198 | library(tidyverse)
library(ggplot2)
library(cowplot)
library(patchwork)
library(extrafont)
library(officer)
library(rvg)
library(ggnewscale)
library(afex)
library(broom)
library(broom.mixed)
library(flextable)
theme_set(theme_cowplot() +
theme(text = element_text(family = "sans", size=9),
axis... |
389aef6b0e677ddca3f53579ee804fad6cc5982035a1ef1d7aa9322e284fd33c | R | 7,280 | 209 | # 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... |
57b8b031ab39a5ea4de72ea5e1af395d40bccb78933f3acdf1fbaf8cce769496 | R | 7,280 | 119 | # Osprey basis set tools
Being a linear-combination modelling software, **Osprey** requires prior spectral knowledge in the form of so-called *basis sets*. These are collections of model spectra (*basis functions*) for the various metabolites you wish to quantify.
Historically, basis functions were acquired experimen... |
1ecc7035b4e3d6614519d1e8981eedefb378a387e6ba78f39bebcbfd9222f873 | R | 7,285 | 169 | # Calculate representative gene-level and isoform-level median expression for all
# histologies (cancer types) using patients with both rnaseq and methyl data
# Eric Wafula for Pediatric OpenTargets
# 03/23/2023
# Load libraries
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(library... |
33ef74b0a10b49f33f952d97b77b96f32df4ea5f5d8adfedadd58fd54f2b961b | R | 7,288 | 271 | ---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```
<!-- badges: start -->
[
library(cowplot)
library(ComplexHeatmap)
library(stringr)
library(simplifyEnrichment)
library(ggplotify)
library(aplot)
source("../Plot_theme.R")
set.seed(1234)
# Load miRNA family data
miR_family <- read.csv("mirgene_mmu_families.csv")
# Load DEG data and merge comparisons
dereg <- read.csv("result... |
9b7044e21a9739250a283b9e1f430bb95033beac7e1664c167b71fc5e29740ed | R | 7,312 | 186 | rm(list=ls(all=TRUE))
source('simulations/gent/functions.R')
library(RColorBrewer);library(mvnfast);library(ggplot2);library(dplyr)
#########################################################################################
# Type I error
## changing LD density and changing number of SNPs tested
niter=1000
ngwas=50000
Ms... |
bb6d9171b969341b7ef3ea7dae42df996bf0c860ae8c651a700b7211350ef413 | R | 7,322 | 174 | # rank genes on top 10 related mouse phenotypes
'%notin%' = Negate('%in%')
library(igraph)
library(tidyverse)
library(pROC)
library(foreach)
library(doParallel)
library(ComplexHeatmap)
library(ggpubr)
source('Code/networkPropagation.R')
# load files ----
distTraitsMatrix = readRDS('data/distTraits.rds')
traitAnno... |
6a69774c3c9f832cac9825d2d2a53366fa7347593e0f345e60d5b3cd0be51b70 | R | 7,325 | 266 | #### Internal functions ####
npxProcessing_forDimRed <- function(df, # nolint: object_name_linter
check_log = NULL,
color_g = "QC_Warning",
drop_assays = FALSE,
drop_samples =... |
d6ad15d738e05806deded2043c1247b72218692c042237ffdbdbe1b371b610c9 | R | 7,326 | 162 | # This script filters the given dataset to produce a summarized visualization
# of key variables within the dataset.
#
# Zhuangzhuang Geng, D3B 2024
## load libraries
library(tidyverse)
library(ggplot2)
library(cowplot)
# Detect the ".git" folder -- this will in the project root directory.
# Use this as the root dire... |
56f55dac6cea9412ac00ec38a55a717a44900e7c9906a53af24250616b84d586 | R | 7,346 | 187 | # TODO: Add comment
#
# Author: fec
###############################################################################
library(R6)
library(foreach)
library(doParallel)
ModelTrainer <- R6Class("ModelTrainer",
public = list(
initialize = function(model, trainingOutcome, trainingData, validationOutcome, validationDat... |
bde7c929827e482c23dec1856a9e469d178223824516130fc3a16adb19853540 | R | 7,351 | 203 | ---
title: "MotiMus Biopac Data"
Me: Ségolène M. R. Guérin
output:
html_notebook:
code_folding: hide
toc: yes
pdf_document:
toc: yes
html_document:
toc: yes
word_document:
toc: yes
editor_options:
markdown:
wrap: sentence
---
# Preamble
```{r}
# ------ CLEANING R SESSION ####
rm(list... |
853208ce8c1f17d860a71824658da0cd450b53a352f20358fbceb26b2ece88a3 | R | 7,360 | 181 | # requires the following packages
library(tidyverse)
library(data.table)
# plotting parameters
chance_level <- 0.33
x_lim <- c(0, 900)
x_breaks <- seq(0, 800, by = 200)
x_breaks_minor <- seq(0, 800, by = 100)
y_lim_sat <- c(0, 1)
y_breaks_sat <- seq(0, 1, by = 0.2)
y_breaks_minor_sat <- seq(0, 0.9, by = 0.2... |
5a50c243c141bc7673880b50713887bb2833cc69315600d807bdbf3675b9d3a0 | R | 7,369 | 129 | ---
output: github_document
always_allow_html: true
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# biodiscvr: Biomarker Discovery Using Composite Value Ratios
<!-- badges: start -->
[{
"
run scmap
Wrapper script to run scmap on a benchmark dataset with 5-fold cross validation,
outputs lists of true and predicted cell labels as csv files, as well as computation time.
Parameters
... |
d0f5ed7b108e65ce7a5dd017a8e3a26d7c21fb282b90a1b92da0f1e842ea0c9b | R | 7,381 | 201 | #####################################
#
# This function used to generate surface
# plot based on Schafer 400
# define a function for plotting
DrawSurfaceOnSchaefer400 <- function(value,
p_title, legend_title,
legent_pos = 'bottom',
... |
a74b0b70d5f27921ccf57d746e68006d6d8c7bd16a75624d70aa132656d4307d | R | 7,399 | 232 | ---
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)
... |
7c44ec3230f73e8bf394388adeeb4293b4a84336aff983fcec67685c7a9df870 | R | 7,412 | 207 | # [description] get all column classes of a data.table or data.frame.
# This function collapses the result of class() into a single string
.get_column_classes <- function(df) {
return(
vapply(
X = df
, FUN = function(x) {
paste(class(x), collapse = ",")
... |
9a71a50b6c450454f70a3ffc860c9e4c62de6194243c2aaaa081609109f8ce0e | R | 7,417 | 127 | # load libraries
library(magrittr)
library(dplyr)
library(readr)
# base directories
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
analysis_dir <- file.path(root_dir, "analyses", "independent-samples")
out_dir <- file.path(analysis_dir, "results")
dir.create(out_dir, showWarnings = F, recursive = T)
# s... |
be80340b86a9bd523f883ff24b4befde9d13eb064e0dcf0bc6bcae501e00e15f | R | 7,436 | 107 | ########################################################################################################
# This R code implements the SPLOSH method for the analysis of microarray data
# described by Pounds and Cheng (Improving False Discovery Rate Estimation - Bioinformatics 2004).
#
# Last Update: July 14, 2004
#
# Fu... |
01b1a7a499c7eed059222bb66cdc0da8c437cb223ef9ef3a1da146dd73b4f542 | R | 7,440 | 248 | rm(list=ls())
library(RSpectra)
library(plink2R)
library(abind)
dat1 <- read_plink(
"HM3_thinned_autosomal_overlap", impute="none")
dat2 <- read_plink(
"1kg.ref.phase1_release_v3.20101123_thinned_autosomal_overlap",
impute="none")
scale2 <- function(X)
{
p <- colSums(X, na.rm=TRUE) / (2 * colSums(!is.na(... |
347c87175cfcc4fe20d85874252b224297a4fb5daef7b3c4c61659dbec655066 | R | 7,453 | 158 | ##' Dotplot for enrichment results
##' @importFrom ggplot2 ggplot
##' @importFrom ggplot2 aes
##' @importFrom ggplot2 geom_point
##' @importFrom ggplot2 element_text
##' @importFrom ggplot2 geom_text
##' @importFrom ggplot2 theme
##' @importFrom ggplot2 scale_color_gradient
##' @importFrom ggplot2 xlab
##' @importFrom ... |
bf1431ed2e0b8c51b3e603641cea6f27daf8036fb8186eb99da3443e2f944815 | R | 7,456 | 214 | ###Extended data fig 5A####
genes_use <- c(
"P2RY12", "CX3CR1", "MRC1", "SELENOP", "CD163", "CD68", "CD83", "ITGAX", "IGKC", "IGHG1", "CD8A", "CCL5", "IL32", "GDF3", "GFAP", "AQP4", "CRYAB",
"PTDGS", "VCAN", "PDGFRA", "FGF13", "RBFOX3", "CALM1", "VWF", "FLT1", "NOTCH3", "PDGFRB", "COL3A1", "LUM",
"TAGLN", "MYH1... |
12f63d91a0afcd5a110de6e85e55975f0c0099cec2934dc5380c0c8318286406 | R | 7,457 | 249 | ---
title: "Survival Analysis Example"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: C. Savonen for ALSF CCDL
date: 2019
params:
plot_ci: TRUE
---
**Purpose:**
An example for running basic survival analysis models which can be applied to
various other data.
## Usage
This notebook is a te... |
ecd6aef524da10be37a6f473d0b3fe70f00a3cecd98b7f2954080ab4511718d4 | R | 7,458 | 195 |
suppressMessages({
library(tidyverse)
library(Seurat)
library(Matrix)
library(Matrix.utils)
library(edgeR)
library(limma)
library(RColorBrewer)
library(cowplot)
library(gridExtra)
})
setwd(".")
output_dir <- "output"
obj <- readRDS(file = paste0(output_dir,"filtered_final_object_v... |
6f5da2d6d0d1863570fd68cf7234cdd8f1a3840549f501e38c1a063ed630f789 | R | 7,459 | 199 | #' Check if all columns are there
#'
#' @description This function creates examples from the simulation dataset.
#' Basically, for each year that passes in the simulation, the residence time increases by one year.
#' We then identify if the the next ten years the vegetation state changes. If there is a state change wi... |
9a457f781b5664392fd6c5d1d6a251784d426ab33622ae934978d99276b162e2 | R | 7,461 | 199 | suppressMessages(library(ggplot2))
suppressMessages(library(RColorBrewer))
suppressMessages(library(showtext))
suppressMessages(library(Cairo))
suppressMessages(library(patchwork))
# font_add("sans", regular = "arial.ttf", italic = "ariali.ttf")
# showtext_auto()
#2b+2c+2d-----------------------------------------------... |
6a87beb071263966c98ee584b05ac6089a6847d19f8f4d8488e20fe9314bb09f | R | 7,463 | 193 | ---
title: "Sparse Canonical Correlation Analysis (SCCA) with the package flashpcaR"
author: "Gad Abraham, Rodrigo Canovas"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
pdf_document: default
html_document: default
csl: biomed-central.csl
bibliography: bibliography.bib
---
```{r setup, include=FALSE}
knitr::... |
d21619d06c007b98355aaba60b19b7aa0461e7d05d1216646a739850190c990c | R | 7,463 | 247 | ##### Simulation Model #####
library(MASS)
library(corpcor)
######## nonlinear function #########
get_kennel_fn4 = function(x1, x2){
y = 0.25 * exp( 4 * x1) + 4/(1+exp(-20*(x2 - 0.5))) + rnorm(n = length(x1), mean = 0, sd = 0.2)
y
}
sim.nonlinear2 = function(n, p, j = 2, mu.sd = 2, rho = 0, sigma = 0.3, psel = 2... |
13f2349482963a2f86138a5129269ef15282b0b7c0ec6b8208f3dc26f114f2b8 | R | 7,471 | 209 | dd_lamuN <- function(ddmodel, pars, N)
{
la <- pars[1]
mu <- pars[2]
K <- pars[3]
n0 <- (ddmodel == 2 | ddmodel == 4)
if (length(pars) == 4)
{
r <- pars[4]
}
if (ddmodel == 1)
{
# linear dependence in speciation rate
laN <- max(0, la - (la - mu) * N / K)
muN <- mu
}
if (ddmodel == ... |
2d47aab54e9cc8dfc1811fb74fd3a9c476cbfadf59e3840d508be3dc7d49c8d7 | R | 7,485 | 242 | # User options
use_gpu <- FALSE
make_args_from_build_script <- character(0L)
# For Windows, the package will be built with Visual Studio
# unless you set one of these to TRUE
use_mingw <- FALSE
use_msys2 <- FALSE
if (use_mingw && use_msys2) {
stop("Cannot use both MinGW and MSYS2. Please choose only one.")
}
if (.... |
3af4b2abf96d164512aac3bccf2037031506e3f0c1ed775e08e7d30d994a12e8 | R | 7,500 | 241 | ---
title: "HGAT samples without histone mutations that have `BRAF V600E` mutations"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Chante Bethell for ALSF CCDL
date: 2020
---
This notebook will look at HGAT samples without histone mutations that have `BRAF V600E` mutations using t-SNE and UMAP cl... |
ffbf456311c226cb438704ca49ebc8340f25d10bf450229eeb9eae17737cde78 | R | 7,510 | 202 | #' @title Prepare Annotation Database
#' @description Loads KEGG database files and species-specific mapping files for pathway annotation.
#' @param omics Character. 'metab' for metabolomics, 'trans' for transcriptomics.
#' @param species Character. Species code (e.g., 'hsa', 'mmu').
#' @return A list containing:
... |
95d44daa0873ef71697a483bebf30e7cb8d34777926be7c1ef7f61078ac4d01c | R | 7,514 | 186 | # Summarize results ----
rm(list = ls())
library(dplyr)
library(ggplot2)
load(base::sort(list.files(pattern = "CV_RollingTemporalNestedRF_",
path = "./dataderived",
full.names = TRUE),
decreasing = TRUE)[1])
K = dim(Mtest1)[2]
# Al... |
b1e20bdd861be6bea750ee9f306f8174ade63da36876db1d305479c33ad829ff | R | 7,518 | 137 | #!/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
... |
fa2f965cfa5afb6c956ba4ade25c499c2cb2d0cd84731ad4b7f2771023d655f5 | R | 7,519 | 205 | library(data.table)
library(dplyr)
library(ggplot2)
library(stringr)
library(argparse)
#####
rm(list=ls())
parser <- ArgumentParser(description='Define directories')
parser$add_argument('--input_dir', type="character",
default = "/Users/svitlana.oleshko/Projects/biopathnet/revision2/node_types"... |
e0b3dc312e0dc2080603b28632c377d7534b357f729dd62430c787c53e7836fd | R | 7,529 | 208 | library(enrichR)
library(stringr)
library(multienrichjam)
library(DOSE)
library(argparse)
library(dplyr)
library(purrr)
#####
rm(list=ls())
parser <- ArgumentParser(description='Define directories')
parser$add_argument('--input_dir', type="character",
default = "/Users/svitlana.oleshko/Projects... |
c21d760957ea88815d716ece0ada25af2e95f57b0aa52f8e9ec372072eb8b459 | R | 7,537 | 280 | # The working directory is the directory that contains this test R file, if this
# file is executed by test_dir
#
# testthat package is loaded, if this file is executed by test_dir
context("tests/test_get_pcb_pot_plot_url.R")
# import_function is defined in tests/helper_import_function.R and tested in
# annotator/tests... |
e6d530a32f15d624e048a7d3a6160b99bad4465c79ff3cc3df317c93afc89503 | R | 7,539 | 262 | ---
title: "Chromosomal Instability: By Histology Plots"
output:
html_notebook:
toc: true
toc_float: true
author: Candace Savonen for ALSF - CCDL
date: 2020
params:
min_samples: 5
---
This analysis evaluates chromosomal instability by using breakpoint SV and CNV
data that was co-localized by histology... |
f29a9350b2394ca1b5719a209c5a656d0c5623209ebd9f6a973761c748e0a7e1 | R | 7,545 | 230 | # script for counting numbers of organelles in cells
source("analysis/scripts/packages_and_functions.R")
skids <- unlist(
catmaid_fetch(path = paste(pid, "/skeletons/", sep = "")))
characters <- list("soma",
"mitochondrion",
"centriole",
"basal body",
... |
ef57cb3ae22ac15e9db505ee1cc01c37adf56af1d19020b8f19a7b2a61b3bb29 | R | 7,549 | 260 | .is_Booster <- function(x) {
return(all(c("R6", "lgb.Booster") %in% class(x))) # nolint: class_equals.
}
.is_Dataset <- function(x) {
return(all(c("R6", "lgb.Dataset") %in% class(x))) # nolint: class_equals.
}
.is_Predictor <- function(x) {
return(all(c("R6", "lgb.Predictor") %in% class(x))) # nolint: class_... |
fdf63542fd8703f45fb480667fbebd10950093fd6f99ee642dadcc1bc362a9d8 | R | 7,549 | 146 | ##############################################################################
#
# Subject selection
#
# In this script, we selected the data of the subjects who is suitable in
# this study.
#
# Liang Qunjun 2023/11/13
library(tidyverse)
library(NbClust)
library(ggiraphExtra)
library(ggsci)
library(ggeas... |
318dbc024fc71d318f1be59fc9adbf632d5fc3dae46deca133066a8e76e5a085 | R | 7,559 | 165 | # TODO: Add comment
#
# Author: fec
###############################################################################
library(R6)
library(reticulate)
source("Outcome.R")
source_python("pythonFunctions/pythonCode.py")
DataSplitter <- R6Class("DataSplitter",
public = list(
sampleFunction = NULL,
init... |
88eed3e596b9b5277c5164be12f36958003ab7621c3965f1a3e088c9311ce26c | R | 7,565 | 221 | source("analysis/scripts/packages_and_functions.R")
celltype <- "balancer"
cilium_lengths <- read_csv("analysis/data/cilium_lengths.csv")
organelle_stats <- read_csv("analysis/data/organelle_stats.csv")
stats_master <- read_csv("analysis/data/stats_master.csv")
crop_substack_point <- function(x, y, z,
... |
81c345742edb35f2e1e817fce6abe42da3132e605c82e39d2848c794003313e5 | R | 7,585 | 211 | ---
title: "Deploying your app"
author: "Roy Francis"
date: "`r format(Sys.time(), '%d-%b-%Y')`"
output:
html_document:
theme: flatly
highlight: tango
number_sections: true
template:
bootstrap:5
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, eval = FALSE)
```
In this vignette, we l... |
cc373fc21a17614d60fac95eb3d402c45f8107b87363f90ca4bc6c39eb5857ac | R | 7,608 | 205 | rm(list=ls(all=TRUE))
library(RColorBrewer);library(ggplot2);library(mvnfast);library(ggplot2);library(corrplot)
source('simulations/mugent/functions.R')
#########################################################################################
# Power
## changing genetic correlation and heritability exlpained
# source(... |
6deb4f77d121bb2f6108e7c4958b099db6ab338e53c3e909c85ce1ef223ddb7b | R | 7,614 | 123 | #!/usr/bin/env Rscript
library(Seurat)
library(ggplot2)
library(harmony)
library(sctransform)
library(glmGamPoi)
#### Gao raw data ###########
load_file = "./GSE208707/"
OriginalData <- Read10X(data.dir = load_file)
Gao <- CreateSeuratObject(counts=OriginalData, project="Gao")
metadata <- read.csv("./GSE208707/metadat... |
2620825f12ac856315e6f2bce5703afe624a0372a3f509b2911f06471c7e3304 | R | 7,616 | 208 | # ──────────────────────────────────────────────────────────────
# Stats - analyzing RT to comprehension Qs
# in privative and subsective, concrete and abstract phrases
# Author: Ryan Law
# ──────────────────────────────────────────────────────────────
# ---- Setup ----
library(lme4)
library(lmerTest)
library(emmeans)... |
d6a1ce1302e2c699a1ba4351f5d50f98fdb56b29496382ebb9fafabcadfee418 | R | 7,625 | 187 | #!/usr/bin/env RScript
library(ggplot2)
library(ComplexHeatmap)
library(pvclust)
library(circlize)
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... |
8324b33fcef5a2b652aeaadf1fd4115f8017f62320e417e4d94a4fb933bae548 | R | 7,626 | 234 |
rm(list=ls(all=TRUE))
library(REdaS)
sub_list = 1:35
for (ith in sub_list) {
result_raw_table <- read.table(paste("/Users/bo/Documents/data_liujia_lab/analysis_liuP1_greeble/sub", ith,"_mri_record.txt", sep = ""), stringsAsFactors = FALSE)
num_trial = length(result_raw_table[,1])
result_table <- data.frame(su... |
2fa6cceada6b4e3bda5d6f4faffb678680d10d4142e37809c5cea139a65620c8 | R | 7,627 | 303 | #' Render MethylkeyReport to HTML/PDF
#'
#' Render a complete MethylkeyReport to HTML, PDF, or other formats
#' using Quarto.
#'
#' @param report A \code{MethylkeyReport} object (or character path to report dir).
#' @param output_format Character. Output format: "html", "pdf", "docx", or "all"
#' (default: "html").
#... |
c142c6e1a9614c2d7611c981f2659f8ffc427ad3e22376fad698fcbecdc01cb9 | R | 7,628 | 249 | # read out current directory and set parent directory of "R scripts" folder(scr_dir) as
# main working directory; warn if R Scripts is not current working directory
getwd()
basename(getwd())
if (basename(getwd()) == "00_scripts"){
scr_dir = getwd()
setwd("./..")
main_dir = getwd()
} else {readline("Check current... |
09d8f5d61f0b40ce4c474562cf63b85c7799db26c4500349b281bdb2112e4cea | R | 7,629 | 163 | library(dplyr)
library(circlize)
library(data.table)
library(stringr)
library(grid)
library(ComplexHeatmap)
library(ggplot2)
library(cowplot)
library(simplifyEnrichment)
source("../Plot_theme.R")
# Load color scheme
colors <- fread("../Plotting/colors.csv", strip.white = F)
color_v <- colors$Color
names(color_v) <- co... |
f0fa206ff387272cc11287b19ab79fb68652da04df7c4830163e2ebea8d060aa | R | 7,631 | 253 | ---
title: "Molecularly Subtyping Embryonal Tumors - C19MC amplifications"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Jo Lynne Rokita, Stephanie J. Spielman, and Jaclyn N. Taroni
date: 2020
params:
is_ci: TRUE
editor_options:
chunk_output_type: inline
---
The purpose of this notebook is t... |
cfec8a56b20580e0750c1b26595a9c70363cef3236e4dd6ae61d85f8369d91fd | R | 7,632 | 243 | ---
title: "Repeated sample analysis"
output:
html_notebook:
toc: true
toc_float: true
params:
base_run:
label: "1/0 to read histologies.tsv"
value: 0
input: integer
---
## Purpose
There are many specimens in the full dataset that are repeated samples from the same participants.
This workboo... |
4e0d476dfa734dad14a11ace15b06d1ef997e4a63826c658f0e8d5a36c995d45 | R | 7,641 | 198 | ---
output: html_document
author: "Delphine Potier"
output:
html_document:
code_folding: hide
code_download: true
editor_options:
chunk_output_type: console
---
#################
Script for Cut & Tag analysis of H3K4Me3 mark in Jurkat WT and Jurkat CRISPR-edited clones (1D9,2G5 and 1B6).
Made with Docker ... |
0f3421ab8762d2a939e0b85b9eab0ce44dc1a81699ae2b767e579ab015dc967d | R | 7,643 | 198 | ---
title: "01-find-matched-biospecimen"
author: "Aditya Lahiri, Eric Wafula, Jo Lynne Rokita"
date: "10/13/2022"
output: html_notebook
---
In this notebook we load the table `nbl-subset/mycn_nbl_subset_data.tsv` and find the
biospecimen which have matched DNA and RNA IDs. We store these biospecimen as a table
in `nbl... |
d84b89b8010788f59fb8c085bd3089dbf791fb7b3e7bd8fc9616d05bb79f1850 | R | 7,647 | 259 | ## code to prepare internal dataset `column_name_dict` goes here
## based on https://r-pkgs.org/data.html#sec-data-sysdata
##
## alternative names for columns of Olink files
column_name_dict <- dplyr::tibble(
# internal keys used for alternative column names
col_key = c(
"sample_id",
"sample_type",
"as... |
bbbd186981daa23e6a7fd22335583daadee1ee4caaf0087686ee76acaffdb430 | R | 7,652 | 135 | # ==============================================================================
# U3_spatial_pattern.R
# UI definition for the "Spatial Pattern Analysis" tab.
#
# Purpose:
# Provides the interface for identifying and analyzing spatially variable molecular modules using SpaGene.
#
# Key Features:
# - Execut... |
b063762918ea50ef4a86db36d6c792b17df789f1ff6f03d6ea8b8281bc908e9e | R | 7,679 | 199 | library(dplyr)
library(gratia)
library(mgcv)
library(parallel)
library(rjson)
library(stringr)
library(tidyr)
library(NEST)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
tract = args[2]
print(paste("Running NEST for", dataset, tract))
##########... |
8fa927263fd736cd4bd32d5b08092e1dc434e570b2bf5156a4670c6aa5df623c | R | 7,689 | 173 | #' @title Plot correlation of factors with external covariates
#' @name correlate_factors_with_covariates
#' @description Function to correlate factor values with external covariates.
#' @param object a trained \code{\link{MOFA}} object.
#' @param covariates
#' \itemize{
#' \item{\strong{data.frame}: a data.frame wh... |
3cdbaaa820f3bdf3ae50ce74363cb1671c482c646a9945211e17802b05d8774c | R | 7,715 | 194 | ---
title: "Figure6_CGrelated"
author: "MM"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
options(future.globals.maxSize = 10000 * 1024^2)
library(Seurat)
library(harmony)
library(dplyr)
library(tidyr)
library(ggplot2)
library(ggpubr)
library(Nebulosa)
library(Hmisc)
li... |
cbd83abccd0bf8faff4fb2bcd8a30a097ed87a069d33871a3c9baa246e1ba940 | R | 7,716 | 180 | ---
title: "Plotting #3: Sequencing QC Plots/Analysis"
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
output: rmarkdown::html_vignette
theme: united
df_print: kable
vignette: >
%\VignetteIndexEntry{Plotting #3: Sequencing QC Plots/Analysis}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
*... |
ecf3596722b862b69693e6f497d22714797ac7b1bc413c6a52f29a4cf92bc744 | R | 7,719 | 196 | ---
output: html_document
author: "Delphine Potier"
output:
html_document:
code_folding: hide
code_download: true
editor_options:
chunk_output_type: console
---
#################
Script for Cut & Tag analysis of H3K4Me1 mark in Jurkat WT and Jurkat CRISPR-edited clones (1D9,2G5 and 1B6).
Made with Docker ... |
433e1b6aebe37aef95025efb10979ae4b4c63b61c2dc577d2562feb2f715cb87 | R | 7,734 | 271 | # function to evaluate RUVg: Estimating the factors of unwanted variation using control genes
# uses negative control genes, assumed to have constant expression across samples
# Authors: Komal Rathi, updated by Adam Kraya
ruvg_test <-
function(seq_expr_set,
emp_neg_ctrl_genes,
k_val = 1:2,
... |
1600f1f25f3ab41f418d5e36879120e9c7126fe6017de99a26934fbfb661d647 | R | 7,736 | 196 | ########################################
#
# Figure 4 plot
#
#
# Liang Qunjun 2023-12-20
library(tidyverse)
library(bruceR)
library(ggstatsplot)
library(ggridges)
library(psych)
library(RColorBrewer)
library(emmeans)
library(ggeasy)
library(ggsci)
library(patchwork)
library(cowplot)
library(scales)
li... |
81eee89c98faa163e5fe8ab12d225616599f98db98456acf0abc35fb6bdf6092 | R | 7,756 | 129 | ---
title: "HBN Final Sample Selection"
author: "Audrey Luo"
output:
html_document:
code_folding: show
highlight: haddock
theme: lumen
toc: yes
toc_depth: 4
toc_float: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(data.table)
library(dplyr)
library(purrr)
libr... |
1e71ed032fbe439638375aee250ad18d5f2149cc0b04bb86b81733a276879c08 | R | 7,757 | 201 | library(dplyr)
library(gratia)
library(mgcv)
library(parallel)
library(rjson)
library(stringr)
library(tidyr)
library(NEST)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
tract = args[2]
scalar = args[3]
print(paste("Running NEST for", dataset, tra... |
5ae94f3783cd8925148bfcce28cd45427b66958a94f10938f513a3ab0c569518 | R | 7,761 | 199 | # Author: Krutika Gaonkar
#
# Read in consensus snv calls to gather alterations in TP53 and NF1
# to evaluate classifier
# @params snvConsensus multi-caller consensus snv calls
# @params snvTumorOnly Tumor only snv calls
# @params cnvConsensus multi-caller consensus cnv calls
# @params histologyFile histology file: his... |
1f4bec8d795424997e37149f1d461aca21c8eea60c3d78fd516c385d9ec7c04c | R | 7,763 | 201 | library(dplyr)
library(gratia)
library(mgcv)
library(parallel)
library(rjson)
library(stringr)
library(tidyr)
library(NEST)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
tract = args[2]
scalar = args[3]
print(paste("Running NEST for", dataset, tra... |
1615ff0ce3db59fe0a0583358a9c620ba74586fcb5a49df514132d50cf10ac61 | R | 7,769 | 281 | # Test check_is_integer ----
test_that(
"check is integer works - TRUE",
{
expect_true(
object = check_is_integer(x = 1L,
error = FALSE)
)
expect_true(
object = check_is_integer(x = 1L,
error = TRUE)
)
expect_true(
... |
e52ad40365477640645827026410efb79ce56bfb5057306c5c7ca9f31fdec706 | R | 7,770 | 256 | # read out current directory and set parent directory of "R scripts" folder(scr_dir) as
# main working directory; warn if R Scripts is not current working directory
getwd()
basename(getwd())
if (basename(getwd()) == "00_scripts"){
scr_dir = getwd()
setwd("./..")
main_dir = getwd()
} else {readline("Check current... |
82b7631fc5ce415e19f01efaa17cb36a81f3f1e6e4d75e5f3656907e64290d54 | R | 7,776 | 282 | # Test check_is_boolean ----
test_that(
"check is boolean works - TRUE",
{
expect_true(
object = check_is_boolean(x = TRUE,
error = FALSE)
)
expect_true(
object = check_is_boolean(x = TRUE,
error = TRUE)
)
expect_true... |
020284e60a49a46abffeea8861a70e9689415a4e307e0930da7d05bd02548169 | R | 7,781 | 205 | library(dplyr)
library(gratia)
library(mgcv)
library(parallel)
library(rjson)
library(stringr)
library(tidyr)
library(NEST)
##################
# Set Variables
##################
args <- commandArgs(trailingOnly = TRUE)
dataset = args[1]
tract = args[2]
print(paste("Running NEST for", dataset, tract))
##########... |
9d1a4f9b96347916e0417ee3bff902f1d270f5a82039a6f497568f3ebef85593 | R | 7,791 | 164 | library(dplyr)
library(circlize)
library(data.table)
library(stringr)
library(grid)
library(ComplexHeatmap)
library(ggplot2)
library(simplifyEnrichment)
library(cowplot)
source("../Plot_theme.R")
# Load color scheme
colors <- fread("../Plotting/colors.csv", strip.white = F)
color_v <- colors$Color
names(color_v) <- co... |
3e142afe5ba9308faefb5ae3fbd3120e79d541df8f14d8b4a876c491f692af36 | R | 7,794 | 218 | ---
title: "Add ploidy column, status to consensus SEG file"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Chante Bethell and Jaclyn Taroni for ALSF CCDL
date: 2020
---
The `histologies.tsv` file contains a `tumor_ploidy` column, which is tumor ploidy as inferred by ControlFreeC.
The copy number ... |
5bf16b38ce54578d2e94243fc9389820dbeb545c2f548705eb1612a29d66d355 | R | 7,815 | 244 | ---
title: "Applying MOFA+ to the CLL multi-omics data"
author:
name: "Britta Velten"
affiliation: "German Cancer Research Center (DKFZ), Heidelberg, Germany"
email: "b.velten@dkfz-heidelberg.de"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc: true
package: MOFA2
vignette: >
%\VignetteIndex... |
fad215033c4701aa3b188d9097c66f666b899601d358ae376fe584b230e20d0f | R | 7,815 | 163 | # Getting started
## System requirements
**Osprey** requires [MATLAB](https://www.mathworks.com/products/matlab.html) and
has been tested on version 2017a and newer (2019a and newer is required for the GUI). The following toolboxes are
required for full functionality:
- Optimization
- Statistics and Machine Lear... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.