sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
f892dbbc8d828cbf15d97dc01a7f67757079a3540a0d68a0cb40091c4be02278 | R | 6,362 | 177 | ---
title: "Heatmaps of LRT downregulated genes"
author: "AF"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r setup, message=FALSE, warning=FALSE}
suppressPackageStartupMessages({
library(circlize)
library(ComplexHeatmap)
library(Annotati... |
902e09529510602363ede7b0c9b7bb08de11ecdf07538ee5b2833d319d251628 | R | 6,366 | 118 | #' GO Enrichment analysis function
#' @param x vector contains gene names or dataframe with DEGs information
#' @param godata GO annotation data
#' @param ontology BP,MF or CC
#' @param pvalue cutoff pvalue
#' @param padj cutoff p adjust value
#' @param organism organism
#' @param keytype keytype for input genes
#' @pa... |
22563979819cf0cd8f68b26ca7508bc058e8dc3da33263ce47934c5cb68d449e | R | 6,368 | 159 | #------------------------------------------------------------------------------#
# #
# #
# ... |
ca4bf46200cbc0f88305a6910410fcad0787fd634429c4121e4befbc66f06597 | R | 6,369 | 157 | ## Script for processing scRNAseq embryonal data from Lehtinen lab (Dani et al.)
## Run until log normalization
## Save seuratobject
library('Seurat')
library('dplyr')
library('gridExtra')
library('scater')
source('/home/clintdn/VIB/DATA/Sophie/RNA-seq_Sandra/CITEseq_Test/RAW_DATA/script_functions_COVID.R') #KEVIN
#... |
023d413fbd47405ae63f7c43a30ced76c4a850b9323574ab110dccb3abd6e846 | R | 6,370 | 181 | ##-------------------------------------##
## QC - CELLS ##
##-------------------------------------##
calculateQCmetrics <- function(countMatrix){
print("Calculating CELL QC")
mt_genes <- grep("^MT[-\\.]", rownames(countMatrix), ignore.case = TRUE, value = TRUE)
lib_sizes <- colSum... |
d74d5cefe85cc6bd297acf9fbe41591e10c9752c632b29f25a0e78de9948615f | R | 6,377 | 154 | #'---
#' title: DNA-RNA matching matrix
#' author: vyepez
#' wb:
#' log:
#' - snakemake: '`sm str(tmp_dir / "MAE" / "{dataset}" / "QC_matrix_plot.Rds")`'
#' input:
#' - mat_qc: '`sm cfg.getProcessedResultsDir() +
#' "/mae/{dataset}/dna_rna_qc_matrix.Rds"`'
#' output:
#' - wBhtml: '`sm config["... |
893072ab9d4f43876aba4ad795157eeba7fb402e115ac742315aeb5bd9f9ca1e | R | 6,379 | 233 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#################### GENERICS ####################
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#################### OBJ... |
dc646c289030929a152ad36235e86f125ec7ce48bfb07f259153862e17baa040 | R | 6,385 | 224 | # Code and functions to create the lists of ensembl IDs for mitochondrial, ribosomal, and hemoglobin genes
# Functions -----------------------------------------------------------------------------------
library(tidyverse)
library(AnnotationHub)
Create_Ensembl_Ribo_List <- function(
) {
refreshHub(hubClass="Annota... |
6a02957be6054600ce87108e6f1ded8e7682526aa0320c1f6ac5832351c469b1 | R | 6,391 | 146 | # plot/table of each cohort + cancer_group vs GTEx subgroups
suppressPackageStartupMessages(library(tidyr))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(ggplot2))
tumor_normal_gtex_plot <- function(expr_mat_gene, hist_file, map_file,
analysis_... |
54f3e6e002cf7921888d6c2696aff55d94998066bc2d226c6acb54bc3b442207 | R | 6,415 | 192 | #' @name lgb.model.dt.tree
#' @title Parse a LightGBM model json dump
#' @description Parse a LightGBM model json dump into a \code{data.table} structure.
#' @param model object of class \code{lgb.Booster}.
#' @param num_iteration Number of iterations to include. NULL or <= 0 means use best iteration.
#' @param start_i... |
f54becc3f38a6ed76b5aac4ccacb755ba071ebe612aee25a243c5cfcc64601b5 | R | 6,439 | 210 | # Unsupervised Analysis of Transcriptomic Differences - Run Dimension Reduction
# Chante Bethell for CCDL 2019
#
# This script runs dimensionality reduction techniques:
# Principal Component Analysis (PCA), Uniform Manifold Approximation
# and Projection (UMAP), and optionally t-Distributed Stochastic Neighbor
# Embedd... |
724944b6bb33c106b0b73aeefcf4a576d361757d39517765f2e6613a05573724 | R | 6,440 | 166 | #' @title Mass Spectrometry Identification
#' @description Identifies metabolites by searching against Project, KEGG, and HMDB databases.
#' Supports both m/z-based identification (by neutral mass calculation and error tolerance)
#' and name-based identification (if `mz` column is missing).
#' Uses parallel process... |
1ac5ea24042fdc41ea47b7238f6ff98f40805f09eba24eec2730b3dba87a08da | R | 6,442 | 178 | ---
title: "02-find-non-matching-biospecimen"
output: html_notebook
author: "Aditya Lahiri, Eric Wafula, Jo Lynne Rokita"
date: "10/13/2022"
---
In this notebook we find the biospecimen which do not have matched DNA and RNA
biospecimen. We create a dataframe for these biospecimens called `MYCN_non_match_df`
which ha... |
7f62915d800813d8cc325ab1653c3d61f68c98f7d13fc58a5764f3aebff1331a | R | 6,444 | 157 | #' Summarizing Bootstrapped Network Estimates from 'bootnet'
#'
#' @param bootnet_output Output from the 'bootnet' package after bootstrapping network analysis.
#' @param include_sample_edge_weight Logical, whether to include sample edge weight in the summary table.
#' @param include_p_values String, whether to include... |
97921a2ee6166fb855dee89b1a1f40c1da3df3ce28f454cc2f21aea53a7a2568 | R | 6,444 | 170 | #rm(list=ls(all=TRUE))
library(data.table);library(magrittr);library(tidyr);library(dplyr);library(ggplot2)
library(mvnfast,lib='/home/lorincn/Rpkgs')
library(mvsusieR,lib='/home/lorincn/Rpkgs')
# library(snpsettest,lib='/home/lorincn/Rpkgs')
source('/home/lorincn/Rpkgs/manual_snpsettestcode.R')
library(ACAT,lib='/home... |
9d4b01286e834ab1a09862bff70edbae56daae0b868bd926caa90d5f6fc9bc74 | R | 6,445 | 217 | #' Principal Component Analysis using FlashPCA
#'
#' @param X A numeric matrix to perform PCA on, or a
#' character string pointing to a PLINK dataset.
#'
#' @param ndim Integer. How many dimensions to return in results.
#'
#' @param stand A character string indicating how to standardise X before PCA,
#' one of "binom... |
e354b69f14da39a532dad96fafe131b56a636c6d178ff634f55caf9fa4f97a50 | R | 6,446 | 42 | olink_wide_bottom_matrix <- dplyr::tribble(
~olink_platform, ~data_type, ~plate_specific, ~version, ~variable_name, ~variable_alt_names, # nolint: line_length_linter
"Flex", "NPX", FALSE, 0L, "Missing Data freq.", "Missing Data freq.", ... |
2e9eece877a4df07120c23636b37e44104aa36bc56defc4344198d8b4c41c769 | R | 6,498 | 256 | # We are going to look at how iterating too much might generate observation instability.
# Obviously, we are in a controlled environment, without issues (real rules).
# Do not do this in a real scenario.
library(lightgbm)
# define helper functions for creating plots
# output of `RColorBrewer::brewer.pal(10, "RdYlGn"... |
e31f57e8fe3847d4668ab69b71f7c52061149578ea1c44eaf36255ca865c4fca | R | 6,505 | 140 | # Define negative adducts used in lipid annotation
neg_adducts <- c(
"[M-3H]3-", "[M-2H]2-", "[M-H]-", "[M+Na-2H]-",
"[M+Cl]-", "[M+K-2H]-", "[M+C2H3N-H]-", "[M+CHO2]-",
"[M+C2H3O2]-", "[M+Br]-", "[M+C2F3O2]-", "[2M-H]-",
"[2M+CHO2]-", "[2M+C2H3O2]-", "[3M-H]-", "[M-H+HCOONa]-",
"[M]-"
)
# Define p... |
52d73f7636e3d67a1b3122f22b5be419aca73d98295b50155c4f1725f9fd36b4 | R | 6,518 | 143 | library(ggplot2)
library(ComplexHeatmap)
library(stringr)
library(simplifyEnrichment)
library(circlize)
library(data.table)
library(cowplot)
source("../Plot_theme.R")
set.seed(1234)
# Load color scheme
colors <- fread("../Plotting/colors.csv", strip.white = F)
color_v <- colors$Color
names(color_v) <- colors$ID
# Fu... |
ae510d6c88d43b4e74abbabde403f757285bfe2fa674a9607224ba8a8d770582 | R | 6,528 | 177 | library(dplyr)
library(ggplot2)
library(readr)
# --- Configuration ---
summaries_dir <- '/imaging/hauk/rl05/fake_diamond/results/behavioral'
aggregated_data_path <- '/imaging/hauk/rl05/fake_diamond/scripts/analysis/behavioural/group_data.csv'
# Create a subdirectory for plots to keep things organized.
summaries_dir <... |
24480c018844282890620b732d71b422f27324f574b78c71c89030bec8caad01 | R | 6,536 | 143 | # TODO: Add comment
#
# Author: fec
###############################################################################
library(R6)
source("Outcome.R")
MelanomeCSVParser <- R6Class("MelanomeCSVParser",
public = list(
inputDataFrbgCSV = 'data/F_manualContours_anon.csv',
inputDataUnetFrbgCSV = 'data/F_unetCont... |
37f8e3b27908b307c51fbff153944b5f30667a6e27d6e9321130f0ceec6bb870 | R | 6,545 | 143 | run_CaSTLe<-function(DataPath,LabelsPath,CV_RDataPath, OutputDir, GeneOrderPath = NULL, NumGenes = NULL){
"
run CaSTLe
Wrapper script to run CaSTLe 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.
Parameter... |
c2e11f43ddc962dfacc61ad2f826be65b96487d779dda86f41f2635555981b71 | R | 6,551 | 163 | # ==============================================================================
# Script Name: DESeq2_for_PCA_and_DEG.R
# Description: This script performs DESeq2 normalization (comparing rlog vs VST),
# PCA analysis, and differential expression analysis.
# Input: gene_counts.xls
# Output: ... |
a48a0a91471a197cbabf42c425a6c33832d0f551ba7727eca9ee5f5389e2b563 | R | 6,576 | 218 | # 设置工作目录
setwd("/data/nas1/liuyiding_OD/project/01_project_147/02_scRNA-analysis/scRNA_input")
parent_dir <- "/data/nas1/liuyiding_OD/project/01_project_147/02_scRNA-analysis/scRNA_input"
sample_dirs <- list.dirs(parent_dir, full.names = TRUE, recursive = FALSE)
seurat_list <- list()
for (dir in sample_dirs) {
sampl... |
8af7d875ce49d95910bdadff406ed6653532817ccf03afe50ae2060d2286cbb0 | R | 6,580 | 143 | # analyze overall score
traitAnnotation = read.csv('data/traitOverview.csv')
PPIClusters = read.csv('data/PPIFullNetworkClusters.csv')
variantsCiliopathy = read.csv('data/variantsCiliopathies.csv')
'%notin%' = Negate('%in%')
allScores = read.csv('data/finalScores.csv', row.names = 1)
allScoresNoKnown = allScores[a... |
19641ae15902d0dd4a703798a1c2a62fa958ba61b84aeb05b8a07853b9d7ad57 | R | 6,584 | 218 | #' MethylkeyReport S4 Class
#'
#' An S4 class representing a methylation analysis report project.
#' Tracks project structure, steps, cache configuration, and metadata.
#'
#' @slot project_dir Character. Root directory for the report project.
#' @slot report_id Character. Unique identifier for this report (allows multi... |
85b1665aed3968b925022d148b3b7b2db70d48e6d111d176401a1a180077f6e9 | R | 6,604 | 122 | 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... |
58c1f920cdfbf2a0c8ce868e07821263900d98264084593b2b876f04b5976754 | R | 6,607 | 197 | ---
title: "Timecourse Heatmap for Day14 GO Terms"
author: "AF"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r setup, message=FALSE, warning=FALSE}
suppressPackageStartupMessages({
library(circlize)
library(ComplexHeatmap)
library(Annota... |
101e8501d368fd4235579b43a612c3c493bb163a33b80be88b783e483c158d1d | R | 6,614 | 223 | # =================================================
# functions
prepare_data <- function(xtrain, ytrain, xtest, ytest, scale_type, scale_cols = NULL){
y_names <- colnames(ytrain)
x_names <- colnames(xtrain)
n_train <- nrow(xtrain)
n_test <- nrow(xtest)
x <- rbind(xtrain, xtest)
y <- rbind(ytrain, ytest)
n... |
38d6d7c27083f7b508f92612857dcb0c721f6d608bbec25d4a279b5e6d2791ce | R | 6,616 | 128 | ---
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... |
f8718382d8da51a042260d60d4138fd9765a367b2abaf8d632792b732e161c79 | R | 6,617 | 142 | #' Filter PAF alignments.
#'
#' This function takes loaded PAF alignments using \code{\link{readPaf}} function and perform
#' user defined filtering of input alignments based on mapping quality, alignment length, and
#' minimum alignments between target and query.
#'
#' @param min.mapq Minimum mapping quality to retain... |
f9c1edfea59fe387ac952929bc72be2f80534ac0af9dcfa9231665bf6e33d1dc | R | 6,619 | 244 | ########################################
######### Li et al., 2025 ##############
####### UXILIARY FUNCTIONS SCRIPT ######
########################################
#Load_packages
```{r}
load_packages <- function(packages) {
for (package in packages) {
if (!require(package, character.only = TRUE)) {
messag... |
f9f7ba9ac8c2512b54db8e6d754c2f21fd2747ef1b888dbff9cb0bf82bf0c15d | R | 6,625 | 154 |
#' @title Simulate a data set using the generative model of MOFA
#' @name make_example_data
#' @description Function to simulate an example multi-view multi-group data set according to the generative model of MOFA2.
#' @param n_views number of views
#' @param n_features number of features in each view
#' @param n_sam... |
4fddf7ffd0b7c729037efbcae67f5f43be006bbf1976357f8a1f121fab0b0512 | R | 6,626 | 144 | ---
title: "HBN Final Sample Selection for mapmri"
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(... |
17e0ddfabe6a75f00173aaf8260fdc9eafd478daaf24d486a3c624976fb1723b | R | 6,630 | 266 | ---
title: "DBS Mutational Signatures Analysis"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Ryan Corbett
date: 2022
params:
snv_file: ""
output_Folder: ""
---
**Purpose:**
Calculate and plot DBS mutational signatures for all samples using [COSMIC signatures](https://cancer.sanger.ac.uk/cos... |
cad0bfc99f6ccfef5b00318ec949fc34cdfd90f0f26b1d2aa53aa79757ebd506 | R | 6,645 | 163 | # This script adds gene and cancer_group annotations to an input long-format
# table TSV file and outputs an annotated long-format table TSV file
#
# This script parses arguments and calls the annotate_long_format_table function
# in the annotator/annotator-api.R file to add required annotation columns
#
# EXAMPLE USAG... |
5d4d3187c6e5fedc10aedf8ad63669c465a5d9332deb2c089b7683b32998e974 | R | 6,646 | 163 | rm(list=ls(all=TRUE))
library(mvnfast);library(ggplot2);library(dplyr);library(RColorBrewer)
source('simulations/xgent/functions.R')
###########################################################################################
# Type I error and power with changing xQTL and disease h2
m=100
p=3 # number of xQTL types
ngw... |
a195af93f9c625b42434d65df0d169bf9da167010a0cc4a3cea9ea3155233987 | R | 6,660 | 146 | ---
title: "HCPD Final Sample Selection for mapmri"
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... |
bd9a35f695660a198a1e8a631ff3aafac4951bef407c517d4222fdaaedd2fa2c | R | 6,665 | 166 | library(Seurat)
library(ggplot2)
library(patchwork)
library(dplyr)
library(tidyverse)
library(stringr)
library(cowplot)
library(optparse)
library(grDevices)
library(RColorBrewer)
# Define the command line options
option_list <- list(
make_option(c("-i", "--input_rds"), type = "character", default = "", help = "Input... |
58c454c5a0cc25f1feefa5f2c0761ff0713636a27d81ba52fc1792813e20f641 | R | 6,677 | 174 | #! /usr/bin/Rscript --vanilla
library(MuMIn)
library(survival)
library("survminer")
set.seed(7)
source("DataSplitter.R")
source("Outcome.R")
source("MelanomeCSVParser.R")
source("FeatureReduction.R")
source("Model.R")
source("PredefinedFeatureReductionRuleSequences.R")
source("MelanomeSettings.R")
source("ModelTrain... |
d95bf5f0d1d15ed39c6a07ce96d8040824d38bd71396a703cbe1ac0a47c1bf22 | R | 6,686 | 196 |
#' Shared CpG island categories used by all enrichment plots.
.cpg_island_levels <- c(
"OpenSea", "Shelf", "S_Shelf", "S_Shore", "Island", "Shore",
"N_Shore", "N_Shelf"
)
.cpg_island_colors <- c(
"OpenSea" = "#A6CEE3", "Shelf" = "#1F78B4", "N_Shelf" = "#1F78B4",
"S_Shelf" = "#1F78B4", "Shore" = "#B2DF8A", "N_... |
e4ba9d834522c2ca4cae62ca5156a5bcce00a92770b0bb4251afda88501957a1 | R | 6,687 | 185 | library(tidyr)
library(ggplot2)
library(dplyr)
library(aplot)
library(scales)
main <- function(){
annotation <- read.table(snakemake@input[["annotation"]], sep="\t", header=TRUE)
reads_df <- read.table(snakemake@input[["reads_csv"]], sep="\t", header=TRUE)
colors <- read.csv(snakemake@input[["colors_df"]], sep=... |
149e5a9d8abac385d59c530e951da854df68a07988750ad9065770e484a56961 | R | 6,696 | 223 | suppressPackageStartupMessages({
library(readxl)
library(dplyr)
library(ggplot2)
library(ggseg)
library(viridis)
})
plot_dk_from_xlsx <- function(
xlsx_path,
out_png = NULL,
sheet_name = 1,
use_clean_atlas = TRUE,
atlas_rds = NULL,
width = 9,
height = 4.5,
dpi = 300,
backg... |
26cbf4702801f9bc8a25c67ed8200ec69dc6907e280427e8d87ff4bff2c11eb1 | R | 6,707 | 230 | ---
title: "Determine the recurrent focal CN dominant status calls"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Chante Bethell for ALSF CCDL
date: 2020
---
This notebook determines the recurrent focal copy number dominant status calls by region using the output of `05-define-most-focal-cn-units... |
abc7742d7789d3cda5c9daa0d0d427912c8c7cf4ef80ca5918a36fe145a0fa9f | R | 6,711 | 157 |
evaluateAllModelsOnAllValidationSets <- function(models, featureReductioContainers, testTrainSetList) {
bestPerformance <- 0
bestModel <- NULL
featurePreprocessor <- NULL
for (i in seq_len(length(models))) {#run again over all folds to get a performance value for each validation set and each model
modelCIn... |
52cea5039bcefe5587b55f9b125b10081ce7c436a874386fc8783ceb6632a067 | R | 6,720 | 144 | ---
title: "HCPD Final Sample Selection for NODDI"
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(... |
a500e9dd84d877ab0c2d0a900d9cd073f53ef421c4fd0d886557cb9c1de459dc | R | 6,722 | 135 | #### libraries
# required for linear mixed effects models
library(lme4);
# required for significance testing in LMMs
library(lmerTest);
# required for pretty plotting
library(ggplot2);
# required for colour-blind friendly palettes
library(viridis);
#### file management
# setup data files
setwd("/users/fabianschnei... |
264e2babc8a30b2071e0e4620675add3ce064d081a02450f3caad4e987b125a5 | R | 6,733 | 256 | test_that(
"olink_dist_plot - works",
{
skip_if_not_installed("ggplot2", minimum_version = "3.4.0")
#Load data with hidden/excluded assays (all NPX=NA)
npx_data_format221010 <- get_example_data(
filename = "npx_data_format-Oct-2022.rds"
)
npx_data_extended_format221121 <- get_example_dat... |
b4a7e81fd8335ffd65e75232627595e559a38e89f117b8eb1daf9a9f3b566140 | R | 6,736 | 160 | loadNamespace("lintr")
args <- commandArgs(
trailingOnly = TRUE
)
SOURCE_DIR <- args[[1L]]
FILES_TO_LINT <- list.files(
path = SOURCE_DIR
, pattern = "\\.r$|\\.rmd$"
, all.files = TRUE
, ignore.case = TRUE
, full.names = TRUE
, recursive = TRUE
, include.dirs = FALSE
)
# skip R files ... |
3399559f3425a48b39c71ec5e9528fedca5c69df990d0e5530a1bc80d2968c63 | R | 6,740 | 225 | ---
title: "Parameter selection (VeraFISH Mouse Hippocampus)"
output: BiocStyle::html_document
# output: pdf_document
vignette: >
%\VignetteIndexEntry{Parameter selection (VeraFISH Mouse Hippocampus)}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
... |
bc385f0c92aff7c15889fee45b945a88b579aa61f705da2896c7cbbf19c8ef9b | R | 6,742 | 224 | ---
title: "Survival Analysis for molecular subtypes of HGG"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: C. Savonen for ALSF CCDL, Krutika Gaonkar for D3b, Jo Lynne Rokita for D3b
date: 2019, 2022
params:
plot_ci: TRUE
---
**Purpose:**
Runs survival analysis models for subtypes of HGG tumor... |
65fcb323ed78beb75b8bae726d2068a4ae2de58687dc7915d93a873ac9e256dd | R | 6,744 | 210 | ################################################################################
# Developer name: Bhagwan Yadav #
# Developed at Institute for Molecular Medicine Finland (FIMM) #
# Rewritten and extended by Yannick Berker, KITZ Heidelberg (v22) ... |
796c24fb8d2c6b9c9eb18c3017f1745bd19f369edc7e6b051f5f93f101439dbd | R | 6,750 | 204 | ---
title: "QC report"
output: html_document
---
## `r PID`
### summary
```{r}
debug_save(screenData)
screenData <- read.csv(file.path(output_dir, "pre_process", paste0(PID, "_screenData.csv")))
screenData$Column <- gsub("(?<![0-9])([0-9])(?![0-9])", "0\\1", screenData$Column, perl = TRUE)
combo_data <- screenData[!... |
19eea79d9a668b0a8ce3e1bffad31379ece2b7465fcfc705fb12fa682ca025fa | R | 6,751 | 225 | # Hua Sun
CallPeaksUsingMACS2 <- function(obj=NULL, macs2='MACS2', annotation=NULL)
{
DefaultAssay(obj) <- "ATAC"
ref <- unique(obj$ref)
effective_genome_size <- 2.3e+09
if (ref == 'hg38'){ effective_genome_size <- 2.7e+09 }
peaks <- CallPeaks(obj, macs2.path = macs2, effective.genome.size ... |
5cb9db641510374a14bddbbede73c2c69ebc34bd62bde5537d8b0fea2d9d6670 | R | 6,759 | 109 | #' Calculate the probability of motif occurrence in each sequence
#' @description This function calculates the probability of motif occurrence in each sequence and counts the number of non-overlapping motif occurrences.
#' The probability of motif occurrence is calculated using a Markov chain and becomes increasingly c... |
6e21e6e558e3ae13d96493d87accba68182e06632b19258e30d0d302bc46577e | R | 6,773 | 188 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#################### SHARED SEURAT & LIGER PLOTTING ####################
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' Factor Correlation Plot
#'
#' Plot positive correlations between gene loadings a... |
5e167f2e5508672b8943a95c6cc7e864bbcb5f383b4b7c25c4f34d09bff7efa4 | R | 6,778 | 237 | # ============================================================
# Variogram analysis & LOOCV for decade-wise precipitation
# ============================================================
# ===============================
# 📦 Load required packages
# ===============================
library(sp)
library(gstat)
li... |
5e656dbef1b424cca69d7220e15d920ea7b5456c71db3968e5120699a31580ff | R | 6,780 | 205 | ---
title: "High-grade Glioma Molecular Subtyping - Focal and Broad Copy Number Alterations"
author: "Chante Bethell, Stephanie J. Spielman, and Jaclyn Taroni for ALSF CCDL"
date: "2020"
output:
html_notebook:
toc: yes
toc_float: yes
---
This notebook prepares focal and broad copy number alteration data for ... |
c9785cf768faa2b8d990b5fe75a13fc91acee81d2d9e5a8375a3d4dd45bd5cad | R | 6,780 | 199 | rm(list = ls()) # clear R's memory
#packages
library("EBImage")
library("tools")
library("dplyr")
library("xlsx2dfs")
#load image
GFP.raw <- choose.dir() #select directory containing images
GFP.thresholds <- choose.dir() #select empty directory
GFP.thresholds = paste0(GFP.thresholds, "/")
GFP_list... |
49bdcedc466a661937a018b4be4e32b7ce1d5e906132ad495b77a2b839482d05 | R | 6,800 | 168 | ---
title: "Updating Gene Symbols"
date: 'Compiled: `r format(Sys.Date(), "%B %d, %Y")`'
output: rmarkdown::html_vignette
theme: united
df_print: kable
vignette: >
%\VignetteIndexEntry{Updating Gene Symbols}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
***
<style>
p.caption {
font-size: 0.9... |
22664e7e46a87cb97f7805b74fc1fad4acc77bb08bdfd7b27ed7d4d18fc50a50 | R | 6,802 | 210 |
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(s... |
caca5de7f2cd70905ff6790687ecb50d3287ca49fa07414efab5931e3597932a | R | 6,825 | 183 | # code to measure length of cilia
# WARNING: It is absolutely essential that the root node is proximal to the basal body
# i.e., the order of nodes needs to be:
# "root" -> (optional "exit_ciliary_pocket") -> "basal body" -> "cilium tip"
# this can be checked with functions in helper_scripts.R
source("analysis/scrip... |
5ffa0992080a597ca2a06a0ba7c8874b5922602d7aec8d5b58dd9bbcc2e13b56 | R | 6,831 | 248 | test_that(
"read_npx_excel - works - wide format",
{
skip_if_not_installed(pkg = "readxl")
skip_if_not_installed(pkg = "writexl")
# get synthetic data, or skip if not available
df_rand <- get_wide_synthetic_data(
olink_platform = "Target 96",
data_type = "NPX",
n_panels = 3L,
... |
9000db983b6b97fbc5169a326e1150be528a20918dd642320434dfeb2c248277 | R | 6,847 | 177 | # Code to generate Figure 4 Supplement 1 of the Jokura et al 2024 Ctenophore apical organ connectome paper
# source packages and functions ------------------------------------------------
source("analysis/scripts/packages_and_functions.R")
# CBF barplot sagittal(S) vs tentacular(T) ----------------------------------... |
ca5c82bcd91f7662eadcfe59ee8025197aca5e0a2b2ee268c8cc3d57d0663c78 | R | 6,849 | 147 | #' Export FASTA sequences from a set of Genomic Ranges.
#'
#' This function takes a \code{\link{GRanges-class}} object and extracts a genomic sequence
#' from these regions either from an original range or a range expanded on each side by
#' defined number of bases.
#'
#' @param gr A \code{\link{GRanges-class}} object ... |
9526355e2f11eca44ffe88b22e6bb550eec2a9b9e781bfc1e4340e5f402f124a | R | 6,860 | 181 | #'---
#' title: MAE Results table
#' author: vyepez
#' wb:
#' log:
#' - snakemake: '`sm str(tmp_dir / "MAE" / "{dataset}" / "{annotation}_results.Rds")`'
#' params:
#' - allelicRatioCutoff: '`sm cfg.MAE.get("allelicRatioCutoff")`'
#' - padjCutoff: '`sm cfg.MAE.get("padjCutoff")`'
#' - maxCohortFreq: '`sm cfg.... |
e222d91b3b6a37acecfbebdd09945c43e65045aaa00a8422e23241928f065fb5 | R | 6,876 | 185 | library(tradeSeq)
library(ggplot2)
library(tidyverse)
library(scales)
library(scico)
set.seed(8)
pathToDir <- "saved/scanpy/"
rootMain <- "figures/main/"
rootSupp <- "figures/supp/"
rootOthers <- "figures/others/"
w <- as.matrix(read.csv(paste0(pathToDir,"cellWeights_astrocytes.csv"), header = FALSE))
dpt <- as.matr... |
4c079d4c072683e55ab2101559ff11e36d6db0b235bba482e270ce2329a92b66 | R | 6,879 | 163 | dists <- list(
list(distribution = "uniform", n = 1, min = 0.5, max = 1.0),
list(distribution = "uniform", n = 1, min = 0, max = 0.4)
)
batch_100_10 <- batch_sim_ddd(dists, 100, 10, 1, 100)
batch_80_10 <- batch_sim_ddd(dists, 80, 10, 1, 100)
batch_60_10 <- batch_sim_ddd(dists, 60, 10, 1, 100)
batch_40_10 <- batch_... |
c4a3535ab4b570f796f3a6234ebad3e62013adb8927bac783e71757fbbee1601 | R | 6,880 | 192 | rm(list = ls())
library(ggplot2)
library(readr)
library(dplyr)
library(tidyr)
library(zoo)
# Paths
balancer_info_path <- "analysis/data/balancer_CBF_Pearson_correlation_analysis/csv/balancer_info.csv"
csv_folder <- "analysis/data/balancer_CBF_Pearson_correlation_analysis/csv"
preproc_folder <- "analysis/data/balancer... |
5457ba48ba3de95f6fb833ff900a84d71a65bb08a9a4c33589094f431e7096fd | R | 6,892 | 204 | library(plyr)
#' @title Annotate reduced dimension space with gene expression values
#'
#' @description Annotates reduced dimension space, e.g., UMAP and tSNE, with gene expression values. Values will be automatically be log2-transformed prior to plotting.
#'
#' @param MarvelObject Marvel object. S3 object generated f... |
16aa1ac91da7ebafe2b29bf27d8f1c878c815c83321ee920fc82b84df3fedd68 | R | 6,897 | 139 | ---
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... |
aef30bf22c95270219edc088541d45c5a38bc072807cb708adf16d92da8af223 | R | 6,899 | 177 | library(boot)
library(pROC)
# Define functions for sensitivity, specificity, accuracy, and F1 score
sensitivity <- function(actual, predicted) {
TP <- sum(actual == 1 & predicted == 1)
FN <- sum(actual == 1 & predicted == 0)
return(TP / (TP + FN))
}
specificity <- function(actual, predicted) {
TN <... |
43f8eda519dc71b8cad24b3f56ffcaccb60453f6c0413728f22bdc39f5033292 | R | 6,908 | 95 | #!/usr/bin/env Rscript
#Run like this:
#Rscript --vanilla tests/IVIMmodels/unit_tests/analyze.r test_output_priors.csv test_duration_priors.csv
args = commandArgs(trailingOnly=TRUE)
output_name = "test_output.csv"
duration_name = "test_duration.csv"
runPrediction = FALSE
if (length(args)>=1) {
output_name = args[1]... |
e630e35b566f0a4ce13bef47bb01b4102fdea42cec29becb6da0aa9d5f5d0bda | R | 6,914 | 146 | library(DESeq2)
library(tidyverse)
library(ComplexHeatmap)
library(AnnotationDbi)
library(metaseqR2)
source("util.R")
## ===== Human iN =====
load("Figure_3/data/hs/mtx_data.RData")
meta_data$CellLine <- factor(meta_data$CellLine, levels = c("Wbo2", "I27", "1019"))
levels(meta_data$CellLine) <- c("iN #1", "iN #2", "i... |
c22f6ef2ae31891f804488574204ee2091841930666b7433afac6188e9a49a55 | R | 6,917 | 181 | ---
title: "Molecularly Subtyping EPN Tumors"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
author: Komal S. Rathi (adapted from python notebook by Teja Koganti), Ryan Corbett
date: 2022
---
## Usage
This notebook is intended to be run via the command line from the top directory
of the repository as fol... |
683168e0b235c60d86621b96003fd8c294ef2955aa7a564e145685285fb5f5a4 | R | 6,930 | 160 | # Create GENCODE gene features and Illumina infinium methylation array CpG
# probe coordinates bed files
# Eric Wafula for Pediatric OpenTargets
# 06/26/2023
# Load libraries
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(library(rtracklayer))
suppressPackageStartupMessages(library(... |
a45af4a7e5e8003aa25a43c0c6141e41c5286797372cce16965b98ab60cbc695 | R | 6,950 | 216 | context("Testing SCCA")
## It's kind of hard to test that SCCA is working, but we can at least test
## that SCCA of X with X gives
## - canonical correlations, i.e., diag(cor(Px, Py)), are equal to 1.
## - and that the canonical covariances ``d'' are the same as the eigenvalues
## of X^T X.
##
## We use very small pe... |
597900b5123234710ae090838f07dee90bd76f760b384adfac175a36649371e8 | R | 6,951 | 206 | #########################################################################################################
### 2. define range sizes ------------------------------------------------------------------------------
### in this script we use the data from Caudullo et al. 2017 (https://doi.org/10.1016/j.dib.2017.05.007)
### ... |
71796a9335430672a29808374b7f170b5dd8b48e56d6023caf9ac6da08e4f24f | R | 6,954 | 234 | ---
title: "Spatial data integration with Harmony (10x Visium Human DLPFC)"
output: BiocStyle::html_document
vignette: >
%\VignetteIndexEntry{Spatial data integration with Harmony (10x Visium Human DLPFC)}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$... |
009b8aff1c00c6bb138694cfcd4f19d630b824c5d8808a9eb5f45ba2bbce92ed | R | 6,957 | 174 | # Simulation functions
#
# Author: Xuran Wang
##################################################################################
#' Simulate Single cell read counts
#'
#' Simulate expected library sizes from a log-normal distribution
#'
#' @param N integer, number of subjects in total.
#' @param n.bulk integ... |
3eb9f0bd66104d7e2b4baac7adeb4f77944933330faab63957b43ab2fb0144fc | R | 6,961 | 195 |
##-------------------------------------##
## SCORES TAB ##
##-------------------------------------##
tab_SCORES <- tabItem(
tabName = "Scores",
textOutput(outputId = "session_id"),
sidebarLayout(
sidebarPanel(width = 4,
h4("Calculate new score:... |
81694553808870a4f216514ede9fb863d6af51047500f84317173fb1708d4818 | R | 6,967 | 192 | # 1. Sample Size per Group
n_counts <- NeuroMET %>%
filter (visit == "t1")%>%
count(diagnose_group) %>%
mutate(label = paste0("n = ", n)) %>%
select(-n) %>%
pivot_wider(names_from = diagnose_group, values_from = label) %>%
mutate(variable = "Sample size")
# 2. Continuous variable summaries with 95% CIs
... |
f854b0cb36f6b654a3dfe385bf5e6bd38ec05eec9a1658f398df9ab63ad5563b | R | 6,971 | 147 | ---
title: "HBN Final Sample Selection for NODDI"
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(p... |
05bc88e165d560adfc87a021e300caf39412ee2908328238016324d06478018b | R | 6,974 | 106 | # Models which excluded one individual with disproportional influence on the model. Model fit was tested for several spline dfs using anova() and chosing accordin best AIC/BIC
NeuroMETs <- NeuroMET %>% filter (!(record_id == "NeuroMetXXX" & visit == "t4"))
# Model 1, 1 individual excluded
lmer_long_glu_groupwise_s ... |
d25995c15d52a1d37ffa581fc0d7f661d21de59b9e748354bda6b4ad671ec6fa | R | 6,990 | 201 | ###### Function to create a nice data.frame for any type of input GWAS ######
# #' Tidy input GWAS
# #'
# #' From the GWAS arguments (exposure/outcome) of the main MRlap function,
# #' create a nice/tidy data.frame that can be used by all other functions.
# #'
# #' @param GWAS xx
# #'
# #' @inheritParams MRlap
# #' ... |
93556a79dc900c83a4d30295c02b79a8c31bce5768d9a3ae4572210c1eb3b460 | R | 7,000 | 193 | # Download gene Ensembl ENSG ID to gene full name and protein RefSeq IDs mapping
# file `annotation-data/ensg-gene-full-name-refseq-protein.tsv` from
# https://mygene.info/
# Import functions -------------------------------------------------------------
# Get %>% without loading the whole library
`%>%` <- dplyr::`%>%`... |
7ef7c33a8547bb3344bf2243e2f13ec97359a1c050db255922002921c374115f | R | 7,002 | 192 | library(tradeSeq)
library(ggplot2)
library(tidyverse)
library(scales)
library(scico)
set.seed(8)
pathToDir <- "saved/scanpy/"
rootMain <- "figures/main/"
rootSupp <- "figures/supp/"
rootOthers <- "figures/others/"
w <- as.matrix(read.csv(paste0(pathToDir,"cellWeights_neurons.csv"), header = FALSE))
dpt <- as.matrix... |
5876b5d6d814020c972d35e429cb0c10eb3a1bc191f9eec6f48574069cf5447c | R | 7,008 | 171 | combine <- function(...) {
pad0 <- function(x, len) c(x, rep(0, len-length(x)))
padm0 <- function(x, len) rbind(x, matrix(0, nrow=len-nrow(x),
ncol=ncol(x)))
rflist <- list(...)
areForest <- sapply(rflist, function(x) inherits(x, "randomForest"))
if (any(!are... |
aab911ee93ea14fbf326f612fc4370a9e06647882a35e6473b5c42278b3f8806 | R | 7,027 | 195 | context("plot")
# Tests powered by vdiffr.
# To update the reference with vdiffr:
# > library(vdiffr)
# > source("tests/testthat.R")
# > manage_cases()
test_that("plot draws correctly", {
skip_if_not_installed("vdiffr")
skip_if(getRversion() < "4.1")
test_basic_plot <- function() plot(r)
# S100b
r <- r.s100... |
b9a76d814f4bd512d641c45bc623f427599280ba2eba8c03dcdca633c781e06b | R | 7,029 | 197 | ---
title: "Find CNV losses that overlap with TP53 domains"
author: "K S Gaonkar, Jo Lynne Rokita"
output: html_notebook
params:
base_run:
label: "1/0 to run with base histology"
value: 0
input: integer
editor_options:
chunk_output_type: inline
---
In this script we will find CNV losses that overl... |
64949ae9060c8dcdba450f27bec5caa4a12dda3dd6eace2e4392f96782e75638 | R | 7,043 | 205 | # Cross-validation ----
fitControl <- trainControl(method = "repeatedcv", # Cross-validation, default is bootstrap
number = 10,
repeats = 3,
classProbs = TRUE,
savePredictions = TRUE,
i... |
827a5acf3cb24462ad7b0017f455078468d8b376f91c1fab22cb65d3ae17fb88 | R | 7,045 | 274 | test_that(
"npxProcessing_forDimRed - works - no dropped assays or missing assays",
{
# Load reference results
reference_results <- get_example_data(filename = "reference_results.rds")
npx_data1_uniqueid <- npx_data1 |>
dplyr::mutate(
SampleID = paste0(.data[["SampleID"]], "_", .data[["In... |
0b0d87a2a4b84227e05c7a2b5bd89363012fcea59eb80c551d65d471bf1a323b | R | 7,074 | 185 | 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)
# Computation of th... |
5fdba874f79383d377d9865de33e7b457cbdf1b87b597f616c0dd0b739adc05d | R | 7,085 | 113 | #' Calculate the probability of motif occurrence in each sequence
#' @description This function calculates the probability of motif occurrence in each sequence and counts the number of non-overlapping motif occurrences.
#' The probability of motif occurrence is calculated using a Markov chain and becomes increasingly c... |
01940466567f9081f9c65f2feff2746f72df1524e03dc7c51cbe31bef4dfae4a | R | 7,094 | 216 | ---
title: "Identify samples with _TP53_ and _NF1_ mutations in the stranded RNA-seq dataset"
output: html_notebook
author: Jaclyn Taroni for ALSF CCDL
date: 2020
---
To run and fully test the `tp53_nf1_score` module in continuous integration, we must ensure that there are positive examples of _TP53_ and _NF1_ mutatio... |
722526ccf2ddfe6595c52db2b2edee07b9fbcc0dc9b9e63e5afa342828cd3906 | R | 7,107 | 192 | #!/usr/bin/env Rscript
# Plot overall conversion rates per UTR
# 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 Soft... |
d6f6ae4acfdfac05386a1b5b1473af39f6a6ff308f6bba2d216b5b60bcb26f0f | R | 7,116 | 258 | #' @name lgb.interpret
#' @title Compute feature contribution of prediction
#' @description Computes feature contribution components of rawscore prediction.
#' @param model object of class \code{lgb.Booster}.
#' @param data a matrix object or a dgCMatrix object.
#' @param idxset an integer vector of indices of rows nee... |
25440ffd885b6a559314c1abf9c2d98644a0f1f973b36413ca9747a2568cd307 | R | 7,139 | 159 | ---
title: "HCPD 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)
lib... |
825c7138c0439edef59a565a789bb5821ba6b036d87ffb6c876dd562a0811076 | R | 7,140 | 184 | ###### Function to run MR ######
# #' Run MR
# #'
# #' Use TwoSampleMR to perform IVW-MR and returns causal effect estimate (SE)
# #' but also M (number of instruments), mean sample size for exposure / outcome
# #' and the set of IVs used
# #'
# #' @param exposure_data xx
# #' @param outcome_data xx
# #'
# #' @inher... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.