sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
ced8e125384ca6fc8386a6c06fafcaea4ec70cd2897e26b4a1372ed675a90954 | R | 4,001 | 99 | # brain-maintenance-lgcm: trivariate latent growth curve model and brain
# maintenance index, companion code for Menze et al. (2026).
#
# Copyright (C) 2026 The authors of Menze et al. (2026).
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License... |
e063383d0cd0899a463f4fc77273803bb218cfe70604a326c33e014bb16d4856 | R | 4,005 | 99 | data("umify_data", envir=environment())
#' Quantile normalization of cell-level data to match typical UMI count data
#'
#' @param counts A matrix of class dgCMatrix with genes as rows and columns as cells
#'
#' @return A UMI-fied count matrix
#'
#' @section Details:
#' sctransform::vst operates under the assumption... |
3940f02810a7b740e04543887d913c923d5fd50f6a62280687e1708887139c38 | R | 4,019 | 107 | #!/usr/bin/env Rscript
suppressPackageStartupMessages({
library(limma)
})
args <- commandArgs(trailingOnly = TRUE)
if (length(args) < 3) {
stop("Usage: Rscript run_expression_subgroup_limma.R <meta_csv> <matrix_csv> <out_dir> [precorrected]")
}
meta_path <- args[[1]]
matrix_path <- args[[2]]
out_dir <- args[[3]]... |
e3a42d66b5b9ef71df1e927d5e273a2d6e106e37c6fa533c7b421ebbafc693f2 | R | 4,023 | 131 | rm(list = ls())
library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_theta.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
... |
34fd3d41a4f49e900037cb98021c0f89730f258f82590e22940dd70dd3ad9bf6 | R | 4,028 | 91 | #!/usr/bin/env Rscript
## 06_mcsea_promoter_analysis.R — generated from notebook spec
## Run: Rscript 06_mcsea_promoter_analysis.R
## ============================================================
## # 06 — mCSEA promoter + gene-body methylation enrichment
##
## Uses the `mCSEA` Bioconductor package on the combined ... |
2c6c5a0533a9f294afc43d897edc5a3e1ca466201a60f25c0bbcbd1c888887ce | R | 4,029 | 113 | ######################################
##### Filter Genes based on Chi2 #####
######################################
setwd("/mnt/lustre/working/lab_esked/damianWo/Chapter2/12_TWAS/T_SEM")
library(data.table)
library(dplyr)
library(tidyr)
## Combine Files ###
## Name directory and file pattern
directory_path <- "... |
e8a01216757ff72ef6766ce624e9b1c8a806a9812af02905c94eeabacd0c3707 | R | 4,053 | 97 | # ==========================================================================
# Script: 01_Cross_Species_Comparison_HFS_SHC.R
# Project: Wing Polyphenism in Hemipteran Insects
# Purpose: MetaNeighbor similarity, Harmony integration, and Top 50 Markers
# Species: Nilaparvata lugens (HFS) and Pyrrhocoris apterus (SHC)
# =... |
e2a5a90c5d4a47120c0e2680bc18ce008b1eb946ae366cfc1d316406c422ca17 | R | 4,067 | 169 | ---
title: "Four-stage antennal RNA-seq analysis Barish 2018"
output: html_notebook
---
```{r}
library(tidyverse)
library(magrittr)
library(readxl)
library(gplots)
library(RColorBrewer)
library(viridisLite)
```
```{r}
larval <- read_excel("larval.xls") %>% as.data.frame()
apf8 <- read_excel("8hrAPF.xls") %>% as.dat... |
5af92f286e09b1a44259fc3107d76be94332fac5bd4ba20a1895f781e91e6cf4 | R | 4,070 | 120 | library(rtracklayer)
library(dplyr)
library(readr)
library(ggplot2)
library(arrow)
peptide_mapping <- read_parquet("nextflow_results/orfanage/peptide_mapping.parquet")
classification <- read_parquet("nextflow_results/V47/final_classification.parquet")
expression <- read_parquet("nextflow_results/V47/final_expression.p... |
bf4817cebc97824a8e36ecd69efb1d454df4271058b7befab1811aff2cc86233 | R | 4,072 | 164 | ---
title: "Model Evaluation"
output: html_notebook
---
```{r}
library(tidyverse)
library(plotly)
perfMetrics <- read.csv(file = "PrLwinsConfMatrix.csv")
topVars <- read.csv(file = "PrLwinsOptVars.csv")
```
```{r}
hist(perfMetrics$Accuracy)
summary(perfMetrics$Accuracy)
```
```{r}
hist(perfMetrics$Balanced.Accuracy)... |
698bcf13953aac181a5a4b6622b8bb778b3273b9730d37299e8f7174454d8cf4 | R | 4,076 | 143 |
addGenes <-function(covstruc, Genes, GC="standard"){
time<-proc.time()
V_LD<-as.matrix(covstruc[[1]])
S_LD<-as.matrix(covstruc[[2]])
I_LD<-as.matrix(covstruc[[3]])
Genes<-data.frame(Genes)
beta_Gene<-Genes[,grep("beta.",fixed=TRUE,colnames(Genes))]
SE_Gene<-Genes[,grep("se.",fixed=TRUE,colnames(G... |
803969edc466407ce528e83e7360ae4eb35117071eadd6aee5597cbda91909d6 | R | 4,077 | 139 | ---
title: "R Notebook"
output: html_notebook
---
```{r}
library(ape)
library(ggtree)
library(tidyverse)
library(magrittr)
library(stringr)
```
```{r}
tree_beats <- read.tree("phylotree_all_beats.txt")
```
```{r, fig.height=20}
plot(tree_beats)
```
```{r}
tree_beats$tip.label
```
```{r}
str_extract(tree_beats$t... |
d402bf159a7017b3b09c36d114cd99df440cf66711af45437ba4971c0487ee52 | R | 4,084 | 89 | # Load libraries
library(Seurat)
library(ggplot2)
library(dplyr)
library(patchwork)
library(tidyr)
# Set working directory
setwd("/home/doyang/turbo/CLRN1 WT VS KO 10M SnRNAseq/")
# Load Seurat object
retina <- readRDS("CLRN1_Retina_with_DonorIDs.rds")
# Define HSP90 and chaperone genes
hsp90_genes <- c("HSP90AB1", ... |
5c1f3527b02a4e75bebe05062f27cbbef567ea139f298a3c02d12ac1ea353484 | R | 4,093 | 83 | library(peer)
library(qtl)
source("helpers.R")
unsupervised_plots <- function(n_factors=10, n_iterations=10, n_genes=200, load=FALSE){
cross = read.cross(format="csvs", dir="./data/", genotypes=c("0","1"), alleles=c("0","1"), genfile="brem_genotype.csv", phefile="brem_expr.csv", estimate.map=FALSE)
# First, le... |
42a2724f8fda465f4a3eabcd3d0e84ae1fbce480ef1941dcbdf1e14cde990b75 | R | 4,105 | 109 | #!/usr/bin/env Rscript
library(arrow)
library(dplyr)
library(GenomicFeatures)
library(GenomicAlignments)
library(rtracklayer)
library(readr)
args <- commandArgs(trailingOnly=TRUE)
#-----------------------------------Load Datasets-----------------------------------#
annotation_gtf <- args[1]
predicted_cds_gtf <- args[... |
ba867407b067ab0cb156fc0b527ae67802d1f82c58e6373a90d96ae6216bcd29 | R | 4,107 | 154 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Actin retrograde-flow velocity, extending vs retracting tips
## What this file does
Reads the per-neurite retrograde-flow velocity table produced upstream by
the kymograph-slope extractor (`edfig03q_actin_radial_flow_kymo.Rmd`) and
plots the paired extending v... |
fe2705ec135718f5e206d09fa8da8246fe0ca13bd1855f626b576fef51b106af | R | 4,109 | 96 | #!/usr/bin/env Rscript
## 08_cross_stratum_master.R — generated from notebook spec
## Run: Rscript 08_cross_stratum_master.R
## ============================================================
## # 08 — Cross-stratum master heatmap + cross-omics 7-gene panel
##
## Pulls per-stratum DE TSVs from notebooks 01–07 and bui... |
7e447a39253698ed2403753e8c6ef35453018a81cb58486367c70cc0b42d02eb | R | 4,115 | 107 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[set %in% c("test", "validation", "training")]
meta <- meta[dataset %in% "activity"]
meta <- meta[tissue %in% c("heart",... |
bb19c10571826e2aad1815fc700d2716404d8627495d94a7ce2047d392a5239b | R | 4,119 | 118 | ########################################################################
# Perform K-fold Cross Validation on a gene set using RWR to find the RWR rank of the left-out genes
# - Input: Pre-computed multiplex network and a geneset
# - Output: Table with the ranking of each gene in the gene set when left out, along with ... |
4512b76932985ae8ab6d9065f552fd34d8e50e4072b967908e0eaae431ce50e2 | R | 4,135 | 106 | suppressMessages(library(stringr))
suppressMessages(library(clusterProfiler))
suppressMessages(library(ggplot2))
suppressMessages(library(cowplot))
setwd('~/Desktop/project/Ciona_ST/')
result_dir <- 'result/result1/GO/'
ciona_gaf <- read.delim('result/GO_Cirobu_Aniseedv2019.gaf',skip = 1, quote = "")
ciona_gaf_list <... |
4b3b94a1a188a501b242d9030f59f42240bea183bbac8e4b993eca6ebe1aa4ab | R | 4,160 | 127 | library(arrow)
library(readr)
library(dplyr)
library(ggplot2)
colorVector <- c(
"FSM" = "#009E73",
"ISM" = "#0072B2",
"NIC" = "#D55E00",
"NNC" = "#E69F00"
)
structural_category_labels <- c(
"full-splice_match" = "FSM",
"incomplete-splice_match" = "ISM",
"novel_in_catalog" =... |
0c5092707aefbcb331f08c25db41d5c6b6db92b0e1cb634bc25ee6f43ee26abd | R | 4,180 | 94 | #!/usr/bin/env Rscript
## 05_combined_meth_dmp.R — generated from notebook spec
## Run: Rscript 05_combined_meth_dmp.R
## ============================================================
## # 05 — Combined cohort methylation DMP (all 549 samples, R/limma)
##
## Re-runs limma on the full combined Methylation_Data cohor... |
b9d064009df12b7ec283fba81fa848a9ab952a343ce0cb3b2be31cc31a297e64 | R | 4,199 | 95 | # =============================================================================
# 09_composition_moran.R
# Composition correction + spatial bivariate cross-correlation (Methods 4.11)
#
# (A) Analytical composition correction: tests whether bulk NPY/NPY1R down-
# regulation is explained by cell-type composition shif... |
8f8e7460374bf420e3d6678c68b9ac7bfc4633348e7afa54a4ebedb2459d26e0 | R | 4,213 | 103 | # Clear the entire workspace
rm(list = ls())
library(hBayesDM)
library(R.matlab)
dataPath="X:/Pan/Data/LiangYinLu/Code_revision/s1_ModelingQRPE/Example_for_a02/2c_behavior.txt"
mainDir = "X:/Pan/Data/LiangYinLu/Code_revision/s1_ModelingQRPE/Example_for_a02"
subDir = "RstanOutput"
dir.create(file.path(mainD... |
2afdafb9f724f8d65838406267b49e648a9f3870f78d3fca3d2b1e6b82520aff | R | 4,235 | 91 | # =============================================================================
# 08_tf_network.R
# Transcription-factor activity inference + co-expression network (Methods 4.10)
#
# Produces:
# Figure S9 - TF activity inference (VIPER / DoRothEA), 15 NPY-axis TFs
# NPY-panel co-expression network (Louvain communit... |
fe6bf17919b54daa41e3996eb832309d521cc02e3baefb5ec5fa9190dbc262e2 | R | 4,247 | 94 | #!/usr/bin/env Rscript
# Reviewer 3: is the methylation layer's MS-vs-HC signal sensitive to sex?
#
# Replicates the published AllMeth analysis exactly (run_all_methylation_combat.R): limma on the
# saved ComBat M-value matrix, gene level = best probe per gene by FDR. The ONLY difference between
# the two models compar... |
3647f17f4a156bba5f05469451919f8e32e86744d609b7dcb3a115a3e0fb8e10 | R | 4,289 | 123 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[set %in% c("test", "validation", "training")]
meta <- meta[dataset %in% "activity"]
meta <- meta[tissue %in% c("heart",... |
6096b5150862537213c93a00edcf49495753dcf7f3ea341a2eae5dd7ffdbffb8 | R | 4,299 | 111 | library(dplyr)
library(tidyr)
folder = "/home/fi5666wi/R/data/DDLS/A4/Assessments"
files = list.files(path = folder, pattern = "\\.csv$", full.names = TRUE)
for(file in files) {
df <- read.csv(file)
}
ptdemog <- read.csv(paste(folder, "A4_PTDEMOG_PRV2_17Dec2025.csv", sep="/"))
c3comp <- read.csv(paste(folder, "A4... |
806e209200451615de1ed1d5a26d359b933cfdef5c4c0c3aef4043582d3b9753 | R | 4,311 | 105 | #!/usr/bin/env Rscript
## 09_cross_assay_lxn.R — generated from notebook spec
## Run: Rscript 09_cross_assay_lxn.R
## ============================================================
## # 09 — Cross-assay summary: 7 cross-omics genes × N R-rerun assays
##
## Pulls per-gene log2FC + FDR for `LXN, SH3BP4, CHL1, CTSZ, RP... |
2a01bc84f463d945c670516f0921ef58160d54f59354255d6e8c38afbb6597f4 | R | 4,318 | 122 | ---
title: "Preprocessing script for Nestorowa 2017"
author: "Aditya Pratapa"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc: true
vignette: >
---
Load necesdsary libraries
```{r warning=FALSE,message=FALSE}
library(destiny)
library(slingshot)
library(plotly)
library(gam)
library(RColorBrewer)
```
... |
53dcd12a727ce435392cd66d369f3292f140259e111d2843b785fe8686626789 | R | 4,319 | 112 | ---
title: "Using sctransform in Seurat"
author: "Christoph Hafemeister & Rahul Satija"
date: '`r Sys.Date()`'
output:
html_document:
highlight: pygments
---
```{r setup, include = FALSE}
library('Matrix')
library('ggplot2')
library('reshape2')
library('sctransform')
library('knitr')
knit_hooks$set(optipng = ho... |
d61c0dedf0f45c05de0c6257680f25b40e4189e3e6583f915188378c7396adc9 | R | 4,355 | 189 | ---
title: "Introduction to RegRegSEA"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Introduction to RegRegSEA}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
eval = FALSE
)
```
# Introduc... |
37e5ab6e3e9a3a0b25b945605141662b21650acdbd17efd752cbac32fae9da89 | R | 4,357 | 150 | #!/usr/bin/env Rscript
# _ _
# | | | |
# ___ __ _ __ _ ___| |_ ___ ___ | |___
# / __/ _` |/ _` / __| __/ _ \ / _ \| / __|
# | (_| (_| | (_| \__ \ || (_) | (_) | \__ \
# \___\__,_|\__,_|___/\__\___/ \___/|_|___/
# A Convergent Amino Aci... |
4d1722de541982f85e9536824b10a43edb73a3c5107a1ba34ffe3b51887d9976 | R | 4,376 | 124 | ############################################################
# Visualization of Adjusted R² for Neurotransmitter Analysis
# Author: Yuan Zhang
# Date: 2025-07-25
#
# Description:
# This script generates horizontal barplots of adjusted R² values
# for the relationship between GMV CCA modes and neurotransmitter
# recep... |
1ceb1fa919ea140f9a69d3c3e2a7a7118b6544724664b50884e89722a0aba9dd | R | 4,385 | 144 | #!/usr/bin/env Rscript
#,------. ,---. ,---. ,--------. ,-----. ,---. ,---. ,---.
#| .---'/ O \ ' .-''--. .--'' .--./ / O \ / O \ ' .-'
#| `--,| .-. |`. `-. | | | | | .-. || .-. |`. `-.
#| |` | | | |.-' | | | ' '--'\| | | || | | |.-' |
#`--' `--' `--... |
dd0d818634e5511b9b9af9f3ea4bd73e3173a734a3978a5d1d5213bae6abaaf4 | R | 4,411 | 97 | # Shared helpers for the three-way (genotype x stimulus speed x stimulus frequency) ANOVA.
# Sourced by the per-measure driver scripts. run_three_way_anova() runs the full analysis
# for one dependent variable and writes summaries, ANOVAs, and pairwise comparisons to CSV.
library("magrittr")
library(tidyverse)
library... |
0401c85d66937f515bf1c1b37e5215d6d7cf300d68c8c6ff9d21b8ed4f46fe8e | R | 4,441 | 130 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Florian Heyl (@heylf); created code
# H_E.json and H_E.tiff not public. Request for access is still unanswered.
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(lib... |
2ec449ef7b279f6ad24983e981eb3ce4b942c588a42c63b9c3a59b8f877350fc | R | 4,442 | 150 | library(Gviz)
library(txdbmaker)
library(rtracklayer)
library(biomaRt)
library(tidyr)
library(ggtranscript)
library(ggplot2)
library(dplyr)
# Known track
GENCODE_GRList <- paste0(Sys.getenv("GENOMIC_DATA_DIR"), "/GENCODE/gencode.v47.annotation.gtf") %>%
makeTxDbFromGFF(format = "gtf") %>%
exonsBy(by = "tx", use.n... |
02d0f752b5727c26e5562b3f62fcabb59a331e6d11cf4619badb025651eb0851 | R | 4,450 | 165 | ---
title: "diff118_THeval"
output: html_document
date: "2025-07-29"
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# I. Load packackes
```{r}
library(devtools)
# Core data manipulation & visualization
library(tidyverse) # ggplot2, dplyr, purrr, readr, tibb... |
d2d8e3ad3d786129c42e3de91178cc1274e3a457e05e637114166510e1be3f90 | R | 4,501 | 107 | # brain-maintenance-lgcm: trivariate latent growth curve model and brain
# maintenance index, companion code for Menze et al. (2026).
#
# Copyright (C) 2026 The authors of Menze et al. (2026).
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License... |
e564f4195585ea8cc98418c902ad7b8602e2490707748cb69299ff8395ed35d0 | R | 4,501 | 175 | # Script to calculate clustering
# using small number of UMAP dimensions plus 2 spatial dimensions
# Lukas Weber, Dec 2019
library(SingleCellExperiment)
library(uwot)
library(scran)
library(scater)
library(ggplot2)
library(RColorBrewer)
# ---------
# load data
# ---------
# load scran output file (containing top 5... |
e77cd59ba54777daa16fdde3a098548029a76b62c2e2a7b2f95cf855606b11ce | R | 4,505 | 105 | #!/usr/bin/env Rscript
## 01_tcells_meth_dmp.R — generated from notebook spec
## Run: Rscript 01_tcells_meth_dmp.R
## ============================================================
## # 01 — T cells methylation DMP (R/limma)
##
## R/limma rerun of methylation stratum `cell_tissue_case_control_t_cells` from
## `Strat... |
1796215ff19e7d37a63595818506362815f61263014e394622fdf3ccbcb51906 | R | 4,507 | 112 | # ============================================
# COMPREHENSIVE GO ENRICHMENT HEATMAP
# All cell types in one figure
# ============================================
library(ggplot2)
library(dplyr)
# Build a combined pathway summary for all cell types
# Select key representative pathways
pathway_summary <- data.frame(
... |
7ebfb077cb414694ce15b82c247b7d9747c4ed1b2e9efa66712e156301b0dfb4 | R | 4,518 | 134 | create_meas_plot <- function(data, y_value, x_value, y_label) {
ggplot(data, aes(
y = !!sym(y_value),
x = !!sym(x_value),
color = group,
fill = group
)) +
geom_point(
position = position_nudge(x = -.25),
size = 3,
alpha = 0.9,
shape = "-"
) +
geom_boxplot(
p... |
c70766b0865d8d61007cd0376518be7ac4c8c403cb520dc1088847a15ad7fcd3 | R | 4,524 | 157 | ---
title: "Preprocessing script for Camp 2017"
author: "Aditya Pratapa"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc: true
vignette: >
---
Load necesdsary libraries
```{r warning=FALSE,message=FALSE}
library(destiny)
library(slingshot)
library(plotly)
library(gam)
library(RColorBrewer)
```
Read ... |
57f10983cc12a1a2f5ed73fb7ecda9142303ccecd4f64073ce69f8cefdfaabe9 | R | 4,539 | 105 | #!/usr/bin/env Rscript
## 02_wb_dmf_meth_dmp.R — generated from notebook spec
## Run: Rscript 02_wb_dmf_meth_dmp.R
## ============================================================
## # 02 — Whole blood DMF treatment context
##
## R/limma rerun of methylation stratum `label_context_case_control_whole_blood_dmf` from... |
ae334546643201b054718dafe48d460ed603e0fe13528d0b643a3f41abc7217d | R | 4,540 | 104 | #!/usr/bin/env Rscript
## 03_wb_ocrelizumab_meth_dmp.R — generated from notebook spec
## Run: Rscript 03_wb_ocrelizumab_meth_dmp.R
## ============================================================
## # 03 — Whole blood Ocrelizumab treatment context
##
## R/limma rerun of methylation stratum `label_context_case_contr... |
55e0ab4652d686aeaf8c45add01ef39478a5bf98e5480752dbfba5a742b96cc9 | R | 4,564 | 117 | #!/usr/bin/env Rscript
## 04_magliozzi_brain_dep.R — generated from notebook spec
## Run: Rscript 04_magliozzi_brain_dep.R
## ============================================================
## # 04 — Magliozzi 2026 brain proteomics: DEP/limma, 4 contrasts
##
## DIA-MS on **post-mortem brain tissue** (Magliozzi et al.... |
452372fb7327df97c12ae29d9ad451e318db7c892fa7db3352c65c56484fd47e | R | 4,565 | 107 | #!/usr/bin/env Rscript
## 08_per_group_consistency.R — generated from notebook spec
## Run: Rscript 08_per_group_consistency.R
## ============================================================
## # 08 — Per-group cross-study consistency (29 tissue × cell-type groups)
##
## R port of Python `02_per_group_consistency.... |
e151c0a6b31f0f95f23c366b52c362851bb81811cc770d8c5037c073faf0e67e | R | 4,565 | 105 | #!/usr/bin/env Rscript
## 04_tcells_remission_meth_dmp.R — generated from notebook spec
## Run: Rscript 04_tcells_remission_meth_dmp.R
## ============================================================
## # 04 — T cells remission context
##
## R/limma rerun of methylation stratum `label_context_case_control_t_cells_r... |
8a82492903726a59b4388469aa2b95e24dc3535a973ca5ab2046cd4aef11e0a8 | R | 4,568 | 61 | #!/usr/bin/env Rscript
#
# Copyright (c) 2020 The Broad Institute, Inc. All rights reserved.
#
suppressPackageStartupMessages(library("pacman"))
suppressPackageStartupMessages(p_load("optparse"))
suppressPackageStartupMessages(p_load("glue"))
options( warn = -1, stringsAsFactors=F )
# specify command line a... |
41d511d69a90ead808205e7412da70c5d873f693accaef44494e5a13bd645b90 | R | 4,592 | 130 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[set %in% c("test", "validation", "training")]
meta <- meta[dataset %in% "accessibility"]
meta <- meta[tissue %in% c("he... |
8b05f469d41890c40b7409fbc620bd5c56716a4fe6aae10d0f379217b47f57db | R | 4,608 | 152 | library(ggplot2)
library(dplyr)
library(paletteer)
library(tidyr)
library(ggpubr)
load_results <- function(dataset) {
# DataSynthesizer
epsilons <- c(5, 10, 50, 100, 200, NA) #c(0.1, 0.5, 1, 2, 3, 5, 7, 10, 15, 25, 50, 100, NA)
base_dir <- paste0("~/Python/WASP-DDLS/ML-results/", dataset)
file_paths <- paste0(... |
8151fefdfd170ecd85f4bfa33a56513676c948080d3f4cec1b9bc145a14ba903 | R | 4,618 | 91 | ---
title: "Differential Expression"
author: "Christoph Hafemeister"
date: "`r Sys.Date()`"
output:
html_document:
highlight: pygments
df_print: kable
---
```{r setup, include = FALSE}
library('Matrix')
library('ggplot2')
library('reshape2')
library('sctransform')
library('knitr')
knit_hooks$set(optipng = h... |
e8aac60ffbadacf34fcac8c3ad249afa5bfdcba080ba09a41f355d9e71754207 | R | 4,630 | 136 | #========================================================================================#
# Author: James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, University of Oslo
#
# Purpose: Summarize results from resampling-based robustness check
#========================================================... |
ee3db29bd529abcbeac8ea4589424bd0580983a60950259c39e06e472684f44d | R | 4,637 | 84 | #!/usr/bin/env Rscript
# AGGREGATION SENSITIVITY: does the pseudobulk aggregation unit change the conclusions?
#
# S1 SUM of raw integer UMI counts -> edgeR-QL / voom (muscat standard; already run)
# S2 MEAN of per-cell CP10K (= CPM/100), log2 -> limma-trend (normalise each cell, then average;
# ... |
2f96ac8a5774d5e922f9715a99f564fdca96d63522850fb8d9bf8c01c829a1d3 | R | 4,642 | 131 | library(shiny)
library(shinymaterial)
library(omixerRpm)
# form fields names
fields <- c("matrix", "module.db", "annotation", "minimum.coverage", "score.estimator", "normalize.by.length", "distribute")
# save a response
runRpm <- function(input) {
# load the selected module database for mapping
module.db <- lo... |
20e9ca124f605875d0ed38366961cc1e6e4799a3ffe0fc5b9709e364f7024ec3 | R | 4,653 | 185 | ---
title: "Visualizing the beat-side expression across PNs"
output: html_notebook
---
```{r}
library(tidyverse)
library(magrittr)
library(RColorBrewer)
library(ggridges) #for geom_density_ridges function
```
```{r}
counts <- read_tsv("./data/counts.tsv") %>% as.data.frame()
PNs <- read_tsv("./data/PNs.tsv") %>% as... |
28877b184604614ab594e2f18bcaa7f4dcf1a081710df141d5f73288c3715602 | R | 4,656 | 117 | # brain-maintenance-lgcm: trivariate latent growth curve model and brain
# maintenance index, companion code for Menze et al. (2026).
#
# Copyright (C) 2026 The authors of Menze et al. (2026).
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License... |
c72d0ee24bccbc56dce70a3bd69195c1fa9ca5ee16966092b60d18e3c8990538 | R | 4,658 | 110 | library(dplyr)
library(ggplot2)
library(ggpubr)
library(stats)
library(tidyr)
load_adni <- source("~/R/DDLS-R/load_adni.R")$value
#merge_adni <- source("~/R/DDLS-R/merge_adni.R")$value
getLongDX <- source("~/R/DDLS-R/getLongDX.R")$value
adni_data <- load_adni()
# ---- MRI outliers ----
mrivars <- c("Ventricles", "Hip... |
af944b2688ddffc67a4b23c691e8d9ea27b93d38a96e4767436c33c141709d46 | R | 4,682 | 94 | # =============================================================================
# 03_pathway_enrichment.R
# Pathway enrichment analysis (Methods 4.5)
#
# Produces:
# Table S5 - GSEA Hallmark (Normal Brain vs GBM)
# Table S6 - GSEA Hallmark (LGG vs GBM)
# Table S7 - KEGG ORA (22-gene NPY-Hypoxia panel)
# Tabl... |
dd208c1ef3a532d967dd0b4bc255b1f7b66c8075c0cafd7b78c578333c3fcb6a | R | 4,728 | 101 | # =============================================================================
# 07_spatial.R
# 10X Visium spatial transcriptomics (GSE194329) (Methods 4.9)
# 6 sections from 5 adult GBM patients.
#
# Pipeline: QC -> SCTransform -> clustering/UMAP -> 12-signature region
# annotation -> 7 NPY-Hypoxia module scores (z... |
582db3703b5f43f724de94fc2c467d618082103b5525df6d1f7ddc5002dbb0e9 | R | 4,765 | 147 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Fig 3i - Percentage of DIV-1 vs DIV-3 polarized neurons whose axons
# were retracted by CK-666.
## What this file does
1. Reads ``CK666_WO_analysis.xlsx`` sheet ``Axon_retraction_count``
(range A1:F17) — Excel-format per-experiment summary table with
col... |
add76a373cb456e67eb8a64d222d0afc3370cfb919d1d4d908612f4f2e3ed03f | R | 4,771 | 114 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
# VISTA enhancers size distribution ----
# Import vista tiles
vista <- readxl::read_excel("/groups/stark/shenzhi.chen/db/VISTA_enhancer_dataset/VISTA2024_AllTissuesReferenceAlleles.xlsx")
vista <- as.da... |
023b8cd3973434d68f5cc1cd14b77eed1cc3b63f4574a3723d2cca817c6b2cfe | R | 4,805 | 183 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Arp3 / MRLC / F-actin soma-patch colocalization (consolidator)
## What this file does
Reads per-cell line-profile correlation tables for the three pairwise
combinations (actin-Arp3, Arp3-MRLC, actin-MRLC) at the soma (`csv_list` from
`Path_1`, lines 43, 53), p... |
c83d1f1213f6cca1258b49a6261da9bf190a6813a10af64102e67421b3641c7c | R | 4,809 | 137 | # -------------------------------------------------------------------------
# Replication Bayes Factor (BF10) Analysis for current domain-specific results
# Author: Yuan Zhang
# Date: 2026-04-13
#
# This script computes replication Bayes Factors between CMI and Stanford
# datasets for:
# - joint CCA Mode 2 GMV map
#
... |
aa84823686576a8973535290ac7d4ca59615144b8a0c13a967ff6ccd076e5b4c | R | 4,811 | 158 | rm(list = ls())
library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_offset.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
... |
26122d9a87d0a8f5c21d377211700b82af76c2932e715fc8bc02ef163d8e1957 | R | 4,813 | 158 | rm(list = ls())
library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_beta.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
d... |
6c5792c4d4d14e6b17104c7c530c450d434eb9c2cf6d1666dd4aa70f7306a640 | R | 4,821 | 119 | # -------------------------------------------------------------------------
# Replication Bayes Factor (BF10) Analysis
# Author: Yuan Zhang
# Date: 2025-07-25
#
# This script computes replication Bayes Factors between CMI and Stanford
# datasets for:
# - Math-related GMV maps
# - Reading-related GMV maps
#
# For e... |
70c24c689d54a206c99c59deae156e0d0aef1eb90c1479aa8dd533c54f5a86c3 | R | 4,826 | 126 | ############################################################
# Stanford SES-Control Analysis
# Author: Yuan Zhang
# Date: 2025-07-25
#
# Description:
# This script:
# 1) Loads canonical variate scores (U) from math and reading
# CCA models for the Stanford cohort.
# 2) Computes a combined SES score from parental... |
904f243aa3dd057bd0313ccc4c6fc66c8997dcb4486db6f1f66da7d8290d3bb7 | R | 4,842 | 158 | rm(list = ls())
library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_alpha.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
... |
ed6344225c668e67c8d2b94221854c5297b3edaa7ff9891214a2e7fb994b7e92 | R | 4,845 | 143 | library(dplyr)
library(readr)
library(rtracklayer)
library(ggplot2)
library(tidyr)
library(patchwork)
library(stringr)
novel_maps_output <- read_tsv("/scratch/nxu/100KGP_splicing/nextflow_results/novel/maps_output.tsv") %>%
mutate(
type = "Novel"
) %>%
filter(
region %in% c("Acceptor", "Don... |
6cad0ebb4c94a05b0f00ab87adb22f3f2ac6cde27c2bfd3f500caaed890ebd72 | R | 4,868 | 94 | # library (logger)
# library (ggplot2)
#' Estimate the expected number of doublets from the count of empty/nonempty cell barcodes
#'
#' Given the count of empty and non-empty cell barcodes, fit data to a poisson distribution
#' where the empty count matches the number given, and the sum of counts >= 1 equals the non-... |
005d51c8742634ced704d546d102ca573f1c9db23f26989f29167477a384c7b8 | R | 4,893 | 96 | library('sgejobs')
library('sessioninfo')
dirs <- dir(pattern = '^1')
stopifnot(length(dirs) == 12)
job_loop(
loops = list(sample = dirs),
name = 'bamtofastq',
cores = 4,
queue = 'bluejay',
memory = '20G',
create_shell = TRUE,
logdir = 'logs_bamtofastq'
)
dir.create('logs_bamtofastq', show... |
0e2fb4ace80a7d327958dcd3a184a323f1e9c8b14dea9bac17069f489e03e6d3 | R | 4,919 | 144 | # Change this to your github repo dir
suppressPackageStartupMessages({
library(dplyr)
library(ggplot2)
library(cowplot)
library(clue)
library(khroma)
library(scran)
library(limma)
library(tibble)
library(readr)
library(ggrepel)
library(mclust)
library(pheatmap)
library(fastDummies)
library(r... |
aa6c69a39e7d1a03f9d216674793bbb79951f116c1115443c50fa2ae6206e960 | R | 4,922 | 136 | run_fx <- function(fx, outs) {
run_eqtl_finemapping_files(
index_eqtl_file = fx$index_eqtl_file, cis_pairs_file = fx$cis_pairs_file,
expression_file = fx$expression_file, genotype_file = fx$genotype_file,
covariate_file = fx$covariate_file,
verbose_outfile = outs$verbose, credible_set_outfile = outs$c... |
6f7be9c7096e7447fa1cc01858e4b82788271f5ffcd41c16ff0fb1cb00cc28c7 | R | 4,964 | 94 | ---
title: "Correcting UMI counts"
author: "Christoph Hafemeister"
date: "`r Sys.Date()`"
output:
html_document:
highlight: pygments
---
```{r setup, include = FALSE}
library('Matrix')
library('ggplot2')
library('reshape2')
library('sctransform')
library('knitr')
knit_hooks$set(optipng = hook_optipng)
knitr::op... |
57fc85c0c81c41fd78414ac270a6053ad66da79340a46261b9a42b29e1db802e | R | 4,984 | 148 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import sequence info ----
dat <- list(heart= readRDS("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/Rdata/final_designed_enhancer_sequences_heart.rds"),
limb= readRDS("/groups/stark/vloubi... |
df2c3d71bb17bd363b9407484b5eace882f2877d34a2b271323732953db5314b | R | 4,993 | 168 | ---
title: "Preprocessing script for Shalek 2014"
author: "Aditya Pratapa"
date: "`r Sys.Date()`"
output:
BiocStyle::html_document:
toc: true
vignette: >
---
Load necesdsary libraries
```{r warning=FALSE,message=FALSE}
library(destiny)
library(slingshot)
library(plotly)
library(gam)
library(RColorBrewer)
library... |
09a3806bf3416e21858665d8fbdffd5149813afda33d53e7788a9a6155df168b | R | 4,995 | 172 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# MRLC patch size + count timecourse after CK-666 treatment
## What this file does
Reads per-neuron MRLC patch CSVs (one CSV per timepoint, `list.files` pattern
at line 50, loaded at line 59) tracking MRLC condensate size and count
before and after 150 uM CK-666... |
c79236b84ed6264a08cf9e0aa345d646f108b6463d0c3ddf5cc85fca4f5214ef | R | 4,999 | 109 | munge <- function(files,hm3,trait.names=NULL,N=NULL,info.filter = .9,maf.filter=0.01,log.name=NULL, column.names=list(),
parallel=FALSE, cores=NULL, overwrite=TRUE){
if (is.list(files)) {
wrn <- paste0("DeprecationWarning: In future versions a list of filenames will no longer be accepted.\n",
... |
e94c474cdf5e6e4e910ef9bbea374f2f30242523d66af83b8b0187620a176db3 | R | 5,001 | 100 | # Consensus WGCNA for Day 4: based on https://smorabit.github.io/hdWGCNA/articles/consensus_wgcna.html
library(Seurat)
library(SeuratDisk)
library(reticulate)
library(Matrix)
library(zellkonverter)
RH282 <- readH5AD("RH282_merged_matrix.h5")
RH282_Seurat <- as.Seurat(RH282, counts = "X", data = NULL)
RH284 <- readH5AD... |
18a3877f98985ff9812e6c33bdb8cdadfb8fb84b93647c1d3ccf5d859d7b1303 | R | 5,003 | 175 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: ENTER YOUR NAME AND CONTRIBUTION HERE
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-c", "--coordinates"),
type = "character", default = NULL,
... |
addf2cf99f6e6cc5b64ea12d12987fb3a58a050e01e63d3d1fd1fc4924622eb5 | R | 5,004 | 217 | suppressPackageStartupMessages({
library(Seurat)
library(SeuratObject)
library(SeuratWrappers)
library(Matrix)
library(reticulate)
library(ggplot2)
library(data.table)
library(purrr)
library(ggridges)
library(patchwork)
library(glmGamPoi)
library(forcats)
library(ggrepel)
})
gcs <- function(c... |
c78eccf555b26ab1b7b7cc9ff123d99c689330fd77cfe20b3e4a14b52349d2ef | R | 5,010 | 157 | #!/usr/bin/env Rscript
# Plot protein domain structures for selected Meis1 isoforms using InterProScan TSV output.
suppressPackageStartupMessages({
library(tidyverse)
library(drawProteins)
library(data.table)
})
# -----------------------------------------------------------------------------
# Input/output path... |
5882e540e0ca134e43b1b6b764241f9f7900c311ed6340051fa5b37140362d45 | R | 5,036 | 119 | #' @title sctype source files
#' @name sctype_source
#' @description loads sctype functions needed for an automated cell type annotation .
#' @details none
#' @param none
#' @return original ScType database
#' @export
#' @examples
#' db_=sctype_source()
#'
sctype_source <- function(){
# load tissue auto detect
... |
e8855a4d34135c9de28c76b59faa25da953023bffa1b3f01f958824b9d85e59f | R | 5,052 | 109 | # =============================================================================
# 04_meta_analysis.R
# External validation (GEO microarrays) and random-effects meta-analysis
# (Methods 4.6)
#
# Validation cohorts:
# GSE4290 - GBM vs epilepsy (non-tumor) brain, Affymetrix HG-U133 Plus 2.0
# GSE50161 - GBM vs normal... |
0cd62fa4d193ab41e9fd7644bd70e98f8a60a32c94d1836eaf681e332884d2e7 | R | 5,055 | 225 | suppressMessages(library(Seurat))
suppressMessages(library(ggplot2))
suppressMessages(library(patchwork))
setwd('~/Desktop/project/Ciona_ST/')
set.seed(123)
result_dir <- 'result/result1/preprocessing/'
### function
filter_blank_spots <- function(
obj,
slice,
imagerow_min = NULL,
imagecol_left_max = NULL,
i... |
9143017b5ada110289fc4655ab720ca0b7fdb5bcb07c9fd7661106ad1621a16f | R | 5,071 | 140 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created script
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-o", "--out_dir"),
type = "character", default = NULL,
help = "Output directory to write files to."
)
)
description <- "L... |
0662325c69a6fae190f923daa8289d3925958ca6c69cc5c6e068862bd4f145a1 | R | 5,081 | 94 |
---
title: "Interface with other single-cell analysis toolkits"
author: "Suoqin Jin"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
theme: united
mainfont: Arial
vignette: >
%\VignetteIndexEntry{Interface with other single-cell analysis toolkits}
%\VignetteEngine{knitr::rmar... |
3bcd4cce99f1431607f9cb9f8c03e9cf606952746a62ba6d81afb6e178febf43 | R | 5,113 | 168 | library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_delta.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
df_combined$ROI <- ... |
e0e63bac1670dd50f7a2d03a26f9c3d4bbd8ce57669a5949e47d473b3d9727ed | R | 5,124 | 101 | #!/usr/bin/env Rscript
# Reviewer point 2, direct compartment test.
#
# mCSEA is a region-level ENRICHMENT test and needs a minimum number of CpGs per region, so genes
# with few promoter probes (e.g. CD79B, 3 probes) cannot be tested at all. That is a limitation of
# the test, not evidence about the gene. Here every g... |
f7747a738efe7f6b6fd90942fbab16ea582a6585159efd17382d02ee28f495e4 | R | 5,134 | 138 | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Euclidean distance between two points.
#' @param a A point.
#' @param b A point.
#' @return The distance between two points.
#' @noRd
NULL
#' Squared Euclidean distance between two points.
... |
112599948be860dd6c59ccb93f87e35b3743d9aa05dadb0230b360f70eb284ba | R | 5,136 | 134 | # Vanni Bucci, Ph.D.
# Assistant Professor
# Department of Biology
# Room: 335A
# University of Massachusetts Dartmouth
# 285 Old Westport Road
# N. Dartmouth, MA 02747-2300
# Phone: (508)999-9219
# Email: vbucci@umassd.edu
# Web: www.vannibucci.org
#---------------------------------------------------------------------... |
ca0bdc76844e20a3bddeef917b3535fb4f86eb5aa30693294f3006af052bebd6 | R | 5,163 | 144 | ---
title: "model_outputs"
author: "Bernard Asanbe"
date: "2025"
---
Outputting the phylogenetic logistic regression model (from model_fitting)
```{r}
# ------------------------------------------------------------------------------
# Creating binary response variable based on IUCN Red List status
# ---------... |
ffa64ce7b8c018cc01ebf8727678c5eb6ce45e70b0e417bb4605925a1cf0a632 | R | 5,181 | 169 | library(biomaRt)
library(dplyr)
library(stringr)
## set some parameter
MarkerDataPath = '/Users/guofanhua/Desktop/gfh/work/experiment/ASL_Mesoscopic2025/reference/2021NN_PFC_LayerGene/'
# MarkerSaveName = 'GeneExp_NN.csv'
# MarkerSaveName = 'GeneExp_Mine.csv'
DataName = 'hcp_3d_gxrm.csv'
GEDataPath = '/Users/guofanhu... |
e242ab0c498d031ae7472f24edb013c16a2dc379f2f3586e40f409e44961893e | R | 5,184 | 131 | <!--
================================================================================
fig05b_taxol_nocodazole_neurite_quantreg.R — Fig 5b
================================================================================
What this file does: Quantile regression on Taxol/Nocodazole vs WT/KO.
Manuscript panel(s): Fig 5b
... |
6752ada07777bcefc812a574b577f7eba4ade86ed44645f1fbb0f35476c3cbf5 | R | 5,243 | 131 | <!--
================================================================================
edfig12lm_cytod_rescue_neurite_quantreg.R — ED Fig 12l/m
================================================================================
What this file does: CytoD rescue neurite-length quantile regression for ED Fig 12l/m.
Manuscr... |
ae42003277a99eb0f4121cfecec7d026b95bc5bc43dff7cb10bb3d9d3d2abde2 | R | 5,245 | 97 | library(peer)
library(qtl)
source("helpers.R")
# A 'real-life' application of PEER, exploring the gene expression data in the set
# of yeast segregants established by Brem and Kruglyak.
unsupervised_exploration <- function(cross, n_factors=10, n_iterations=10, max_n_genes=200){
# First, let's infer the unsupervis... |
00d4d0de0baa88949ea23dc6def280fc88ebf3e977d055118d484a87a1dcde77 | R | 5,259 | 150 | ############################################################
##### Filter SNPs based on Chi2 and in LD with Chi Sq ######
############################################################
setwd("./2_multivariateGWAS/")
library(data.table)
library(dplyr)
library(tidyr)
## Load in file for common and independent pathways ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.