sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
7c49a39089b67ce923cf43bf9145bb544cb209c1089dd2eb56f4b7e861ffa25b | R | 6,990 | 264 | # PGLMM analysis for gene expression data. This script runs Phylogenetic Generalized Linear Mixed Models (PGLMM) using MCMCglmm for each gene and phenotype, extracts pMCMC values, and saves results to a file.
library(tidyverse) # version 2.0.0
library(ape) # version 5.8
library(MCMCglmm) # version 2.36
library(coda) #... |
206579e98d7625ce6475cea4f37bce7426e585e521fbd8dba8933f71c9c57868 | R | 6,991 | 153 |
#makes diag plots for all .rds files in dirname and outputs to same dir
combined_plot = function(runname, datatype){
if(datatype %in% c("binding")){
xlabs = c(rep("Observed Delta(log10(Ka)) Binding", 3))
ylabs = c(rep("Predicted Delta(log10(Ka)) Binding",3))
use.legend = c("Starr Data", "Our Data")
... |
df04ad7e9c1bf96b453d113d519dfe68269f1d835df82733e4de0090c904834b | R | 6,999 | 277 | ---
title: "Prepare scRNA-seq data from Sade-Feldman et al. 2018"
author: "Wei Sun"
date: "`r Sys.Date()`"
output:
html_document:
theme: journal
highlight: tango
toc: true
toc_depth: 3
toc_float:
collapsed: true
smooth_scroll: false
number_sections: false
df_print: paged
---
```... |
f39a93473dae9ec6e258a0b1725ac7595a959122564f5be015975632791ddd6a | R | 7,004 | 172 |
setwd(rstudioapi::getActiveProject())
rm(list = ls())
library(tidyverse)
library(ggpubr)
source("./Scripts/Function_scripts/Effect_size_functions.R")
source("./Scripts/Function_scripts/Pre-processing_functions.R")
load("./Output_Data/Lpd.MsD.GPMV_Age_ES.Rdata")
load("./Output_Data/Lpd.MsD.Invitro_Qui_Age_ES.w.RT.Rdat... |
4f0be8636f713737da49c3c8292e99115a29be9ca76812af9ac370d31a372859 | R | 7,005 | 186 | ##
##Load regNet package
##
#- See https://github.com/seifemi/regNet for details how to install regNet.
library( regNet )
##
##Set the following paths according to your system
##
#- Must be modified to fit to your own system
#- Central project path prefix for regNet to store outputs of regNet
centralProjectPathPrefix... |
ddc63764a1bf3144677edec773b568117c1d3f5f8ffd57dfb38500de1635ef11 | R | 7,005 | 189 | #############################
# Outlier Selection Script
# z_scores_mtle < -2.0 (low expression in MTLE)
# z_scores_nl > 2.0 (high expression in NL)
#############################
library(dplyr)
###############################################################
##################### Use TPM Count matrix #################... |
e2f91aec188a229ce175eca348d890b3138f3303829758009d3e29eedf8e4176 | R | 7,021 | 212 | #' Compute spatial weights based on distance to the centroid
#'
#' Computes spatial weights for a set of cells based on their Euclidean distance
#' to the centroid of the selected group of cells. This is useful for modeling
#' gradient-like spatial expression centered around a cluster or region.
#' Supports multiple de... |
c9ad49a6470a0ed336ee232032d0d072ddb4712582c61b81362f2234c8ff31fe | R | 7,022 | 182 | #' Test soft-thresholding power values
#'
#' Applies a range of soft-thresholding powers to the networks provided and determines the goodness of fit for each soft power and network.
#'
#' @param network_list A named list that contains the networks of each replicate and the consensus network in an \code{\link{igraph}} f... |
b119e911bb9a72e4a49f200f9c0608aaf436e9d9c48c580876fdf3869de0579b | R | 7,031 | 170 | ---
title: "Code of runSCENIC_4_aucell_binarize()"
subtitle: Workflow run by runSCENIC_4_aucell_binarize()
output:
BiocStyle::html_document:
number_sections: no
toc: yes
toc_float: false
css: corrected.css
html_notebook:
toc: yes
pdf_document:
toc: yes
package: '`r pkg_ver("SCENIC")`'
vig... |
0a5d665d7cea15ee81e7806b87aa29d71f1d1de2ea555d02078fb72a1eb4a7ff | R | 7,037 | 208 | ridge.proj <- function(x, y,
family = "gaussian",
standardize = TRUE,
lambda = 1,
betainit = "cv lasso",
sigma = NULL,
suppress.grouptesting = FALSE,
multiplec... |
36d7b692aa667072efd5f8b204aec3ef8df571efcae4fed04d3ecceeaf04a7bf | R | 7,037 | 201 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# Plot connectivity data with dn taxonomy
######... |
f4128c051dc7dad0c338583e4f4b42dcd47a4cbbb2e7239493cae67f53e17a9a | R | 7,038 | 146 | ## ============================================================================
## Sloan Neutral Community Model (NCM)
##
## Fits the Sloan et al. (2006) neutral community model to a feature table and
## classifies each feature as "above", "neutral", or "below" the 95% prediction
## envelope based on its observed occur... |
8633d8e146a2865494e8d20e0639dd000f25f7cd75783cbbaeac2a3f62204798 | R | 7,043 | 163 | #' banc-alignment-fix-seeds — Regenerate whole-brain alignment seeds in place.
#'
#' One-shot fixer: rebuilds `banc_brain_<side>_seeds.csv` from the existing
#' meta + NBLAST CSVs using the corrected `anchor_super_classes` list
#' (adds compound forms like `sensory_ascending`). Avoids a full re-prep
#' cycle when only ... |
94c73eff1300147d7a5a6d9e557391c627bceea78e9b9c2990af71b94d3da641 | R | 7,052 | 146 | # IDENTIFICATION OF INDIVIDUAL GENE SIGNATURES via HIERARCHICAL CLUSTERING
# For Bhaduri lab default, execute script as:
## Rscript indvd.seurat_hierarchical.clustering_cluster.markers.R [filename of individual Seurat object, saved as rds file]
# Else execute script as:
## Rscript indvd.seurat_hierarchical.clusterin... |
1de7b03523b8c24ee9b12a512aebd4c96d95d9bdd35361e1238092fb8e0ca922 | R | 7,064 | 164 | ---
title: "GENI plots"
author: "James R Staley & Wes Spiller"
package: geni.plots (version `r packageVersion('geni.plots')`)
output:
html_document:
theme: cosmo
toc: yes
toc_float: yes
toc_depth: 2
vignette: >
%\VignetteIndexEntry{geni.plots}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteE... |
c2fe40b92fb38da6263a29a43dc049385644b06b8708fafa0584cfe8e75e0784 | R | 7,064 | 292 | ---
title: "Create Miami Plot comparing Aging vs AD significant probes"
subtitle: "We correlate probes and genes on opposite strands"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: bree... |
2dec5d0710030206dbbf1c065d451af23ed5f6110744e75a0951edc21558a228 | R | 7,065 | 174 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# Kostic, Aleksandar D., et al. "The dynamics of the human
# infant gut microbiome in development and in progression toward
# type 1 diabetes." Cell host & microbe 17.2 (2015): 260-273.
#
# T... |
bfd0213b6a05ed95b59fd381a7f05df86dec3230bd94737d9c2cad7b331bd30d | R | 7,071 | 161 | library(ggplot2)
rm(list=ls())
options(digits = 4) # by default, print results to four decimal digits
set.seed(1823) #for replication - the year Trinity College was founded!
#replace the empty quotes with the file path to the location where you downloaded the files from Zenodo below
path = ''
mode = "BS"
screenCM ... |
9d967ef12771c7b7f8d58c93c73fb36d36e0d234bd0b5f160a16bd07c75d7403 | R | 7,073 | 181 | #' Convert a SCE object to a SPE one
#'
#' This function converts a spot-level
#' [SingleCellExperiment-class][SingleCellExperiment::SingleCellExperiment-class]
#' (SCE) object as generated by `fetch_data()` to a
#' [SpatialExperiment-class][SpatialExperiment::SpatialExperiment-class] (SPE)
#' object.
#'
#' Note that t... |
e59606d388ae0e185aa35d771b1b0c9594f2459c4a5cefcf503870fc3e682c98 | R | 7,076 | 155 | #!/usr/bin/env Rscript
################################################
################################################
## LOAD LIBRARIES ##
################################################
################################################
library(optparse)
library(ggplot2)
library(reshape... |
0fa8e669f6536cba7710c46c9dec3c6cbc77cdbdcc7471f4e42b1aa78788b090 | R | 7,081 | 158 | library("ggplot2")
library(gplots)
library("grid")
library("tools") #For compactPDF in R 2.13+
library(gsalib)
if ( interactive() ) {
args <- c("NA12878.6.1.dedup.realign.recal.bqsr.grp.csv", "NA12878.6.1.dedup.realign.recal.bqsr.grp", NA)
} else {
args <- commandArgs(TRUE)
}
data <- read.csv(args[1], stringsA... |
8a01cac9e28f101aac3c016ad081af895410eedc6156afcc65e44b3acb930c9c | R | 7,094 | 139 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
e19ad4eb2f1c5bca6c104f84e2bf712a668b33fa4db9624eea3120d7623fc982 | R | 7,095 | 193 | # ==============================================================================
# Load Structural Variation (SV) Data from Bionano Optical Genome Mapping
# ==============================================================================
# This script loads and prepares structural variation data including:
# - Bionano ... |
7cdd545e8c777dfc5e5dfa153e7a0d8b04771f418a8bda595075051dc0eff145 | R | 7,098 | 148 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
0135a015950547654eb6ea7bec4773a07354b5694bf2f05546a75ceb5b243301 | R | 7,102 | 186 |
## Figure S1 ####
tell_user('done.\nCreating Figure S1...')
resx=300
png('display_items/figure-s1.png',width=6.5*resx,height=3.0*resx,res=resx)
layout_matrix = matrix(1:3, nrow=1, byrow=T)
layout(layout_matrix)
panel = 1
par(mar = c(3,3,3,2))
### A effect of tube size ####
rbind_files('data/','18[56]_summary.tsv')... |
47431332e8adb38e6db9bcfc7af577d1b70153727895439af8c78b5e7a26c050 | R | 7,103 | 172 | # ======================= Oligodendrocytes: normalize-if-needed + DEG (step-logged) =======================
suppressPackageStartupMessages({
library(Seurat)
library(dplyr)
library(tibble)
library(Matrix)
})
# ---------- PATHS (EDIT IF NEEDED) ----------
BASE <- "/home/cxy605/Synapse/ROSMAP_scRNAseq/Oligodendro... |
651bc760f4110375ef128ea98068806de7ef7d47748d218b49c863c4c7adf136 | R | 7,103 | 209 | here::i_am("scripts/3.brain_dataset/3.1.data_preparation/3.1.2.filtering.R")
library(tidyverse)
library(Matrix)
library(SingleCellExperiment)
library(scran)
library(foreach)
library(doParallel)
library(SummarizedExperiment)
library(here)
wd <- here("data/brain_dataset/processed_data/")
dir.create(here(wd, "figures"))... |
46d06cf8db82858cd14c96d05ce008d6373c81c6427f6a5fc6c48a75adcc092c | R | 7,114 | 238 | context("test CRANE")
test_that("craneBipartite() returns edge list from adjacency matrix", {
set.seed(42)
A <- matrix(runif(12), nrow = 3, ncol = 4,
dimnames = list(paste0("TF", 1:3), paste0("G", 1:4)))
result <- craneBipartite(A, alpha = 0.1)
expect_true(is.data.frame(result))
expect_equal(... |
76e864afebebb8d7e8bd86d4a2e4d4bf6f78d008c3722d9c135b88ebf0d2bd9c | R | 7,118 | 148 | #' Load data from a 10x Genomics Visium experiment and make it spatialLIBD-ready
#'
#' This function expands [SpatialExperiment::read10xVisium()] to include
#' analysis results from SpaceRanger by 10x Genomics as well as add information
#' needed by `run_app()` to visualize the data with the `spatialLIBD` shiny
#' web ... |
86b40fbf23ef9de11cd63b52f65b316ba86892f39cba8b54f899fe732df5fe55 | R | 7,118 | 230 | calculate_residuals = function(par, data, dt=0.01) {
lambda = par[['lambda']]
t = seq(0,max(data$day),dt)
R = interpolate_rna(data$day, data$rna, t)
P_pred = Pt(R, t, lambda)[match(data$day, t)]
residuals = data$protein - P_pred
return (residuals)
}
calculate_residuals_mixture = function(par, data, dt=0.01... |
bacda3435dfdc5761e8fc78d4536234ca414946202a4e8030805a467dc5367d7 | R | 7,126 | 209 | ################################################################################
# Bootstrap Consensus Analysis for snRNA-seq DEG Detection
# Purpose: Validate differential expression through iterative subsampling
# Author: Yan Li
# Associated with: Li et al., Science Advances (2026)
###################################... |
0191c50ea2ec109f53d2d2b3ad471e1600f2731a81a424b340d1c9b4380d5060 | R | 7,128 | 143 | suppressPackageStartupMessages({
library(tidyr)
library(dplyr)
library(plyr)
library(data.table)
})
args <- commandArgs(trailingOnly=TRUE)
test <- args[1]
chr_num <- args[2]
chroms <- data.frame(
chr=c("NC_014690.1", "NC_055980.1", "NC_055979.1", "NC_055978.1", "NC_055977.1", "NC_055976.1", "NC_055975.1", "... |
6d13262a275e095acdf9759e7092d5d54a5c33598219923e65447ee9438edec6 | R | 7,128 | 193 | #' @export
as.neuron.navis.core.skeleton.TreeNeuron <- function(x, ...) {
tf=tempfile(fileext = '.swc')
on.exit(unlink(tf))
x$to_swc(tf)
n=nat::read.neuron(tf)
n$units=as.character(x$units$units)
n
}
#' @export
as.neuronlist.navis.core.base.BaseNeuron <- function(l, ...) {
nl=neuronlist(navis2nat_neuron(... |
4fde72c17258e97efa7164b340fad55b1cf3b0a055694365c9de4e4dfee9626b | R | 7,131 | 197 | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("argparse"))
# create parser object
parser <- ArgumentParser()
# specify our desired options
# by default ArgumentParser will add an help option
parser$add_argument("-i", "--input", required=TRUE, help="load norm matrix")
parser$add_argument("-m", "--meta... |
f1dd5c6d2a92998bd9abbb1b657bc2fe9e780d9537922f102c6fac4aca2942ed | R | 7,144 | 188 | #####################################################################
# Brain Tissue Gene Expression Prediction Training Pipeline
#####################################################################
# Required packages
required_packages = c(
"data.table", "dplyr", "glmnet", "parallel",
"limma"
)
# Inst... |
d26567672e8bfa4147e2238fdafa2d807dd31f170cf5370d828621bf2e166b10 | R | 7,146 | 223 | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("argparse"))
# create parser object
parser <- ArgumentParser()
# specify our desired options
# by default ArgumentParser will add an help option
parser$add_argument("-i", "--input", required=TRUE, help="load clustered RData")
parser$add_argument("-p", "--... |
2aab298f32f3677176d2d523ee8076400507092bb026ce46cf95fb727b512c5e | R | 7,159 | 161 | SYS_LIBPATHS <- .libPaths()
Sys.setenv(RENV_CONFIG_SANDBOX_ENABLED = "FALSE")
options(repos = c(CRAN = "https://cloud.r-project.org"))
get_script_path <- function() {
cmd <- commandArgs(trailingOnly = FALSE)
file_arg <- grep("^--file=", cmd, value = TRUE)
if (length(file_arg) > 0) {
return(normalizePath(sub... |
41b0ac9cb749ecf37dc2e1a7b7efc3125c89c0d49d8994b6a8fc53e7c1d587a0 | R | 7,166 | 237 | library(SeuratData)
library(Seurat)
library(scTrends)
AvailableData()
data("pbmcMultiome")
data("pbmc3k", package = "SeuratData")
pbmc3k=UpdateSeuratObject(pbmc3k)
table(pbmc3k$seurat_annotations)
SeuratData::InstallData("pbmcMultiome")
PBMC=pbmc.rna
table(PBMC$seurat_annotations)
DimPlot(PBMC)
PBMC <- Find... |
50183ea9801cb54e27ac07148a8c1d094534dd039fd29b840c199abf1dff6ef0 | R | 7,166 | 208 | #' Bar plot of cluster statistics for cells inside boundaries or ring regions
#'
#' Creates a bar plot to visualize the distribution of cells inside
#' spatial regions (e.g., boundaries or rings),
#' either as raw counts or proportions per cluster.
#' The plot is faceted by `region_id` to show statistics across
#' mult... |
1c705956cba15c47aa7bcb881f7e873a0deab0ee25cdfc5880694ee8aa40142e | R | 7,167 | 106 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/e079cac4-6f67-45cd-b316-43004917f70c ####
##... |
6d945f5cfea816dabc6f641dd32b6be78998a4ae811e26aa3da68869a2a06ff5 | R | 7,168 | 232 | ---
title: "01 — Basak snRNA-seq: Loading, QC, Integration, and Annotation"
---
This script processes the four Basak snRNA-seq Chromium runs (LC001A, LC001B,
LC002A, LC002B). It produces the annotated, QC-passed Seurat object used in all
downstream analyses.
Output: `output/01_basak/basak_snRNA_seurat.rds` (2,071 nuc... |
ec71a43c63a08e1e9ca93aa5f2614d2441382d6671e9f5d86d23d8a5fd015ac3 | R | 7,173 | 110 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/b8d3ea22-00df-4645-b40b-298cbf862363 ####
##... |
4c751cf02abef500be06731c2797056efb0ac0965cd44332c3747058aa0ab105 | R | 7,181 | 162 | here::i_am("scripts/4.paper_figures_and_tables/figure4.R")
library(tidyverse)
library(SingleCellExperiment)
library(DescTools)
library(foreach)
library(ggsignif)
library(ggrepel)
library(patchwork)
library(ggh4x)
library(ggbeeswarm)
library(RColorBrewer)
library(cowplot)
library(here)
fig_dir <- here("data/paper_figu... |
84e12505ba9fdd4f682ef77be7bab6a60d490ac780d70e4088ce2f65ed0e5747 | R | 7,181 | 111 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/79a080ef-3dfb-45e4-88d0-c9f1274d9b9c ####
##... |
101ac8e1823cee8761eeceb4ec955f984a26c9f84be93dbd2e75fe0fcd1e4f0d | R | 7,185 | 301 | ---
title: "Read in data, get detection P scores, filter out unwanted probes, and convert to beta values"
author:
- David lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: pygments
theme: lumen
toc: true
number... |
3d63ba3a132b94b3575f4c22a9ea49183220ac7622e8567674ff5dec007ecb33 | R | 7,185 | 185 | #analysis code is in exploratory/examine_MERFISH_calls_for_recips
library(SingleCellExperiment)
library(zellkonverter)
library(parallel)
#remotes::install_github("AllenInstitute/scrattch.bigcat")
library(scrattch.bigcat)
library(MetaMarkers)
library(magrittr)
library(dplyr)
library(here)
library(readr)
library(conflict... |
6bf86d948ba55d9582888b9cb9f8078e700ffba524b2c8483f164a02f30d477d | R | 7,185 | 148 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
012ce0cef5e53b6d5e7431713d7b8eac914f8b36c6d3fd02d29cc52036583226 | R | 7,188 | 176 | ---
title: 'BHR Example: Burden Heritability in the BipEx dataset'
output:
html_document: default
pdf_document: default
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
```
## Description
This file contains the code to run a BHR analysis of bipolar disorder, from publicly ava... |
77aed8ecafdb42ff31148c0926d665c21f2ec78f7b9cb4dc0b540522a3b3d0ad | R | 7,189 | 166 | #############################################
##gene_expression_CUT_OFF & save as h5ad#####
#############################################
library(semla)
library(dbscan)
library(ggplot2)
library(patchwork)
library(RColorBrewer)
#####read in processed RCTD rds file#########
#############################################
#... |
3f62db121a20d4e1cbff32163aa3905a73b6787eafd29d89931d572fed590602 | R | 7,199 | 143 | ##### Relabelling the unlabelled Tanycytes that carried over from Hypomap #####
#Creating module scores from the markers that were obtained from Fig 1E. of Tany-seq paper.
alpha1 <- list(c("Mafb","Necab2","Gadd45g","Stmn1","Mef2c","Ramp1","Pgnmc1","Cryab","Tgfb2"))
alpha2 <- list(c("Pdzph1","Fabp5","Cpe","S100a6... |
414ceb6fc45acfc3ceeb0ea1de8d7ee3791d348465e509e2fd4fdfc99b657bb1 | R | 7,199 | 245 | TestAllRegions_noInfo <- function(predictors_char,
covariates_char = NULL,
pheno_df,
summarizedRegions_df,
cores = 1){
parallel <- FALSE
if (cores > 1){
if (cores > parallel... |
41bec80ce480aa52b162964176c81159ef7fbd3db7cd0007168caa3edefbd49d | R | 7,201 | 148 | # MODEL FITTING: whole-brain co-fluc amplitude DEPENDENT CHANGES IN regional co-fluctuation score.
library(dplyr)
library(R.matlab)
library(ggsegGlasser)
library(ggsegSchaefer)
library(ggseg)
library(ggplot2)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
library(scales)
libra... |
42e7d3a376d16fb2b0e15ff03eac8e567853dbfc729381537eca0012f3d8da13 | R | 7,204 | 301 | ---
title: "Plot correlation between brain and blood samples of key CpGs in LONDON Dataset"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
theme: lumen
toc: true
... |
73dbb79814c321ef51b30e14e990045e9c87a5fa2fcfc5f69dc62add7e7b0bab | R | 7,209 | 201 | #####################################################################
# INGENE Training Data Preparation Pipeline
#####################################################################
# This script prepares the input data for INGENE training by:
# 1. Loading and processing imputed expression data from different sou... |
8d930d10a0ffafea1c25f8fa69d7ba6fabba5704ccae4582f8dae25fde50f3ed | R | 7,215 | 235 | ---
title: "Metabolomics Analysis"
output:
html_document:
df_print: paged
---
# Libraries
```{r}
library(tidyr)
library(dplyr)
library(readxl)
library(vroom)
library("Rgraphviz")
library(pca3d)
library(openxlsx)
```
# Read metabolomics data and metadata
```{r}
metabolomics<-read.csv("iPSC_... |
2b1b9d0140fdfba4cd770f197eaa72433869254a262147bb44d2aab979c3670f | R | 7,243 | 171 | ## Side chain analysis across 2 in vitro studies
## Remove LPC-O and LPE-O with 1 or 2 double bonds, as well as LPC-P and LPE-P with 0 or 1 double bond due to annotation ambiguity.
## Need to run the following 2 scripts first
### 'Fig4.KO_SideChain_responsive_to_Mboat2_manipulation.R'
### 'Fig4.OE_SideChain_responsive_... |
15981485a9dc4b0d6c3324ede3b99067ef93ec5eb40859e5a5d54fe645505429 | R | 7,251 | 197 | #!/usr/bin/Rscript
args <- commandArgs()
#print(args)
dir <- args[6]
Name <- args[7]
Cutoff <- as.integer(args[8])
libtype <- args[9]
Namehg <- paste(Name, "hg19", sep=".")
Namemm <- paste(Name, "mm10", sep=".")
File1 <- paste(Namehg, ".unfiltered.counts.csv", sep="")
File2 <- paste(Namehg, ".filtered.counts.csv", ... |
95ffce36b9d26e301d4578375c85c13fd7f28e7ee12c4ad50c144cd9ac1d0137 | R | 7,251 | 211 | ---
title: "Fig_S4S_HallmarkEMT_pval_by_malig_state"
output: html_document
date: "2026-02-17"
---
---
title: "malig_DEG_findmarkers_GSEA_by_malig_states.rmd"
output: html_document
date: "2026-01-15"
---
```{r}
library(clusterProfiler)
library(enrichplot)
library(Seurat)
library(tidyr)
library(dplyr)
library(tibble)... |
fdb0cd7eda0ae6e7d375326fe2c82c3ee22ed7850f03c328c46b9b54d5bd4b89 | R | 7,255 | 155 |
## ---------------------------
##
## Script name:
##
## Purpose of script: filter low quality cells and generate report graph and statistics
##
## Author: Yuanzhen Zhu
##
## Date Created: 2020-11-11, Data Modified: 2021-06-01, 2025-06-30
##
## Version: V2.0
##
## ---------------------------
##
## Notes: This script ... |
e76bbab719236017063b421b452a17f7f6a992a89024bd8e7c0cc89b5c8fecc2 | R | 7,268 | 225 | #' Compute spatial weights based on distance to the centroid
#'
#' Computes spatial weights for a set of cells based on their Euclidean distance
#' to the centroid of the selected group of cells. This is useful for modeling
#' gradient-like spatial expression centered around a cluster or region.
#' Supports multiple de... |
04a4240a7424178645c55d55424f7e0e7293440a3dbaabb70bc8089a52e7bd84 | R | 7,273 | 220 | #!/usr/bin/env Rscript
#-------------------------------------------------
# Title: edgeR
# Author: Amanda Zacharias
# Date: 2023-08-08
# Email: 16amz1@queensu.ca
#-------------------------------------------------
# Notes -------------------------------------------
# module load nixpkgs/16.09 gcc/7.3.0 r/3.6.0
#
#
#
# O... |
7b051e4644df8beaf35d0a6fbdb66d16c9eac81b281457d50ce05d0d1e619fba | R | 7,295 | 187 | # ==============================================================================
# Script 15: Figure 3A - ICLE Genomic Instability Metrics and SV Overview
# ==============================================================================
# Description: Generates Fig 3A left (genomic instability metrics heatmap) and
# ... |
35379c4d2b00a6f58dc886a4a94543fbfc07ced2f37ba377787eed28fec4c846 | R | 7,297 | 225 | ---
title: "qPCR_analysis"
author: "Thomas Boutet"
date: "11/3/2025"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
# Load required libraries
library(ggplot2)
library(reshape2)
library(scales)
library(dplyr)
library(tidyr)
library(ggsignif)
# Analysis gene expres... |
38c90ab3ee3c4dc8172c6e331cdaf2eee10ca00545bca973496aca49be9ca2de | R | 7,301 | 424 | # Reproducible workflow for spatial autocorrelation,
# Integrated model ranking and selection of the optimal predictive framework
# --------------------------------------------------
# 1. Required Packages
# --------------------------------------------------
packages <- c(
"dplyr",
"readr",
"tidyr",
... |
d0454d5c9ff7cf8c95a0825872f5efc26c5207c29fc3c661349b9618cd4e9074 | R | 7,302 | 179 | library(gridExtra)
# wd <- '/net/mraid20/export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
source(file.path(wd, 'scripts/util.r'))
load(file = './output/sequence_modeling/fig_s6_data.rda')
dir.create('./output/paper_figs/FigS6/')
device <- 'pdf'
fig_s6a_path <- file.path(wd, glue::glue('... |
006db7413507e0c9e9d2561636b8624276106e5a94831409f973f74766650adb | R | 7,312 | 170 | library(ggplot2)
library(ggforce)
rm(list=ls())
options(digits = 4) # by default, print results to four decimal digits
set.seed(1823) #for replication - the year Trinity College was founded!
#replace the empty quotes with the file path to the location where you downloaded the files from Zenodo below
path = ''
scree... |
526be9a816fcff06f545fdde19e0fdd7adc40279dd32d97a82beeaa5bf448757 | R | 7,318 | 172 | library(ggplot2)
library(ggforce)
rm(list=ls())
options(digits = 4) # by default, print results to four decimal digits
set.seed(1823) #for replication - the year Trinity College was founded!
mode = "BS"
#replace the empty quotes with the file path to the location where you downloaded the files from Zenodo below
pat... |
fdc48ab4adf89ac64cb3c5e398e2967ef88d1de9c16c60e63fdd1d3363447259 | R | 7,318 | 210 | #' Bar plot of cluster statistics for cells inside boundaries or ring regions
#'
#' Creates a bar plot to visualize the distribution of cells inside
#' spatial regions (e.g., boundaries or rings),
#' either as raw counts or proportions per cluster.
#' The plot is faceted by `region_id` to show statistics across
#' mult... |
2b07e9e3bb5adab7379dbae6fb35ff9734c47f02c586d8348a0fd9630c6d28b7 | R | 7,324 | 180 | ##################################
# Plot the assigned malignant state abundance across different conditions in PDGFRAi experiments
# Author: Kevin Johnson
##################################
library(tidyverse)
library(ggpubr)
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir <- file.path(proj_di... |
f7abd8bb4c9a76ba348320f5f39a84ba109472e12821d8bd55f218b494b79a62 | R | 7,325 | 233 | library(ggplot2)
library(tidyr)
library(dplyr)
library(stringr)
library(readxl)
library(reshape2)
library(tidyverse)
##############################
# Cross-sectional BOLD; ALFF; fALFF
##############################
# Read the long format data
# Read the statistics file
# BOLD
setwd("")
data_long <- read.csv("dataBOLD... |
fe8d914de5b5497c71a31aa13820deb7363264a7044a484db3ce10df871e4a6c | R | 7,325 | 253 | ---
title: "Mesh to mesh distances"
---
## Note
This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code.
Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Cmd+... |
89fe4aae0b47b21241b54bfd0f44d292325e0344876f095f352e680cfdfe20ba | R | 7,329 | 177 | library(data.table)
library(openxlsx)
#preprocess data for antibodies, both Starr and ours, aggregate duplicates, get heavy chains, etc.
antibody_preprocess = function(){
#first Starr data
indf = as.data.frame(fread("Datasets/SARS-CoV-2-RBD_MAP_Crowe_antibodies/results/escape_scores/scores.csv"))
starrdf =... |
eed581d74ced10388345567f10596b3edc3bc18da005aa5f5b9415082f0a5466 | R | 7,329 | 207 | library(Seurat)
library(Matrix)
library(DESeq2)
setwd("/home/joonho345/1_Epilepsy_RNA/scRNA_Human/")
#########################################################
#### Load Seurat Object (Deconv) ####
integration_name <- "GSE160189_186538_Integration"
seurat_rds <- "/data/project/1_Epilepsy_RNA/scRNA_Human/Deconv_objects... |
d8c783ebd037dc88823f03c37e6dc375281472d05d48bdedf6db802ea2ba114a | R | 7,339 | 162 | ---
title: "Neuron_neurotransmitters"
output: html_document
date: "2025-07-30"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(ggplot2)
library(dplyr)
library(Seurat)
library(scCustomize)
```
# Load dataset and level Samples
```{r}
neural <- LoadSeuratRds(file = "neural_final.rd... |
2057053882779d76179f55ec0941d54b8a4e0fdcb1b7787e34909965e0e877a8 | R | 7,345 | 109 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/edbf75de-5f56-4c37-b855-d6e3f91160f6 ####
##... |
0296026860a2816417f6bd8a17b4f13b47204be29ac6f3cd23138ebc09819e45 | R | 7,346 | 173 | #' banc-aggregate-influence — Aggregate the all-to-all influence by sensory and effector sub-class.
#'
#' Reads the sharded parquet chunks from `banc-build-influence.R` and
#' produces two aggregated parquets: (1) sensory sub_class → all neurons,
#' (2) all neurons → effector sub_class. Then pushes both to GCS.
#'
#' @... |
cbfc39c85aab61055d5f5db29c1bb499dce955dcee6727bea67e5386617a6b6c | R | 7,349 | 149 | library(readxl)
library(tidyr)
library(MetaNeighbor)
library(reshape2)
library(magrittr)
library(dplyr)
library(here)
library(readr)
library(tibble)
library(conflicted)
conflicts_prefer(base::setdiff)
conflicts_prefer(base::intersect)
conflicts_prefer(dplyr::filter)
conflicts_prefer(dplyr::rename)
conflicts_prefer(dply... |
c7b009f1929099b372f5a5b78757d1f0119fc88a220e216b045ec2e0835e6b1b | R | 7,350 | 330 | ---
title: "Read in DNA methylation data, and pre-filter to normal, prefrontal data"
subtitle: "Read and pre-filter ROSMAP data"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedar... |
48b026445c9ab6bef85d404a5ff97877e93f27293d0aa56db37eaed2611c982e | R | 7,357 | 200 | library(dplyr)
library(readr)
library(janitor)
library(ggplot2)
library(future.apply)
bootstrap_analysis_vectorized <- function(
csv_file,
param,
test_groups = NULL,
classification_filter = NULL,
reference_group,
n_boot = 10000,
y_min,
y_max,
file_base = NULL
) {
# Load and f... |
e5f9e0477ce95012e6d0387b4d197b9f0ccfdf2d41006d364e3e6f3f9a0930d1 | R | 7,359 | 250 | # ===============================================================
# Circos plot: AD GWAS + methylation tracks
# Paths set to your CHCHD10/GWAS folders
# ===============================================================
suppressPackageStartupMessages({
library(BioCircos)
library(RColorBrewer)
library(dplyr)... |
c5d365b06694a28286eda4e912d80db019ed2766d59f740bd1b1e33f27c8f443 | R | 7,360 | 215 | ---
title: "Cell Type Distance Plots"
output: html_notebook
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
```{r, message=FALSE, warning=FALSE}
library(pagoda2)
library(conos)
library(parallel)
library(ggplot2)
library(pbapply)
library(tibble)
library(dplyr)
library(ggrastr)
library(cowplot)
library(readr)
devtools:... |
87f25d64de456627854ea9df07ea5ddfccb4e604f0da9ce159977a1509b18bab | R | 7,363 | 175 | #' update-seatable (optic-lobe preset) — Push optic-lobe alignment predictions to SeaTable.
#'
#' Loaded by `alignment/banc-alignment-update-seatable.R --region optic-lobe`.
#' Uploads connectivity-alignment predictions joining on `root_888`. Writes
#' only to the `fafb_alignment_*` / `fafb_ntac_*` column family.
#'
#'... |
35e9a19b335b3021bcafcb2d4b04ca399d4618752e0035b30289a9b198bd2cae | R | 7,366 | 189 | #' @importFrom graphics par
#' @importFrom grDevices adjustcolor colorRampPalette dev.size rainbow
#' @importFrom igraph E induced.subgraph membership V walktrap.community
#' @import Matrix
#' @import parallel
#' @import sccore
#' @importFrom stats as.dendrogram as.dist as.hclust cor dendrapply dnorm hclust is.leaf med... |
3280c77adcb6eea9c5160d19096a1c3f8e89010cb6e91aca43a43585da25eac0 | R | 7,376 | 230 | ---
title: "Fig7"
output: html_document
date: "2026-01-15"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Commented packages are only needed when setting up the initial cellchat objects
```{r}
library(CellChat)
library(patchwork)
library(Seurat)
library(readr)
library(annotate)
library(org.Mm.... |
6046efe801b13498209654dcbc5ee0a4475c65b4050961d244effaf496328b0a | R | 7,379 | 173 | ---
title: "Naive DRG workflow"
author: "Amanda Zacharias and Christina Meier"
date: "`r Sys.Date()`"
output:
html_document:
theme: readable
highlight: default
toc: true
toc_float: true
toc_depth: 3
md_document:
variant: gfm
toc: true
toc_depth: 3
---
```{r echo = FALSE}
library(kn... |
91552a6a9214626d2e5b7f29d118d517b4d30f9c36a3f0e61f47bec9f9f50239 | R | 7,383 | 185 | #!/usr/bin/env Rscript
# Load required packages
require(rcompanion)
require(broom)
require(dplyr)
require(mgsub)
require(purrr)
# Load configuration and utilities
source("config.R")
source("utils.R")
# Parse command line arguments
args <- commandArgs(trailingOnly = TRUE)
if (length(args) != 2) {
st... |
92675a2f863fe0c138a175ce0e86823cb2e3aad0bade9ef91fdf8973883dfe35 | R | 7,387 | 209 | ##########################################################################################
# Helper Functions for GenomicRanges
##########################################################################################
#' Filters unwanted seqlevels from a Genomic Ranges object or similar object
#'
#' This function all... |
a1b05618c41e043865ed9d0e5da4cf4a4ffb12b66d5205345c3e42cb1177e60b | R | 7,392 | 201 | #' Evaluate the enrichment for a list of gene sets
#'
#' Using the layer-level (group-level) data, this function evaluates whether
#' list of gene sets (Ensembl gene IDs) are enriched among the significant
#' genes (FDR < 0.1 by default) genes for a given model type result. Test the
#' alternative hypothesis that OR > ... |
84549683571a6d4e5ec6f9faf893fb7c8ba195cbe03bcf148bee1a9ddf5ce7d8 | R | 7,399 | 194 | library(ArchR)
library(parallel)
addArchRThreads(threads = 10)
addArchRGenome("hg38")
library(ComplexHeatmap)
library(ggsignif)
library("RColorBrewer")
add<-theme_set(theme_bw())+
theme(axis.title.x=element_text(size=10,face = "bold"),
axis.title.y=element_text(size=10,vjust = 2,hjust = 0.5,face = "bold"),
... |
523293d583ec09b99c6ac772e3c6d3277379183b447ab64232d12bcb4344a983 | R | 7,402 | 232 | ## This script is used to perform an eQTM mapping with known AD-CpGs. First,
## the CpGs and transcripts that have a selected distance to each other are
## determined. These are then used to calculate linear regressions. Correlation
## plots are also created.
#.libPaths(.libPaths()[grepl("rtrack_env", .libPaths())]... |
c1a6602be2b66014417adae5a0337190e57b33e23a7c0edaf0f061138132c78d | R | 7,413 | 155 | # Validation of random forest-based framework for estimating effective population size trends
rm(list=ls())
library(randomForest)
library(ggplot2)
library(scales)
library(reshape2)
library(cowplot)
set.seed(123)
target_division <- seq(0.5,35, length.out = 100)
# Initialize result storage
simulated_m... |
88a1dd1abc686472dcc51032c0163c5e9e71951ac71a2887d7b5aa0fe21ecdfb | R | 7,415 | 169 | #' Calculate adjusted influence scores
#'
#' Computes adjusted influence scores by taking the natural logarithm of steady-state
#' neural activity and adding a constant to bring values into the non-negative range.
#' The adjusted influence is defined as: adjusted_influence = log(r) + c, where r is
#' the steady-state r... |
978a3e057476ef90f33bd810cf8edcacde3b167ed9a701e0eab5bca7971160f5 | R | 7,418 | 174 | library(circlize)
library(RColorBrewer)
library(ComplexHeatmap)
library(khroma)
model <- read_rds("./input/best_model.rds")
betas <- read_rds("./input/inspire/epigenomics.rds")
probes_450k <- read_rds("./input/450K_probes.rds")
betas <- betas[intersect(rownames(betas),probes_450k),]
betas <- betas[model$gene[2:nrow(mo... |
3ff79d328e6e419194640e4c87b58855b6c9a2f6983652df00bd40e6ee210bd3 | R | 7,420 | 328 | ---
title: "Mediation-analysis"
output:
word_document: default
html_document: default
pdf_document: default
date: "2026-05-15"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Installation and loading script
install_and_load <- function() {
# List of packages
packages <- c(
"l... |
0397d7c62030d0fe2f39193b754d4d9c3efdd37bed71be7a8139e33a03e310b7 | R | 7,422 | 252 | # nocov start
#' Serve an RFunc MLflow Model
#'
#' Serves an RFunc MLflow model as a local REST API server. This interface provides similar
#' functionality to ``mlflow models serve`` cli command, however, it can only be used to deploy
#' models that include RFunc flavor. The deployed server supports standard mlflow m... |
1ce03ec378c035a9953ac5f9e17f6bfbbfa8e630bcb6050f3ce5bbe7c7e4ac9e | R | 7,425 | 234 | ---
title: "E20_Script6_Manual_Annotation"
output: html_document
date: "2025-04-01"
---
```{r}
# for presto:
#devtools::install_github("immunogenomics/presto")
```
```{r}
library(Seurat)
library(readr)
library(tibble)
library(dplyr)
library(viridis)
library(presto) # used to greatly improve FindAllMarkers efficiency... |
6a287ab0e4b63d0bdafde2837f32dd4b1c6ccbdb6e6e52560298705960b8afc7 | R | 7,430 | 184 | #' banc-cluster-cns-network-heatmap — Cross-tabulate new spectral clusters vs old cns_network.
#'
#' Cross-tabulates each NEW `spectral_cluster` from the latest spectral
#' clustering CSV against the OLD `cns_network` labels snapshotted from
#' SeaTable. Emits two heatmaps per source (counts + row-normalised) and
#' sa... |
c6579025dca5f9a1d8ffaedcdd4e8e5ac7b54a353114826ce3ede796f2156a45 | R | 7,440 | 200 | library(dplyr)
library(ggplot2)
library(purrr)
library(readr)
library(tidyr)
in_dir <- "/Users/corcorri/Documents/Denver/Manuscript/popgen_stats"
out_dir <- "/Users/corcorri/Documents/Denver/Manuscript/r_figures/"
bootstrap_all <- data.table("lake"=c("Bride", "Amos", "Long", "Quon", "Pat"),
... |
3647e5e08afcfce8747c3f050ab1a09036e95d788e8950499d875aa0c8f4a29c | R | 7,445 | 171 | test_that("flywire connectome data dumps work", {
fcddir <- file.path(system.file('tests/testthat/testdata/fcd', package = 'fafbseg'))
op <- options(fafbseg.flywire_connectome_dir=fcddir)
on.exit(options(op))
fcd=try(flywire_connectome_data('syn', version=447), silent = TRUE)
skip_if(inherits(fcd, 'try-error... |
d276cfd3c8287acc6d570296208e1e81b9a5ebb0d7be9a7075ccb48c3ca2ce66 | R | 7,445 | 220 | ############ Calculate difference in frobenius norms between all combos of networks for each subject ####################
############ Calculate weighted portrait divergence between all combinations of networks for each subject ###############
# Import portrait divergence functions from github: https://github.com/bagro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.