sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
86b0497f8538ba865e6f0404870f4011f6ea773706d5f36d80ef12713fa86314 | R | 23,699 | 622 | ---
title: "High-Grade Glioma Molecular Subtyping - Combine DNA Assays"
author: "Chante Bethell, Jaclyn Taroni for ALSF CCDL, Zhuangzhuang Geng for D3b, Eric Wafula for DBHI, Jo Lynne Rokita for D3b"
date: "2020"
output:
html_notebook:
toc: TRUE
toc_float: TRUE
---
This notebook joins copy number alteration,... |
bd0eab44cde50b5606507a3c24b36a95c374c64e9ac9680fe507e62ec726ddef | R | 23,747 | 706 | library(Matrix)
test_that("Predictor's finalizer should not fail", {
X <- as.matrix(as.integer(iris[, "Species"]), ncol = 1L)
y <- iris[["Sepal.Length"]]
dtrain <- lgb.Dataset(X, label = y)
bst <- lgb.train(
data = dtrain
, params = list(
objective = "regression"
... |
bc17d879395074e03d5a8bb768329988546e46b64209bc9438549f51089b3ea9 | R | 23,826 | 520 | # read in required libraries
devtools::install_github("jinworks/CellChat")
libs <- c( 'gplots','stringi','reshape2','cowplot','RColorBrewer',
'sctransform','stringr','org.Mm.eg.db','AnnotationDbi',
'IRanges','S4Vectors','Biobase','BiocGenerics','clusterProfiler',
'biomaRt','Matrix','DES... |
3407be9c0d367817bdf1ebaaa7a4e8757ea45827056ba3f41e90afdce8bd4f87 | R | 23,845 | 548 | ---
title: "Fried_task_overview"
author: "HannahSavage"
date: "2023-04-28"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
#Set env
```{r, include = FALSE}
library(readxl)
library(dplyr)
library(tidyverse)
library(ggplot2)
library(grid)
library(reshape)
library(scales)
lib... |
b1d257110c68204b294dc718120c3bb75eb7838c94ddd0a09213cb6658cf265b | R | 23,987 | 792 | ###=========================== SET-UP 01 ============================###
#####################################################################
### PACKAGES REQUIRED
pkgs_reg <- c('SummarizedExperiment',
'GSVA',
'ggpubr',
'ggrepel',
'ggthemes',
'scales',
'tidyr',
'PCAtools',
'datawizard',
'forcats',
'effectsize',
'dply... |
0e4eb9353c48e1a35ef22b231f111911d568040cdf480aa8d186a6f753fd20b5 | R | 24,157 | 755 | #' Identify if assays shared between Olink Explore 3072 and Olink Explore HT can
#' be bridged
#'
#' @author
#' Amrita Kar
#' Marianne Sandin
#' Danai G. Topouza
#' Klev Diamanti
#'
#' @description
#' The function uses a dataset from Olink Explore 3072 and a dataset from Olink
#' Explore HT, and examines if the... |
66402b72de5bb73bc80a43e092baf04d703d51c330bf3232e14a1a4331d7368a | R | 24,187 | 680 | ---
title: "Correlations of Classification Performance with Relationship Duration and SNS Interactions"
author: "Kenji Fujisaki"
date: '`r format(Sys.time(), "%Y/%m/%d")`'
output:
html_document:
toc: true
toc_float: true
toc_depth: 4
number_section: true
code_folding: hide
---
**What does this sc... |
d48813c72f7b0ac08bcfa5ccc00e4841f020aacde38e634cbf8c872511074dce | R | 24,246 | 698 | # This is a statistical analysis and visualization script written by Mustafa Yavuz for Joint Perception Project's Behavioral Data.
# 20.03.2024 CVBE LMU Munich
set.seed(11235)
# Load data file ----------------------------------------------------------
library(tidyverse)
dataset <- read_csv("D:/Program F... |
58299ecf6c0a9442ab56ef01ac810c6ac64bf6efdf7d68fa8be2b427c6c3a6aa | R | 24,327 | 645 | ########################### BayCANN #########################################
#
# Objective: Script to perform an emulator-based Bayesian calibration
########################### <<<<<>>>>> #########################################
# Sources: Jalal H, Trikalinos TA, Alarid-Escudero F. BayCANN: Streamlining
# Bayes... |
09f3092290debc4ad2e32f32d31a428fa9ba662f4f5872c96ce183a3f36075a6 | R | 24,440 | 507 | library(Seurat)
library(ggplot2)
library(stringr)
library(gridExtra)
library(cowplot)
library(reshape2)
library(MASS)
library(viridis)
library(rhdf5)
library(dplyr)
library(ggpubr)
library(rstatix)
library(pheatmap)
source("~/PD_project_analysis/manuscript_scripts/MV_utils.R")
options(Seurat.object.assay.version = "v3... |
dadc886a8d4280801be88684498a30bff465867bc80510c49e4cdbaa48d6af91 | R | 24,530 | 524 | ---
title: "iTReX User Manual"
output:
rmdformats::material:
css: iTReX-User-Manual.css
fig_width: 10
fig_height: 10
mathjax: NULL
thumbnails: false
pkgdown:
as_is: true
vignette: >
%\VignetteIndexEntry{iTReX User Manual}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
`... |
f6a433c5b3edce8bf6498c3cf8dd7bfdef151cc9dc11074e5594009233a06220 | R | 24,564 | 534 | #!/usr/bin/env Rscript
# combinefile <- commandArgs(trailingOnly = TRUE)
# # print(c("combinefile: ", combinefile))
# print(combinefile)
###### EANMDflagcount.R v1.51
##### Written by Kaining Hu 2025-01-09
options(warn = -1)
library(getopt)
library(dplyr)
library(stringr)
spec <- matrix(
c("Output", "o", 1, "char... |
418b04a61fa90d2ebda90461e368eefc4b9ba9ebd5bbe95d63a716d6f59e5a87 | R | 24,609 | 627 | ########################################
## Functions to visualise the weights ##
########################################
#' @title Plot heatmap of the weights
#' @name plot_weights_heatmap
#' @description Function to visualize the weights for a given set of factors in a given view. \cr
#' This is useful to visualiz... |
f2ea2374425b99990fada53ff1fab189cf8a3c3ee35e53829af61c7b9f6be130 | R | 24,684 | 771 | #' Performs pathway enrichment using over-representation analysis (ORA) or
#' gene set enrichment analysis (GSEA)
#'
#' @author
#' Kathleen Nevola
#' Klev Diamanti
#'
#' @description
#' This function performs enrichment analysis based on statistical test results
#' and full data using `clusterProfiler`'s functions ... |
c07f7874f84732470df9c3e68b7dce34d1240604fd605e78362d92f8f942ab74 | R | 24,746 | 904 | #' S3 class for Olink NPX data with attached check log
#'
#' @description
#' The `olink_class` class is a tibble subclass that carries the output of
#' [`check_npx()`] as an attribute. This allows downstream functions to
#' automatically access the check log without the user having to pass it
#' explicitly.
#'
#' For A... |
d6d9968aef69502be199dc3bd0884d7bcbf37af27a387f6a43513592030e2eaa | R | 24,845 | 728 |
# Function to find "intercept" factors
# .detectInterceptFactors <- function(object, cor_threshold = 0.75) {
#
# # Sanity checks
# if (!is(object, "MOFAmodel")) stop("'object' has to be an instance of MOFAmodel")
#
# # Fetch data
# data <- getTrainData(object)
# factors <- getfactors_names(object)
# ... |
053c253034a48a6875417df4602cb6534ed6eef0a60c630e55414ff76128ff8c | R | 24,976 | 711 | # S. Spielman for ALSF CCDL, Jo Lynne Rokita for D3b 2022
#
# Makes pdf panels for reporting TP53 and telomerase results in main text
library(tidyverse)
library(survival) # needed to parse model RDS
# Establish base dir
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
# Declare output directory
output_di... |
fa123bb50cb0ec12660c17c91520b851ef2caad201d6d595b2fc22435fc1cc47 | R | 25,153 | 572 | #### Peak Matching Module ####
# Database will be loaded lazily when needed (not at module load time)
# Define options for peak and isotopologue preview
peak_iso_preview <- c("Matched Peaks", "Isotopologue Matched Peaks")
names(peak_iso_preview) <- c("matched", "iso_matched")
# Define the UI component for the peak ma... |
70581444442e2fc3efdc671c0924957804d341c71817d8ddf0157ce9b88d24f8 | R | 25,190 | 504 | library(Seurat)
library(ggplot2)
library(gridExtra)
library(SingleR)
library(scRNAseq)
library(scater)
library(cluster)
library(optparse)
library(dplyr)
library(stringr)
option_list <- list(
make_option(c("-w", "--workdir"), type='character', action='store', default=NA,
help="Path to the working direct... |
de447fed34903960a03b7a132a947c1c2e8a3613b3a15d3bae7fcc3dde96bc3f | R | 25,259 | 635 | ########################################
## Functions to visualise the weights ##
########################################
#' @title Plot heatmap of the weights
#' @name plot_weights_heatmap
#' @description Function to visualize the weights for a given set of factors in a given view. \cr
#' This is useful to visualiz... |
70c8caa7ce2d7dda9e70a869a84b075311f7c1d13f59397eb012008451dfdd0d | R | 25,329 | 551 | ######################
library(dplyr)
library(tidyr)
# Choosing best parameters
#load the data, just in case
data <- read.csv("[path-to...]/pruningComparisonsMatlab/stats/[project]/overall/pruneMLMInputTable.csv")
head(data)
# Define threshold for Infant_Excluded
thresholdInfant <- 0.01 #... |
4d896cde7ff907289a0ec6f29641ee5a9638406e8ba989d5c8a39eb3a92e02f7 | R | 25,350 | 792 | ################################################################################
# RNA-Seq Analysis: Epileptogenesis Models (Kindling & Kainic Acid)
################################################################################
# This script performs differential gene expression analysis comparing two rat
# models of... |
848f6177c1df550d415d77a216537ded7c4993d03ecc03fa43e8204669ca9f84 | R | 25,382 | 1,162 | # Test remove_all_na_cols ----
test_that(
"remove_all_na_cols - works - one NA col",
{
## tibble ----
df <- dplyr::tibble(
a = c(1L, 2L),
b = c("a", "b"),
c = rep(x = NA_character_, times = 2L)
)
expect_no_condition(
object = df_no_na <- remove_all_na_cols(df = df)
)
... |
c727b20e2797a384fe11618cdd58cd4aa04b71321cdbebf9350950a8767d4d4e | R | 25,402 | 809 | ################################################################################
# Immune cell profiling anti-GAD65 – QC and preprocessing
# Author: Sumanta Barman
# Date: 2026-01-26
# Description: Single-cell RNA-seq QC and preprocessing pipeline including
# quality control, doublet removal, normalization... |
5c1acb5267aebbf2005842555dc70973323a58e795f4153141ceda23d8e9559d | R | 25,452 | 501 | ## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----eval=FALSE, fig.width=10-------------------------------------------------
# #Some of the dependencies are not downloaded automatically yet.
# #Below is the ... |
a16dd6a70f0cb702c7722f42b40931a338a0cde705a84e517396aefc2512aaa3 | R | 25,506 | 488 | #' Add annotation ranges to a SVbyEye plot.
#'
#' This function takes a \code{ggplot2} object generated using \code{\link{plotMiro}} function and adds extra annotation on top of query
#' or target coordinates. These ranges are specified in 'annot.gr' object and are visualized either as arrowheads or rectangles.
#'
#' @... |
174973e75134709b2142c153a99b4264172ba1d0a18998b8e0f1bf481dfa8dfd | R | 25,745 | 652 | library(tidyverse)
# This imports the annotate_long_format_table function
source('../long-format-table-utils/annotator/annotator-api.R')
# Function definitions ---------------------------------------------------------
# Generate means, standard deviations, z-scores, and ranks within each group.
#
# Args:
# - exp_df: ... |
509877fb42de30c8ba4d0e77fc0f80efff0f84817ef0350c2feb36a3e53cfab3 | R | 25,790 | 776 | # 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_annotator_cli.R")
working_input_tsv_path <- "test_data/test_long_format_table.tsv"
# v7 adds:
# - GTEx_tissue_group -... |
f6ecde6a67f08b962411e5f3f9e813b31cf7bfd82f47e6b1b2aae9c40b43e824 | R | 25,846 | 612 | ###########################################
## Functions to visualise the input data ##
###########################################
#' @title Plot heatmap of relevant features
#' @name plot_data_heatmap
#' @description Function to plot a heatmap of the data for relevant features, typically the ones with high weights... |
3f720db1adbffcdafef84d3db06c3999b6075233cbe7b5d06fe3d731f7abdf7d | R | 26,091 | 566 | library(Seurat)
library(torch)
library(SummarizedExperiment)
library(ggplot2)
library(future)
library(scrattch.hicat)
library(data.table)
library(dplyr)
library(tibble)
library(pbmcapply)
library(SCISSORS)
library(MetaMarkers)
library(gplots)
library(scales)
library(scubi)
library(paletteer)
library(SeuratWrappers)
... |
7de9b234e36b13324efa532ee5bc0f3b37a78513cf1dbc041cbb0d269b3a6bbd | R | 26,108 | 633 | ##########################################################
## Functions to perform Feature Set Enrichment Analysis ##
##########################################################
#' @title Run feature set Enrichment Analysis
#' @name run_enrichment
#' @description Method to perform feature set enrichment analysis. Here... |
f02bccf55d7f6d6cb90ad0afee9ec1792e3c35c79ed5dd0bfa82a34da1c05ee7 | R | 26,111 | 826 | ---
title: "CLAM_hg38"
author: "Marika Oksanen"
date: "2023-05-26"
output: html_document
---
```{r}
library(biomaRt)
library(VennDiagram)
library(readxl)
library(dplyr)
library(writexl)
library(tidyverse)
library(ggplot2)
library(gprofiler2)
library(ggvenn)
library(data.table)
library(rrvgo)
library(org.Hs.eg.db)
```
... |
9b8e153f0a99f18e8f68e243ba01319b62957e5cfd42473efe64206f4c9c5514 | R | 26,187 | 524 |
#######################################################
## Functions to prepare a MOFA object for training ##
#######################################################
#' @title Prepare a MOFA for training
#' @name prepare_mofa
#' @description Function to prepare a \code{\link{MOFA}} object for training.
#' It require... |
207a4b854e51fca2e12a2609f9045d28bcac58e039e952f54bf5a158e01efc59 | R | 26,213 | 609 | library(ggplot2)
library(ggrepel)
library(ggnewscale)
library(patchwork)
library(scales)
library(dplyr)
library(tidyr)
library(forcats)
library(stringr)
library(tibble)
library(readr)
library(purrr)
library(broom)
library(broom.mixed)
library(lme4)
library(ineq)
library(pheatmap)
library(RColorBrewer)
library(Matrix)
l... |
6aab934ecd8ed832a7563f1f0de0c9bea138a11e826a5f7bd48d1c3469500efd | R | 26,240 | 760 | ###############################################################################
# Title: Early deviations from normative brain morphology and cortical microstructure in schizophrenia spectrum disorders
# Author: Claudio Aleman Morillo . Universidad de Sevilla
# Date: 2025
# Purpose
# This script reproduces the r... |
aa6f40b2c97ba4d06cadcc6fccaaf58976bce32018eab3d204b0d4eaf2acf530 | R | 26,305 | 591 | ##### scRNA #####
setwd("D:/valentin/main/")
load("pheno_ROSMAP.Rdata")
source("scripts/utils.R")
#Load packages
library(dplyr)
library(ggplot2)
library(limma)
library(muscat)
library(purrr)
library(scater)
library(speckle)
library(GeneOverlap)
library(clusterProfiler)
library(scales)
load("new_scRNA_MIC... |
5e5baa2a61fd8e162a6f528206d749ff7c3e8617609c5c19978c78158ca75c81 | R | 26,364 | 559 | options(Seurat.object.assay.version = "v3") # use old Seurat object version
library(Seurat)
library(ggplot2)
library(dplyr)
library(DESeq2)
library(UCell)
library(Kendall)
library(tidyr)
library(BioVenn)
library(Seurat)
source("~/PD_project_analysis/manuscript_scripts/MV_utils.R")
setwd("/home/ubuntu/PDSCRBNG/26_03_2... |
556e8adc0638af3acc39dd83bf1f657ee6a2bff10614c540379968ff68ba99be | R | 26,469 | 635 | ##########################################################
## Functions to perform Feature Set Enrichment Analysis ##
##########################################################
#' @title Run feature set Enrichment Analysis
#' @name run_enrichment
#' @description Method to perform feature set enrichment analysis. Here... |
8d59967824a46bd8c49c75f8328baeffc88aa0bcf860f6baa0bc1adcc6d8f987 | R | 26,496 | 656 | ########################### Unit test: Estimating simple prior distributions ################
#
# Objective: Estimate plausible parameter priors for simple time-to-event
# distributions between cancer states given data for each state
########################### <<<<<>>>>> ########################################... |
2c00c59ea6ea5602e09c319187a4c2e929b47726456d14e59fa5d8871dc1d9f8 | R | 26,568 | 541 | #' Make a horizontal sequence self-alignments.
#'
#' This function takes self-alignment coordinates generated by 'minimap2' aligner and
#' visualize them either as horizontal 'dotplot' or arcs.
#'
#' @param shape A shape used to plot aligned sequences: Either 'segment', 'arc' or 'arrow'.
#' @param sort.by Order PAF ali... |
19a10cb10be6be4c4e52d2bcf8e41a8288ee4da37797375ccda2c2fe1e88347a | R | 26,576 | 921 | # This script creates reference results for usage in the unit tests
# read NPX ----
# OlinkAnalyze v4.3.1 was used to read in the data below. These reference
# datasets are used for testing purposes that the newer versions of code will
# continue reproducing the same results.
npx_data_parquet <- OlinkAnalyze::read_N... |
bf3645df024e885557ee7cd38e068b463363071db8b30ed053160234ae9cd861 | R | 26,624 | 948 | #' Help function to read excel and delimited Olink data files in R and determine
#' their format, data type and platform.
#'
#' @description
#' This function processes Olink software excel or delimited files regardless of
#' data type, platform or format.
#'
#' \strong{Olink software excel files} with the extension
#' ... |
efc7aa65f660561a43537a77a8d8d0b9efa4da3333e8020e96b84904d75fa588 | R | 26,842 | 655 | 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... |
5e93f5794dddeef9c534968674f07c4480a8658b79e14e8f55be32657e2d2a40 | R | 26,864 | 814 | ################################################################################
# RRBS (Methylation) Analysis: Epileptogenesis Models (Kindling & Kainic Acid)
################################################################################
# This script performs reduced representation bisulfite sequencing (RRBS)
# ana... |
6b688a63054ee4e29f2d1623ebb04cb5dd802f4e773cd11c18aa5dc46ea511ae | R | 26,865 | 610 | #' Calculate Composite Value Ratio (Internal Helper)
#'
#' Calculates CVR = (Target Composite / Reference Composite) for each row of data,
#' based on feature selection/weighting defined by a chromosome.
#' Used internally, typically as part of a GA fitness evaluation.
#'
#' @param chromosome Numeric vector. Encodes fe... |
5f5fd6377bd6377a57337f670e7e0ae41eea2baa83d7fb52860a597249f7f557 | R | 26,873 | 598 | ---
title: "Script_BEX_Paper"
author: "Mathis Nozais"
date: "04/11/2024"
output:
html_document:
code_folding: hide
code_download: true
editor_options:
chunk_output_type: console
---
#################
Script for the mice scRNAseq for "BEX" paper.
Made for Docker SEURAT 440
#################
```{r}
libra... |
ac19084bff41dce8f802563bf7d3e97e663e93cfb02c3b2fc2539109cf34f5a5 | R | 26,945 | 597 |
####################################
## Set and retrieve factors names ##
####################################
#' @rdname factors_names
#' @param object a \code{\link{MOFA}} object.
#' @aliases factors_names,MOFA-method
#' @return character vector with the factor names
#' @export
setMethod("factors_names", signature... |
32a73cf32a1452db23f75aedb593dd14c3dd5d0652f911890f942732bcd2edd1 | R | 27,032 | 616 | library(pROC)
data(aSAH)
context("coords")
test_that("coords with thresholds works", {
return.rows <- c("threshold", "specificity", "sensitivity", "accuracy", "tn", "tp", "fn", "fp", "npv", "ppv", "1-specificity", "1-sensitivity", "1-accuracy", "1-npv", "1-ppv", "lr_pos", "lr_neg", "youden", "closest.topleft")
ob... |
9fb50dc843475dcaa1e675701d64ec69fcb7e041ee2a66817163d90084dab2b7 | R | 27,101 | 592 | gen_eigengenes <- function(data_1, data_2, data_3 = NULL, net_colors){
UKBBN_eigen = moduleEigengenes(data_1, net_colors)$eigengenes
PITT_eigen = moduleEigengenes(data_2, net_colors)$eigengenes
ret = list(UKBBN_eigen, PITT_eigen)
if(!is.null(data_3)){
ROSMAP_eigen = moduleEigengenes(data_3, net_col... |
021c25c4b4019d1a11d0efc02a964bd1e0d0119e50ed0d53d87dad3ca1eca200 | R | 27,221 | 564 | ######################################################
## Set the current working directory
######################################################
library(rstudioapi) # make sure you have it installed
current_path <- getActiveDocumentContext()$path
setwd(dirname(current_path ))
print(current_path)
base_dir = dirname(... |
520874296e9dddfeafd86215ce2b8314bd5729164af5109c221917c1ce7c2573 | R | 27,225 | 719 | library(lme4)
library(lmerTest)
library(dplyr)
library(emmeans)
library(boot)
set.seed(123)
num_subjects <- 29
permute_sign_flipping_contrasts <- function(data,
formula,
compute_contrast_fn,
... |
39ba89f4943768a1e586916bb5d07af60eebce8fa70e7f7ede32ff9b7b84445e | R | 27,396 | 629 |
################################################
## Get functions to fetch data from the model ##
################################################
#' @title Get dimensions
#' @name get_dimensions
#' @description Extract dimensionalities from the model.
#' @details K indicates the number of factors, M indicates the n... |
228907e3bba6747aef08554e69975866a14ac9523150c47622434dd0e339b702 | R | 27,464 | 419 | rmats_docker <- "xinglab/rmats:v4.3.0"
cwl_version <- "v1.2"
get_array_type <- function(item_type) {
return(list(type = "array", items = item_type))
}
get_2d_array_type <- function(item_type) {
return(get_array_type(get_array_type(item_type)))
}
## Workflow inputs
wf_bam_g1_input <- InputParam(id = "wf_bam_g1... |
5ffaf2298fe4d0359cfde87217f4d93fa21b03010c1eaf9bc547fe84ee7d8cf2 | R | 27,501 | 741 | #' Function that performs a two-way ordinal analysis.
#'
#' @description
#' Function that performs a two-way ordinal analysis of variance can address an
#' experimental design with two independent variables, each of which is a factor
#' variable. The main effect of each independent variable can be tested, as well
#' as... |
1b88f731a4c4157eaeceed16f59763b7f1f6f1bb8380236c69b0fbe3881ad52f | R | 27,503 | 754 |
# ==============================================================================
# S3_spatial_pattern.R
# Server logic for Step 2: Spatial Pattern Analysis
# Handles SpaGene identification, pattern visualization, and heatmap generation
# ============================================================================... |
f6d54db3aac817eca2522765e3f00aec9a7430037fe26200340685e5e90b5232 | R | 27,548 | 1,043 | # Test olink_class S3 class --------------------------------------------------
# Test data ----
npx_data1_check_log <- check_npx(df = npx_data1) |>
suppressWarnings() |>
suppressMessages()
# Test new_olink_class ----
test_that(
"new_olink_class - works - creates an olink_class from tibble and check_log",
{
... |
ebf6d28e66219c502df70cad3830ca73a2cefa5534f5d161bebc982ec159f2a0 | R | 27,567 | 604 | require(Seurat)
#require(hdf5r)
require(harmony)
require(ggplot2)
require(patchwork)
require(tidyverse)
setwd(".")
output_dir <- "output"
######################################
# Loading in count data
dirs <- list.files("/mnt/vast/hpc/MenonLab/SenNet/snRNAseq", pattern="-GEX", include.dirs... |
8e6d59dba3264ed1407151b0c09138dd1ff4a6de24cefa8a1545430d53477ec8 | R | 27,573 | 844 | test_that(
"olink_bridgeselector - works",
{
check_log <- check_npx(df = npx_data1) |>
suppressMessages() |>
suppressWarnings()
expect_no_error(
object = expect_no_warning(
object = expect_message(
object = expect_message(
object = bridge_samples <- olink_bri... |
fbfa692e00daf70dc34577e4504a711d1b578cc945e0924beec0dbbfd271ca64 | R | 27,573 | 767 | #' Function which performs a Kruskal-Wallis Test or Friedman Test per protein
#'
#' Performs an Kruskal-Wallis Test for each assay (by OlinkID) in every panel
#' using stats::kruskal.test.
#' Performs an Friedman Test for each assay (by OlinkID) in every panel
#' using rstatix::friedman_test. The function handles facto... |
e80a94a6782aad8476d04dfb97a9f94469e930fc70f7108460c65e174b9d0b88 | R | 27,615 | 969 | #' Class Betas
#'
#' This class extend SummarizedExperiment,
#' with new methods, it made it specific for betas values.
#'
#' @seealso
#' \code{\link{SummarizedExperiment-class}} : The parent class
#'
#' @family data container
#'
#' @importClassesFrom SummarizedExperiment SummarizedExperiment
#'
#' @export
setClass("Be... |
6d061a3300958b2d19d23b31c1317aafb264cae6bb58240ea3bdfc3c6ab34dc2 | R | 27,923 | 386 | ##### FACS celltype enrichment #####
# Load FACS EWAS results
load("FACS/IRF8_allcpg.rdata")
AllLME_IRF8 = AllLME
load("FACS/NeuN_allcpg.rdata")
AllLME_NeuN = AllLME
load("FACS/Sox10_allcpg.rdata")
AllLME_Sox10 = AllLME
load("FACS/Trip neg_allcpg.rdata")
AllLME_TripNeg = AllLME
remove(AllLME)
AllLME_IRF8 =... |
0afe68204e00fa691988e9ab57294c0aa43222a95164185d01016f9784aa7547 | R | 27,959 | 718 | ---
title: "X-ray proteomics analysis - remove NA"
author: "Tianyi Li"
date: "2024-02-20"
editor_options:
chunk_output_type: console
output:
html_document:
number_sections: yes
toc: yes
toc_float: yes
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load required library
```{... |
3e26eedf98af9b8fb0892ec35fb0d845147cc3095e1ab2587dcce8731d357ef0 | R | 28,071 | 943 | library(dplyr)
library(ggplot2)
library(readxl)
library(org.Mm.eg.db)
library("DT")
library(msigdbr)
library(tidyr)
library(clusterProfiler)
library("ggVennDiagram")
library(UpSetR)
library(ComplexHeatmap)
library(reshape2)
library(fgsea)
library(tidyverse) # for dplyr functions and pivot_longer
library(purrr)
librar... |
cf54da188ac6165269321a84bac62fe2892b056c718622619a7a0a35baae9495 | R | 28,281 | 646 | # Plotting functions
#
# Author: Xuran Wang
############################################################################################################
#' Convert list of real and estimated cell type proportions to data frame
#'
#' This is a function for converting real and estimated cell type proportions to d... |
35134c8de52b7b9f6d6c3813f80b00ccbf6a39481d97f4817aa1ae44243f5842 | R | 28,293 | 710 | ---
title: "GBM6_Analysis"
format: html
editor: visual
---
# 0 Setup
## 0.0 Load Libraries
```{r Load Libraries}
wd = ""
setwd(wd)
#general
library(tidyverse)
library(dplyr)
library(readxl)
library(ggplotify) # for as.ggplot for complex heatmaps svg saving
#DE
library(DESeq2)
library(edgeR)
#graphing
library(cowplot... |
6993932220eb709bc1d3ff0f62c6cf496dbd5a8a1698dd513e3306e9ae3ebaff | R | 28,325 | 490 | library(mgcv)
library(gratia)
library(tidyverse)
library(dplyr)
######################################
# FIT GAM SMOOTH (FOR TRACT PROFILES)
######################################
## Function to fit a GAM (nodewise_measure ~ s(smooth_var, k = knots, fx = set_fx) + covariates))
## per each node for each tract and save... |
505e65790f366ca2b93754b83e6046d8f349b70b30c3c35269cd906e69b5dbf0 | R | 28,380 | 1,097 | # Test read_npx_delim ----
test_that(
"read_npx_delim - works - long format - output df matches input df",
{
skip_on_os("windows")
## tibble ----
withr::with_tempfile(
new = "scdfile_test",
pattern = "delim-file-test",
fileext = ".csv",
code = {
# random data frame
... |
df5ae9c8f1af8af3d1077ada95e275554b12c26151ab698121728cdba14cd334 | R | 28,486 | 789 | #INFORMATION-----------------------------
#LOAD LIBRARIES ------------------------
library(data.table)
library(DT)
library(dplyr)
library(ff)
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(gplots)
library(Matrix)
library(matrixStats)
library(magrittr)
library(plotly)
library(shiny)
library(shinycssloaders)
... |
19ebb3284ffe59a240e09bfa30918fd8974143b0b5b8c4d8bf1385ec76c0d403 | R | 28,573 | 774 | ### Upset plots
### E3 vs E4 across each layers/LB+, LBsur, LB- spots.
library(UpSetR)
library(colorRamps)
library(tidyverse)
library(venn)
library(openxlsx)
setwd("./")
timeStamp <- format(Sys.time(), "%m%d%y")
outdir <- "./figures/"
layerCols <- c(
"L1" ="#8D405C",
"L23"= "#E7BDE1",
"L4"= "#CF8CA4",
"... |
490f05bef381083453f3f03a9634e04026420e8572776e376f8bbead53efb7c1 | R | 28,617 | 957 | # Code to generate Figure 3 of the Jokura et al 2024 Ctenophore apical organ connectome paper
# source packages and functions ------------------------------------------------
source("analysis/scripts/packages_and_functions.R")
# load cell type ---------------------------------------------------------------
# get al... |
a6396361fbcb42175dc3b02db0ad0a04785c8e70c60544fb3ce53b4f26a6afea | R | 28,711 | 847 | ---
title: "EEG Spindle Statistical Analysis"
author: "Kevin Liu"
date: "`r Sys.Date()`"
output:
pdf_document:
toc: true
fig_caption: true
number_sections: true
keep_tex: true
html_document:
toc: true
number_sections: true
keep_md: true
---
```{r setup, include=FALSE}
library(tidyver... |
d1a2e3c41804217fbf13d9774934af61913f63a679ed40912c8c9cd0226aac05 | R | 28,729 | 645 | setwd("/home/pranali/Documents/glioma_manuscript/survival/")
library(survival)
library(survminer)
cgga = readRDS('CGGA_oligo_ssgsea_Oct2025.rds')
tcga = readRDS('TCGA_oligo_ssgsea_Oct2025.rds')
colnames(tcga) = paste0('TCGA_',
sapply(colnames(tcga),
function(x... |
5ec993cd95a8e15bdfcd4ced50a3826cc8bb479f2f007a31e508b9f7e473560e | R | 28,909 | 878 | ################################################################################
# Integrative Analysis: RNA-Seq and RRBS Data Integration
################################################################################
# This script integrates differential gene expression (DEG) and differential
# methylation (DMG) dat... |
cdff14294635495466d5f4760fd4598cc8be513586493f56c5d0a6932909b692 | R | 28,977 | 689 | ---
author: "Belinda Phipson"
title: "speckle: statistical methods for analysing single cell RNA-seq data"
date: "`r BiocStyle::doc_date()`"
package: "`r BiocStyle::pkg_ver('speckle')`"
vignette: >
%\VignetteEncoding{UTF-8}
%\VignetteIndexEntry{speckle: statistical methods for analysing single cell RNA-seq data... |
e954da8caaafcec10acb1bac4d274f71857ef56536842a48a8d6e3b28174442a | R | 29,022 | 745 | #' Prioritize cell types involved in a biological process
#'
#' Prioritize cell types involved in a complex biological process by training a
#' machine-learning model to predict sample labels (e.g., disease vs. control,
#' treated vs. untreated, or time post-stimulus), and evaluate the performance
#' of the model ... |
5981d5bfa7cfd6b926ce9ad4de1814875796ad63ce8b146cc3e49c4720344147 | R | 29,114 | 698 | # import libraries
library(tidyverse)
library(ggridges)
library(cowplot) # for colouring the figures
# set path to out_path in python
in_path <- ""
# set path if you want to save the plots
out_path <- ""
#############################################################################
# FIGURE 1. 2D KERNEL GRAPHS F... |
4412f036ed86acf4a999941e30dfeb7f08533216fb95c1bce3b0231d0fe6bda2 | R | 29,191 | 807 | # ==============================================================================
# S7_differential_analysis.R
# Server logic for Step 4: Differential Analysis
# Handles differential testing, thresholding, and visualization (Volcano, Barplot, UMAP)
# ==================================================================... |
f34c48e0bcd5b386832ee77e0dd4ea51279fa2dc3c2ecbb9c024b591b5aa0dbd | R | 29,193 | 982 | # Create datasets for testing ----
## use npx_data1 ----
# Remove sample controls from npx_data1 to preserve test results
npx_data1_mod <- npx_data1 |>
dplyr::filter(
!stringr::str_detect(
string = .data[["SampleID"]],
pattern = stringr::regex(
pattern = "control|ctrl",
ignore_case =... |
5c33b794a6e548c7de4eb98503d1bd9826da9045aeff10cbacaf7d0944af2e54 | R | 29,409 | 798 | test_that(
"data loads correctly - long - parquet",
{
# get data if available, otherwise skip the test
ref_res <- get_example_data("reference_results.rds")
npx_file <- get_inst_extdata_file(filename = "npx_data_ext.parquet")
withr::with_tempfile(
new = "tmp_long_parquet",
pattern = "par... |
5d76196a03098c0dd36775744f2393260a377f1e0664cbf60d512d28f884afff | R | 29,616 | 831 | # SELECT DATA TAB -----------------------------------------------------------------------------------------
# UPLOAD PP -----------------------------------------------
upload_preprocessed <- function(name, type){
dir_path <- paste0("./public_datasets/", name, "/", type, ".rds")
obj <- readRDS(dir_path)
r... |
b7bdb66e82191cf0aede3c54bff9406965282b7b905b854cbbe9b77e77cbc8c9 | R | 29,616 | 768 | library(dplyr)
library(readxl)
library(dplyr)
library(survival)
library(glmnet)
library(parallel)
library(doParallel)
library(caret)
library(openxlsx)
library(CsChange)
library(data.table)
library(mice)
library(bigreadr)
library(Hmisc)
library(survival)
library(prodlim)
library(pec)
library(tidy... |
423648ef4ba715f0f1578983e0d0066faad8884886517f80985bd332f4fb114e | R | 29,745 | 856 | #INFORMATION-----------------------------
# updated on the appserver
#LOAD LIBRARIES ------------------------
library(data.table)
library(DT)
library(dplyr)
library(ff)
library(ggheatmap) #install dev github version
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(gplots)
library(gridExtra)
library(Matri... |
a2c0e9120243e52556dd2e6517fb0d8f70aff8321bd28360479f199a36d6eb1c | R | 29,784 | 604 | library(Seurat)
library(torch)
library(SummarizedExperiment)
library(ggplot2)
library(future)
library(scrattch.hicat)
library(data.table)
library(dplyr)
library(tibble)
library(pbmcapply)
library(SCISSORS)
library(MetaMarkers)
library(gplots)
plan("multicore", workers=10)
plan()
options(future.globals.maxSize= 38... |
27e9d963f738b7fec3a166b1469905facb8146c5c01a566469621c1378cf902f | R | 29,817 | 657 | ###############################################################################
############### Integration of sc/snRNA-seq datasets via SCT v2 ###############
###############################################################################
###Load in packages:
library(dplyr)
library(Seurat)
# library(Seurat,l... |
444f3f1291bf6f8381fc9149e00fd50e4a2f38a74b02cebeac1a56588650cf93 | R | 29,858 | 819 | #' Compute the component neighborhood matrices for the BANKSY matrix.
#'
#' @details
#' Given an expression matrix (as specified by \code{assay_name}), this function
#' computes the mean neighborhood matrix (\code{H0}) and optionally, the
#' azimuthal Gabor filter (AGF) matrix (\code{H1}). The number of neighbors
#'... |
051d4654983b13bbb667f51700675362900930b4670162bdc12dd0922ddd7d28 | R | 29,941 | 1,039 | #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#################### Operators ####################
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#' Set a default value if an object is NOT null
#'
#' @param lhs An object to set if it's NOT null
#' @pa... |
c985fad08e73e7b087ec733506b0951cd217f8ba80afb8093365ea071aaf62b8 | R | 29,961 | 694 | # 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... |
a290a4b91b0e03e5c50be5a6c3e5566fb77a713ad369926e6cc0156b347e5023 | R | 30,083 | 810 | #' Enrichment analysis for any type of annotation data
#' @param x a vector include all log2FC with gene name
#' @param object annotation file for all genes
#' @param keytype gene ID type
#' @param pvalue pvalue cutoff value
#' @param padj adjust p value cut off method
#' @param KEGG a logical evaluating to TRUE or FAL... |
599b05890ef349cfd684178f4b106eb0568b3aa735505cf4acbcd28560ca8a26 | R | 30,096 | 938 | #' Help function utilizing functions from \code{\link{read_npx_format}} and
#' \code{\link{read_npx_wide}} to streamline \code{\link{read_npx_legacy}}
#'
#' @author
#' Klev Diamanti
#'
#' @inheritParams read_npx_legacy
#' @param data_type_no_accept Character vector of data types that should be
#' rejected (default = ... |
a1cca4eacce792e8a002b311840b0f9203a59ede1846719183181400802bf81b | R | 30,133 | 612 | # Created by use_targets().
# Follow the comments below to fill in this target script.
# Then follow the manual to check and run the pipeline:
# https://books.ropensci.org/targets/walkthrough.html#inspect-the-pipeline
# Load packages required to define the pipeline:
library(targets)
library(tarchetypes)
library(tidy... |
a471ba5565a27af7e5e100bca9f1dfb5b32de4b6814680ca3717abd2b9fa6fcb | R | 30,288 | 666 | # J. Taroni for CCDL 2019
# Updated by Eric Wafula for Pediatric Open Targets 2022, Jo Lynne Rokita for D3b 2023/2024
# This script takes a directory of OpenPedCan files to subset and produces a list
# of biospecimen IDs, saved as an RDS file, to use to subset the files for
# use in continuous integration.
#
# This lis... |
df55fa9534fb6fae236a4dc595489e1fcb25b2d74ef65d14efb4660427ed36f7 | R | 30,379 | 507 | # expected.coords <- coords(r.s100b, "all", ret="all")
# dump("expected.coords", "", control = c("all", "hexNumeric"))
expected.coords <-
structure(list(
threshold = c(
-Inf, 0x1.1eb851eb851ecp-5, 0x1.70a3d70a3d70ap-5,
0x1.c28f5c28f5c29p-5, 0x1.0a3d70a3d70a4p-4, 0x1.3333333333334p-4,
0x1.5c28f5... |
072e03bbb0b0f8fe30225c355970b79f171dddf687b59a15b02e414cd6a961cc | R | 30,863 | 1,201 | # Test olink_pca_plot ----
test_that(
"olink_pca_plot - works - OSI",
{
skip_if_not_installed(pkg = c("ggrepel"))
# Load OSI data
osi_data <- get_example_data("example_osi_data.rds")
# ----------------------------
# OSICategory invalid value
# ----------------------------
df_bad_cat <... |
fd3f234a810d2755048ddfede30c494f11081bbb7997ec26860e63f1b2104bcd | R | 30,925 | 802 | library(Seurat)
library(readxl)
library(ggplot2)
library(dplyr)
library(harmony)
##QC read
rootPath <- "foetal/cellRangerOutput/"
summfiles <- paste0(rootPath, dir(rootPath),"outs/metrics_summary.csv")
rootPath <- "invitro/run36169/"
summfiles <- c(summfiles,(paste0(rootPath, dir(rootPath),"cellranger-hg38/outs/metr... |
52004540ccefe3572aaa1e0cf2a6bdee2dbbf98474ccbb96c2ad970330b934d1 | R | 30,972 | 831 | library(BiocParallel)
####################################################################################################################################
####################################################################################################################################
###############################... |
a5b7ee73877872104187b600584e2bd605174797195fc7ae45c2dbf7dffde610 | R | 31,110 | 804 | #### LOAD PACKAGES ####
# Load necessary libraries
library(lme4)
library(ggplot2)
library(MASS) # For Box-Cox
library(car) # For powerTransform
# for bootstrapping:
library(foreach)
library(doParallel)
library(dplyr)
library(effectsize)
library(MuMIn)
library(viridis) #for colourblind friendly palette
#### WORKS... |
bfe9be12ee9dba953d52f56197675e4b6dd9c9cd7d55ef46076881989edd1743 | R | 31,205 | 903 | #INFORMATION-----------------------------
#LOAD LIBRARIES ------------------------
library(data.table)
library(DT)
library(dplyr)
library(ff)
library(fgsea)
library(ggheatmap) #install dev github version
#devtools::install_github("XiaoLuo-boy/ggheatmap")
library(ggplot2)
library(ggpubr)
library(ggrepel)
library(ggtree... |
f1042b9143801fe8dbd0032dca08cb343df7131605bf0790b96b0a76480350d4 | R | 31,372 | 540 | rm(list=ls())
## COMMON LIBRARIES AND FUNCTIONS
source("100.common-variables.r")
source("101.common-functions.r")
source("300.variables.r")
source("301.functions.r")
source("500.plotting-variables.r")
source("501.plotting-functions.r")
## SCRIPT SPECIFIC LIBRARIES
## SCRIPT SPECIFIC FUNCTIONS
## SCRIPT CODE
##
##... |
3ccda42b43a493e96845de7fd294992153b142f0113f3dacdf08876a508f3675 | R | 31,381 | 956 | ### PACKAGES TO LOAD
###------------------------------------------------------------------####
library(ggplot2)
library(colorspace)
library(tidyr)
library(dplyr)
library(ggthemes)
library(ggpubr)
library(ggrepel)
library(effectsize)
library(ggthemes)
library(scales)
library(forcats)
library(tidyverse)
library(caret)... |
17ea8ee743d7c2ea1fae82c210492544998a2e0d65ddc356e7281ead226face0 | R | 31,442 | 1,070 | ##' @method as.data.frame Annot
##' @export
as.data.frame.Annot<-function(x,...){
as.data.frame(x@annot)
}
##' @method as.data.frame richResult
##' @export
as.data.frame.richResult <- function(x, ...) {
as.data.frame(x@result, ...)
}
##' @method as.data.frame GSEAResult
##' @export
as.data.frame.GSEAResult <- funct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.