sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
cbfe5399ab1b251c5283b0b8455138404fd2f3bc5a4ff79acfa2d871b6d67678 | R | 3,045 | 115 | ##Bioconductor version 3.12 (BiocManager 1.30.10), R 4.0.4 (2021-02-15)
## Installing package(s) 'edgeR'
library(edgeR)
library(ggplot2)
#read counts
data_raw <- read.csv("/Users/haithamelmarakeby/PycharmProjects/pnet2/_database/prostate/processed/p1000_read_counts.csv", row.names=1, header = TRUE)
dim(data_raw)
head... |
6efda70f03f68f140e29c3f70f331699d0f250ffb1d7b2eabb43fe79ca35e06a | R | 3,046 | 81 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import K27Ac/K4me1 peaks ----
folder <- "/groups/stark/shenzhi.chen/projects/accessibility_model_enhancer_design_17112025/"
meta <- readRDS(paste0(folder, "Rdata/mouse_e11.5_ENCODE_20251204/metadata.rds")... |
9e3d6545aac60a65bb0e6080e0b8c95989f9c546693ecc2348c4972b4e961180 | R | 3,067 | 68 | library(dplyr)
library(readr)
library(ggplot2)
library(tidyr)
library(patchwork)
library(stringr)
library(glue)
my_theme <- theme_bw() +
theme(
axis.text.x = element_text(size = 20, vjust = 0.5, angle = 45, hjust = 1, color = "black"),
axis.text.y = element_text(size = 20, color = "black"),
... |
32eee119e6cd89e8f4ab06dc96f029d4a7a872bd5628cc92790d682dd70c7e45 | R | 3,088 | 86 | library(arrow)
library(dplyr)
library(rtracklayer)
library(tidyr)
structural_category_labels <- c(
"full-splice_match" = "FSM",
"incomplete-splice_match" = "ISM",
"novel_in_catalog" = "NIC",
"novel_not_in_catalog" = "NNC",
"Other" = "Other"
)
classification <... |
7fa8de9b4be35d1b44b477e495be22c83de33a46dc7e96e49dc4e8e6605c9abb | R | 3,092 | 103 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Mark D. Robinson; coded the domain-specific F1
suppressPackageStartupMessages(library(optparse))
# TODO adjust description
option_list <- list(
make_option(
c("-l", "--labels"),
type = "... |
2017de3f352100e56693675f1da2f2f33477a778aeb8c4bcfe397c7705a8199e | R | 3,102 | 91 | #!/usr/bin/env Rscript
# Author_and_contribution: Jieran Sun & Mark Robinson; Create the script
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-i", "--input_file"),
type = "character", default = NULL,
help = "Input containing the aggregated labels."
),
make_o... |
8f6bfc50a5afc3be6c9b791eeb3cf2742b9e6f6fa0a027e3525b58d59ea62907 | R | 3,105 | 108 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Niklas Mueller-Boetticher; contributed code
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-o", "--out_dir"),
type = "character", default = NULL,
... |
08fb0dff70cd9e0da0bfbc3946552a4158dc29621f0d4c5ce28da96558e97c9b | R | 3,128 | 101 | ---
title: "R Notebook"
output: html_notebook
---
<!--
================================================================================
file_sorting.Rmd
================================================================================
# Helper utility: sorts microscopy TIFF files into per-cell subfolders.
# Used as th... |
22a89a0658db6e255f4101dbaf13df2cddab69d93fb6a1acdf559523030e0cbd | R | 3,137 | 108 | write.model<-function(Loadings,S_LD,cutoff,fix_resid=TRUE,bifactor=FALSE,mustload=FALSE,common=FALSE){
Model<-""
if(common == TRUE){
for(f in 1){
u<-1
Model1<-""
for(i in 1:nrow(S_LD)){
if(u == 1){
linestart<-paste("F", f, "=~", colnames(S_LD)[i], sep = "")
u<-u+1
... |
03c4bbd35a65a05c8cd80bc37044e5918832c2eb4c346584cd4d38a7e65e4fb9 | R | 3,146 | 92 | # CSF_cfDNA_sequencing_coverage.R
# this file is meant to be used inside Rstudio
# this file takes a flat table of insert sizes for each read from a bam file, calculates and plots the sequencing coverage of the CSF samples
library(data.table)
library(dplyr)
library(ggplot2)
library(tidyverse)
# read in length files
... |
8b3beb8f161c6e40b6bf0597526f8de8d68bf56323486f49ee0f757aea4ab2bf | R | 3,159 | 83 | library(dplyr)
library(ggplot2)
library(arrow)
library(scales)
library(patchwork)
library(RColorBrewer)
colorVector <- brewer.pal(5, "Set2")
my_theme <- theme_classic() +
theme(
axis.title.x = element_text(size = 13),
axis.title.y = element_text(size = 13),
axis.text.x = element_text(size ... |
eb87844b46df8d3800dae6b2c0bcb01fc58e8f067c6a3a69d28b98fa99cf1571 | R | 3,168 | 106 | # Tabula Muris analysis (FACS and Droplet data)
# This script demonstrates the analysis workflow using the lung dataset:
# facs_lung_tiss.Robj
# The same analysis pipeline was applied to all other organs from the
# Tabula Muris Consortium dataset without modification.
# Users can reproduce results for other tissues ... |
62c68e79c78006a158fdf481a37ba8676fea6defac12fb1aeada840ca8a0da70 | R | 3,169 | 128 | ---
title: "Getting started with ggrepel"
author: "Kamil Slowikowski"
date: "`r Sys.Date()`"
output:
prettydoc::html_pretty:
theme: hpstr
highlight: github
toc: true
mathjax: null
self_contained: true
vignette: >
%\VignetteIndexEntry{ggrepel examples}
%\VignetteEncoding{UTF-8}
%\VignetteEngi... |
65669b62318bf8e497edd5b479a050f2bc95041fdcb8776991fca643feb53b91 | R | 3,175 | 86 | #
# Copyright (c) 2020 The Broad Institute, Inc. All rights reserved.
#
################################################
## funtion to parse parse and update parameters
## - cmd line
## - yaml file
## parameters in yaml file will be updated with
## parameters specified on cmd
parse_param_preprocess_gct <- functi... |
3aff4f956311502f687c228da42c0b77d0d565f4e54ae5a275fce83e86b83345 | R | 3,177 | 77 | #Ext. Data Fig 10_Analysis for adrenergic receptors and Lepr expression from the published HypoMap dataset
##########
### Load & Prepare
##########
### Full dataset provenance is provided in the corresponding publication/repository.
#https://www.nature.com/articles/s42255-022-00657-y#code-availability
results_path_fi... |
7c74c18f02c4c9177462be1a6923e5edcd0d16f47db46e36a6f2f17fd5c73c8b | R | 3,180 | 79 | ## Need to work outside conda_R for this
## code from John Muschelli
# module unload conda_R
# module load R
# java_type=java-openjdk
# export _JAVA_OPTIONS="-Xms5g -Xmx6g" ## By Leo: specify some memory, otherwise java runs out of juice
# export JAVA_HOME=/usr/lib/jvm/${java_type}/jre
# export JAVA=/usr/lib/jvm/${java... |
2bd6803e9e1f158dd34d4df091bc5e5829b8b3a096077c5dae40a85f5a8ab962 | R | 3,181 | 119 | # qrsh -l mf=10G,h_vmem=11G,bluejay,h_fsize=100G -pe local 12
# cd /dcs04/lieber/lcolladotor/with10x_LIBD001/HumanPilot/Analysis
# module load conda_R/3.6.x
## ----Libraries ------------------
library(parallel)
library(SummarizedExperiment)
library(Matrix)
library(RColorBrewer)
library(jaffelab)
library(edgeR)
librar... |
56560bbb1cd8548cf85ab6bde7d576687da953ad9bf8325d83a8a2e687e50257 | R | 3,182 | 108 | ---
title: "Fig 3n + ED Fig 5b - PA-Rac1 C450M precursor (Pre/Act/Post)"
output: html_notebook
params:
variant: "C450M"
pdf_name: "C405_length.eps"
length_y_limit: !r c(-40, 30)
---
<!--
================================================================================
STAGE-1 PRECURSOR wrapper for Fig 3n + ED F... |
0be3b6958e0c05711c57435789808599a5673cef474bd971e1adacfe23465ec3 | R | 3,204 | 95 | # x is a dataframe or a valid file path
# Add the Description of modules as a data object
rpm <- function(x, minimum.coverage = -1, score.estimator = "median", annotation = 1, module.db = NULL, threads = 1,
normalize.by.length = FALSE, distribute = FALSE, java.mem = NULL) {
# link to the GMMs executab... |
f696e02fcc91207ea2156c23e1eeb11891013e4c4c476ed5238943e98b89a8ee | R | 3,204 | 96 | #========================================================================================#
# Author: James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, University of Oslo
#
# Purpose: run regional wild bootstrap resampling (guard against group differences in variance)
#============================... |
cfd793094e1f6978e8b1c9e518bab229551956b7cf6faa6c192e29483df4de6d | R | 3,209 | 104 | library(dplyr)
library(tidyr)
library(ggplot2)
folders <- c(
baseline = "D:/aperiod/export_eeg_psd/baseline",
stress = "D:/aperiod/export_eeg_psd/stress",
training = "D:/aperiod/export_eeg_psd/training"
)
selected_participant = 9999
read_psd <- function(folder_path, condition_name) {
file ... |
36bbd52618e99094659fab13da7ef8e05c4f97b853c2315a9fa26e7508870c2f | R | 3,216 | 111 | #####################################
# Estimate metacognitive efficiency (Mratio) at the group level
#
# Adaptation in R of matlab function 'fit_meta_d_mcmc_groupCorr.m'
# by Steve Fleming
# for more details see Fleming (2017). HMeta-d: hierarchical Bayesian
# estimation of metacognitive efficiency from confidence ... |
7089e9ab3ab8749cd0c0113c33f42ddfe4655b861124353b499c1889beab8958 | R | 3,225 | 117 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[dataset=="activity" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW"]
meta <- meta[set=="test" & tissue %in% c("heart", "limb", "m... |
54694fbf79ab605854ec478f77a5f51ea4e28cd97839ed613fd7da2aae1d66e2 | R | 3,230 | 82 | ####
###
library('SingleCellExperiment')
library('here')
library('jaffelab')
library('scater')
library('scran')
library('pheatmap')
library('readxl')
library('Polychrome')
library('cluster')
library('limma')
library('sessioninfo')
library('reshape2')
library('lmerTest')
## Load data
load(here(
'Analysis',
'Hum... |
30678ef96893dd087ee3154b60a66cb99f581c2c5a04cd54da5a9a99e3a4e15e | R | 3,239 | 103 | ---
title: "Fig 3n + ED Fig 5b - PA-Rac1 T17N precursor (Pre/Act/Post)"
output: html_notebook
params:
variant: "T17N"
pdf_name: "T17N_length.eps"
length_y_limit: !r c(-20, 30)
---
<!--
================================================================================
STAGE-1 PRECURSOR wrapper for Fig 3n + ED Fig... |
20aac2ce8038750209aa2097524697dc2da948617e4a5fcb2aba11e64167af26 | R | 3,248 | 132 | # HMeta-d for between-subjects regression on meta-d'/d'
#
#Adaptation in R of matlab function 'fit_metad_mcmc_regression.m'
#by Steve Fleming (2017)
#
#
# you need to install the following packing before using the function:
# coda
# rjags
# magrittr
# dplyr
# tidyr
# tibble
# ggmcmc
#
# nR_S1 and nR_S2 should be two v... |
6ae246cbd6503809c681342c8f611770a68ec8dd38f6aa223e96d8dabbc6a685 | R | 3,249 | 95 | args <- commandArgs(trailingOnly = TRUE)
if (length(args) < 13 || length(args) > 15) {
stop(
paste(
"Expected 13 to 15 args:",
"spatial_mtx spatial_genes spatial_barcodes spatial_coords",
"reference_mtx reference_genes reference_cells reference_celltypes",
"weights_csv uncertainty_csv resu... |
a61802f7db0aea0c5dbb5b00b1e98bd00e9224832c2e1f63c7ba7e471a68f0bd | R | 3,250 | 101 | #Fig. 1c
# Stacked Violin plot showing the cell-type-specific marker genes expression
library(Seurat)
library(patchwork)
library(ggplot2)
# Load data using a relative path
data_path <- "data/ganglia_seurat_object.rds"
if (!file.exists(data_path)) {
stop("Seurat object not found. Please check data/README.md for do... |
b87873280ab646adbe8034db44b16c9a31e6ac470254b7b202cbcd84e86ab3ec | R | 3,260 | 77 | #!/usr/bin/env Rscript
## 08_cross_stratum_meth_master.R — generated from notebook spec
## Run: Rscript 08_cross_stratum_meth_master.R
## ============================================================
## # 08 — Cross-stratum methylation master heatmap + cross-omics panel
##
## Same as transcriptome notebook 08 but f... |
e14fb2ea0bc54fc1ed0246bef11035bde3e5fe8be0f176cdc0c848c7be963be7 | R | 3,285 | 56 | #' @title Calculate Pseudotime and Map Trajectories Using Slingshot
#' @description This function integrates Slingshot for pseudotime analysis directly within a Seurat workflow, enabling the mapping of cellular trajectories based on user-defined cluster assignments and starting clusters.
#' @param Seu A Seurat object c... |
5b9ac1657617edff2a284a1cc0f07b2f5f539c84218dc0ef1ab544e6aa2081c2 | R | 3,297 | 108 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import metadata
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[dataset=="accessibility" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & set=="test"]
meta <- meta[tissue!="CNS"]
# Control tissue ... |
1d6b4f35d078ac2388ae3cea2336d89c438d386b9b2044b8c9c971e512b56a01 | R | 3,326 | 72 | context("vst function")
test_that('vst runs and returns expected output', {
skip_on_cran()
suppressWarnings(RNGversion(vstr = "3.5.0"))
set.seed(42)
vst_out <- vst(pbmc, return_gene_attr = TRUE, return_cell_attr = TRUE)
expect_equal(c(910, 283), dim(vst_out$y))
ga <- vst_out$gene_attr[order(-vst_out$gene_a... |
a115c58676da05261f892955cd28a82d8d8ddd1b55b07921aca89fafd73e18a6 | R | 3,326 | 83 | #!/usr/bin/env Rscript
## 06_pegram_gse32915_de.R — generated from notebook spec
## Run: Rscript 06_pegram_gse32915_de.R
## ============================================================
## # 06 — GSE32915 (Pegram 2021 NK8+) standalone limma-style DE
##
## Single-study DE on Pegram et al. 2021 NK8+ MS-vs-Control mic... |
fee56a6964389f34058f76e1f3ff3a163c16164472ce7274bcf67e1c3718f74b | R | 3,335 | 78 | library(dplyr)
library(Rmisc)
library(ggplot2)
library(ggpubr)
library(stringr)
library(ggforce)
library(paletteer)
library(ggsci)
epochs <- c(10, 50, 100) #c(0.1, 0.5, 1, 2, 3, 5, 7, 10, 15, 25, 50, 100, NA)
file_paths <- paste0("~/Python/WASP-DDLS/SE-benchmark/bmk_ctgan_epochs_", epochs, ".csv")
# Read CSVs in a lo... |
5d70b05f7fd089c0f8eb4d991ae79180ba75c703249c490894b14494d495dfc3 | R | 3,341 | 57 | #' @title Import SCENIC Loom Files into Seurat
#' @description Imports SCENIC-generated loom files into Seurat objects for further analysis. This function allows the integration of gene regulatory network insights directly into the Seurat environment. If a Seurat object is specified, results are stored in `seu@misc$SCE... |
6abb944baddc7573c005c29e708c4ca0411702c80c473e2b4fdeebaa97b1ce53 | R | 3,353 | 115 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[tissue %in% c("midbrain", "heart", "limb")]
meta <- meta[dataset=="accessibility" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW"... |
5db9851c39d91f57859f5f1fc43fe65c36925db79feb2d31a587301048f8a5e9 | R | 3,355 | 93 | library(ggplot2)
library(tximport)
library(stringr)
library(purrr)
library(GenomicFeatures)
library(arrow)
library(RColorBrewer)
library(pheatmap)
library(rtracklayer)
library(txdbmaker)
library(dplyr)
classification <- read_parquet("nextflow_results/V47/final_classification.parquet")
# Get transcript_biotype
gencode... |
7e431869789f7741b63ddbf1bcd959670d9c0f561c63dd02cbe66294488b23e9 | R | 3,355 | 88 | #Extended_data_Fig. 10
# Co-expression of Lepr and adrenergic receptors in the neurons in ARC_ME region from the published HypoMap dataset
# Data source:
# This analysis uses the ARC_ME subset of the published HypoMap Seurat object.
# The subset was defined using annotations from the original published dataset.
# Full... |
1f0d986a2121239b11c94ae389b5f2a0935ee7e13e65078e59974285da72b092 | R | 3,361 | 113 | ---
title: "Fig 3n + ED Fig 5b - PA-Rac1 / Arp3 KO precursor (Pre/Act/Post)"
output: html_notebook
params:
variant: "KO"
pdf_name: "KO_length.eps"
length_y_limit: !r c(-30, 30)
---
<!--
================================================================================
STAGE-1 PRECURSOR wrapper for Fig 3n + ED Fi... |
5c20d7dddb64531f70c8bb6bf6611c4973408a102f009daa3dc5fdaaad87096d | R | 3,363 | 81 | setwd("/groups/stark/shenzhi.chen/projects/transferLearningMammalianEnhancerDesign202408/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import prediction scores ----
seq.info <- readRDS("Rdata/subbrain_ledidi_design/all_merged_seq_info_old_new.rds")
# Add SOX3 motif counts ----
mot <- readRDS("Rdata/subbra... |
d6f66b6569327e82ae9659f16d51f8ae2015f85dc9606d9d8a6e97bcbdf9c8a4 | R | 3,367 | 104 | # -------------------------------------------------------------------------
# Author: Yuan Zhang
# Date: 2026-04-13
#
# Compute Bayes Factors (BF10) for association between Mode 2 brain GMV
# weight maps and neurotransmitter receptor maps for CMI joint CCA model
#
# Brain map source:
# *_coef.csv
# Weight column us... |
975173d9131f604b93b6829685e045f9968c0e4bf5aab22c6ffc4ba07ddaae73 | R | 3,379 | 86 | #!/usr/bin/env Rscript
## 07_total_combined_de.R — generated from notebook spec
## Run: Rscript 07_total_combined_de.R
## ============================================================
## # 07 — Pan-tissue combined cohort DE (R/limma + tissue covariate)
##
## Combines the 5 case-control strata (PBMC, T cells, B cell... |
caadb32efff48ab65c1bb796a615eee05f0dcc6de388796eb9a80b8c0fd8324b | R | 3,388 | 98 | library(ggplot2)
library(dplyr)
library(arrow)
library(edgeR)
library(ggpubr)
library(patchwork)
args <- commandArgs(trailingOnly = TRUE)
expression_path <- args[1]
lr_patowary_path <- args[2]
encode4_path <- args[3]
my_theme <- theme_classic() +
theme(
axis.title.x = element_blank(),
axis.ti... |
0caead3e42a2766743306cb1fea4966e4562f4d6fc6b1fafea50060e7c0663fc | R | 3,400 | 95 | # -------------------------------------------------------------------------
# Author: Yuan Zhang
# Date: 2025-07-25
# Compute Bayes Factors (BF10) for association between brain GMV weight maps
# (from CCA) and neurotransmitter receptor maps for CMI datasets:
# - CMI Math
# - CMI Reading
# -------------------------... |
2731812009a0c0b850b4726aef6084957848833a3d28137e826a3bfadd914ee4 | R | 3,413 | 93 | #!/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[... |
478a0891df5c470095959c7661f910aa36fd7d1d60d2eeb3b7cf72b1f77015cb | R | 3,418 | 90 | # 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... |
7221543fac69dad335e55d0af5a56979092c456303abef535fee2439f809d4cb | R | 3,421 | 86 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Import metadata ----
meta <- readRDS("Rdata/paper_metadata_v3.rds")
meta <- meta[dataset=="activity" & ID=="model1_bulkATAC_tsx3Aug_2xBal_noW" & tissue %in% c("heart", "limb", "midbrain")]
meta <- meta[se... |
cb64bcae7a0dd4e303abbee83cb5035c347333f1250112bac76b2bcd99ccd97a | R | 3,421 | 93 | #!/usr/bin/env Rscript
# Generate a Venn diagram for high-isoform-diversity genes, transcription factors,
# and brain development genes (GO:0007420), and print genes shared by all three lists.
suppressPackageStartupMessages({
library(readr)
library(dplyr)
library(ggvenn)
library(ggplot2)
})
# ---------------... |
9ad7b243454901caeec15dfcfc2485ba0c0332880817283bf7d953bfdde8fa84 | R | 3,426 | 119 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Kirti Biharie; implemented PAS score
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-l", "--labels"),
type = "character", default = NULL,
help... |
745e328bb12f1855e769a49274abfe402954db5670d9fb5ab2b8fb53b3046391 | R | 3,437 | 94 | #!/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("-o", "--out_dir"),
type = "character", default = NULL,
he... |
83415418bf08e621226aef90af5933459710164d5eae790a634c9ec0724f96cd | R | 3,449 | 115 | library(reticulate)
library(dplyr)
library(ggplot2)
library(patchwork)
library(arrow)
LR_SJ_novel <- read_parquet("export/LR_SJ_novel.parquet")
classification <- read_parquet("nextflow_results/V47/final_classification.parquet")
LR_SJ_novel %>%
filter(LR, GENCODE) %>%
filter(SR) %>%
left_join(
cla... |
ed4aa0ae8e25f13845a7bcb780140e1c1e420969c59c87a33e8ea9104a6f2f68 | R | 3,454 | 98 | # MIT License
#
# Copyright 2024 Broad Institute
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... |
5520f95465e480422ef5b1d1a72ca827613a75fed922a3892f88cddc5a062554 | R | 3,459 | 72 | # ==========================================================================
# Script: 04_TF_Regulon_Activity_Visualization.R
# Project: Wing Polyphenism in Pyrrhocoris apterus
# Purpose: Visualization of Transcription Factor (TF) Regulon Activity
# ==================================================================... |
a864445a40d451a1e8286d94c242536fd4740717d240d5e41b48a9cd9ae99d55 | R | 3,464 | 111 | # Figure/table notes for outputs.
#
# Each script calls build_notes() with a list of legends, producing
# a plain text file with captions and footnotes for each output.
wrap_text <- function(text, width = 78) {
if (is.null(text) || nchar(text) == 0) return("")
words <- strsplit(text, " ")[[1]]
lines <- character... |
b14b13ef59c40df5c983305327dcf5f4cd864f639636b1ac987304cad099735e | R | 3,476 | 141 | library(Gviz)
library(GenomicFeatures)
library(GenomicRanges)
library(glue)
library(tidyr)
library(rtracklayer)
library(dplyr)
library(arrow)
# Settings
options(stringsAsFactors = FALSE)
options(Gviz.scheme = "myScheme")
options(ucscChromosomeNames = FALSE)
scheme <- getScheme()
scheme$GeneRegionTrack$col <- NULL
ad... |
532158c18ff7c760dcdc576cecb68d0549a524751bd79869bd3a35488abbda2a | R | 3,486 | 83 | #!/usr/bin/env Rscript
## 07_brainwm_rna_vs_meth.R — generated from notebook spec
## Run: Rscript 07_brainwm_rna_vs_meth.R
## ============================================================
## # 07 — Brain WM RNA × methylation inverse-concordance scan
##
## Cross-omics scan: take all genes with both an RNA logFC AND ... |
8cde942993448f4baaf481e03bf7a7fde71ab5dcb6b42ea3429d91ca950094ca | R | 3,517 | 147 | ---
title: "PrL Figures"
output: html_notebook
---
This script creates the correlation plot from the manuscript.
```{r}
library(tidyverse)
library(plotly)
library(caret)
dat <- read.csv("prlsb.csv", stringsAsFactors = TRUE)
# Convert ID to a factor.
dat$ID <- as.factor(dat$ID)
```
```{r}
# Select relevant variables ... |
f4b8302cb33945d12ccabf6e0de97536f7e6cff133eca85bae34bcd853e152e6 | R | 3,521 | 110 | library(ggplot2)
library(tximport)
library(stringr)
library(purrr)
library(GenomicFeatures)
library(arrow)
library(dplyr)
library(RColorBrewer)
library(pheatmap)
library(reticulate)
# Input file paths
path_to_classification <- "nextflow_results/V47/final_classification.parquet"
path_to_gtf <- paste0(Sys.getenv("GENOM... |
aefe95cea911070cd37f3cc486078aea65e1c94884ab0593cbd4a9e94900db19 | R | 3,542 | 82 | # 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... |
217dbd5c1f4e00b7164f72c150cfa8ef4b6818dab6628146f3341feb3219ac2d | R | 3,545 | 111 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
require("BSgenome.Mmusculus.UCSC.mm10")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Metadata ----
meta <- data.table(tissue= c("heart", "limb", "midbrain"))
meta[, fa.file:= paste0(
"/groups/stark/shenzhi.chen/projects/transferLearningMammalianEn... |
68d1ca1edeaf70f89de8a8a41d0d6d1be4c62a2fa4ab89efdf90d3d1d09aa83c | R | 3,545 | 89 | library(arrow)
library(dplyr)
library(GenomicFeatures)
library(GenomicAlignments)
library(rtracklayer)
library(readr)
#-----------------------------------Load Datasets-----------------------------------#
annotation_gtf <- paste0(Sys.getenv("GENOMIC_DATA_DIR"), "/GENCODE/gencode.v47.annotation.gtf")
predicted_cds_gtf <... |
4d0800d5774e2be7f7a7f604c30da5eef0cdcca8a9a96bc7efc7310f72b7c391 | R | 3,546 | 99 | read_fusion <- function(files,trait.names=NULL,binary=NULL,N=NULL,perm=FALSE){
print("Please note that the TWAS files should be in the same order that they were listed for the ldsc function")
length <- length(files)
if(is.null(trait.names)){
names.beta <- paste0("beta.",1:length)
names.se <- p... |
cc6f24ca5b3b53354a76be67f5033906b6657a3af2fcd125455409d29cd0f123 | R | 3,549 | 135 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Tau-density spatial profile across cortical-section distance, WT vs Arp3 KO
## What this file does
Reads per-section Tau-intensity profiles across cortical-section distance
for WT and Arp3 KO genotypes. The profiles are aligned by position,
averaged, and plott... |
e87057814e5b0233adac0bb1ba2ef5ca05da99ab9aa8162a06f1fde61df1a6a0 | R | 3,564 | 130 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Mark D. Robinson; coded the domain-specific F1
suppressPackageStartupMessages(library(optparse))
# TODO adjust description
option_list <- list(
make_option(
c("-l", "--labels"),
type = "... |
75aa9f503aa77f714d82cf328147978f6a99062cbe944517610673ab9be30752 | R | 3,573 | 123 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Kirti Biharie; implemented CHAOS score
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-l", "--labels"),
type = "character", default = NULL,
he... |
2b8cd31fcc418a123c2dc89ef6b1fbf52eb5baa149949a00fc581fb2d67f0baf | R | 3,578 | 109 | #' @rdname adata.Load
#' @export
Seu2Loom <- function(
seu,
filename,
add.normdata = FALSE,
add.metadata = TRUE,
layers = NULL,
overwrite = FALSE
) {
library(hdf5r)
library(Seurat)
library(tools)
# Check file extension and modify filename if needed
if (!grepl(pattern = "^loom$", x = ... |
b4d97954e47ee5b25a4e818ce902472c964365372a2ec8495f9593d321332f25 | R | 3,588 | 107 | #!/usr/bin/env Rscript
# Author_and_contribution: Jieran Sun & Mark Robinson; implmented method
# Author_and_contribution: Peiying Cai; created template
# Author_and_contribution: ENTER YOUR NAME AND CONTRIBUTION HERE
suppressPackageStartupMessages(library(optparse))
option_list <- list(
make_option(
c("-i", "... |
6ab63d78a69dc0b67badf0135d0a300c90064ab4acb99fa1732e64c323688c68 | R | 3,622 | 138 | ---
title: "Model Evaluation"
output: html_notebook
---
```{r}
library(tidyverse)
library(plotly)
perfMetrics <- read.csv(file = "PrL_Savg_TCthresh_NNonly_winsConfMatrix.csv")
topVars <- read.csv(file = "PrL_Savg_TCthresh_NNonly_winsOptVars.csv")
```
```{r}
hist(perfMetrics$Accuracy)
summary(perfMetrics$Accuracy)
``... |
d3fa915b1ac0fc220365f976596560ee33dc747f251ecbc1bdee2c04df6e1bf5 | R | 3,650 | 126 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
require(data.table)
require(Biostrings)
# Import initialization and designed enhancer sequences
heart <- readRDS("Rdata/final_designed_enhancer_sequences_heart.rds")
heart <- heart[id %in% c(311, 726, 8... |
4d9e77d5203f0c05125af169306fe5076baebd56a03996e1bc2b9d00c8cb5e09 | R | 3,666 | 109 | train_ds <- read.csv("~/R/data/DDLS/adni_train.csv")
train_ml <- read.csv("~/R/data/DDLS/adni_train_ml.csv")
test <- read.csv("~/R/data/DDLS/adni_test.csv")
all_data <- rbind(train_ml, test)
synthetic <- read.csv("~/WASP-DDLS/DS-synthetic-data/degree3_deter/bn_adni_AGE.csv")
# Missing values
colMeans(is.na(train_ds)... |
65e6c9045e7bc0bc7caed65b132c4bc88caf856f6a182ae03ab22ea046cb0ee0 | R | 3,668 | 95 | library(dplyr)
library(biomaRt)
library(stringr)
library(edgeR)
ensembl <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
ensembl <- getBM(attributes = c("ensembl_gene_id", "external_gene_name"), mart = ensembl)
gene_counts1 <- read.csv("data/short_read/combined_exons_round1.csv", row.names = 1)
gene_counts2 <... |
db02aefc19d8fa970cb2ddd91fe3f075ecaae5984e3f3860d22dcfbedfac5fa2 | R | 3,685 | 132 | #!/usr/bin/env Rscript
# Author_and_contribution: Niklas Mueller-Boetticher; created template
# Author_and_contribution: Kirti Biharie; implemented LISI score
suppressPackageStartupMessages(library(optparse))
suppressPackageStartupMessages(library(ClusteringMetrics))
option_list <- list(
make_option(
c("-l", "... |
01810df33d1089aea7e7aeffeee9c7bf70852bdfcefa49c70fdb1af204cf861f | R | 3,701 | 117 | #========================================================================================#
# Author: James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, University of Oslo
#
# Purpose: Run resampling-based robustness analysis
# Script requires individual-level data as input and is not exec... |
af1f6c6baedc3269a791874cc793c13133ea177ac200a349e58f5f2e31e83c1e | R | 3,712 | 87 | library(dplyr)
library(Rmisc)
library(ggplot2)
library(ggpubr)
library(stringr)
library(ggforce)
library(paletteer)
library(ggsci)
epsilons <- c(200, NA) #c(0.1, 0.5, 1, 2, 3, 5, 7, 10, 15, 25, 50, 100, NA)
samples <- c(rep(100, length(epsilons)-length(which(is.na(epsilons)))), 18)
file_paths <- paste0("~/Python/WASP-... |
22f31d948248640dbad966de93ed208d199b8bce8731719440dfd35bce3c4b32 | R | 3,717 | 85 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
require(stringdist)
# Distance file
dist.file <- "db/sequence_distances/hamming_distances.rds"
if(!file.exists(dist.file)) {
# Import initialization and designed enhancer sequences ----
heart <-... |
5afe85893cd0b4394f81770bc46cec7a268f1a0d13fd133441427ce52040b15f | R | 3,723 | 118 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
require("BSgenome.Mmusculus.UCSC.mm10")
devtools::load_all("/groups/stark/vloubiere/vlite/")
# Metadata ----
meta <- data.table(tissue= c("heart", "limb", "midbrain"))
meta[, fa.file:= paste0(
"/groups/stark/shenzhi.chen/projects/transferLearningMammalianEn... |
b17ca8df1e701b6dc6ccef6aa7d99d55353029bfb9ae2b56dfde5e5ee7da0060 | R | 3,738 | 95 | library(readr)
library(readxl)
library(dplyr)
library(tidyr)
library(scatterpie)
original <- read_excel("data/mmc2.xlsx", sheet = "Table S2C", skip = 1) %>%
separate(
col = Variant,
into = c("chr", "pos", "ref", "alt"),
sep = ":",
convert = TRUE
) %>%
mutate(
chr = g... |
bb57785cd248bf0d011295ff7932f74a630d3aee25ca2b3804f83ef48d1aeeb5 | R | 3,744 | 120 | ---
title: "model_fitting"
author: "Bernard Asanbe"
date: "2025"
---
Installation and loading of packages
```{r}
# Install required packages
install.packages("ape")
install.packages("phylolm")
install.packages("dplyr")
install.packages("car")
install.packages("corrplot")
# Load necessary libraries
lib... |
091ae7e22ce7c19a136d33b3cd6c835cb62b9229ee31730a2c24d8762f6115c6 | R | 3,751 | 126 | # Permutation testing
# Permutation testing for AUC
permAUC <- function(p, probsDF){
# Create vector to store results.
aucPermutations <- numeric(length = p)
# Run permutations
for(i in 1:p){
# Sample class label for each cv
permDF <- probsDF %>%
group_by(cv) %>%
mutate(trueClass... |
429161f036e1af7e8e7adb54972939ad658c3e6245dabc3732935695bfd246dc | R | 3,763 | 93 | # Author: Francois Aguet
library(peer, quietly=TRUE) # https://github.com/PMBio/peer
library(argparser, quietly=TRUE)
WriteTable <- function(data, filename, index.name) {
datafile <- file(filename, open = "wt")
on.exit(close(datafile))
header <- c(index.name, colnames(data))
writeLines(paste0(header,... |
1ab8994d0760eeb7bd32774889a6d59675e181abc7fc9986a2dbb92af94b5f05 | R | 3,776 | 94 | ---
title: "Emergency diagnoses - table 1"
author: "Emma Whitfield"
date: "`r Sys.Date()`"
output: word_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tidyverse)
library(flextable)
library(gtsummary)
library(lubridate)
library(RMySQL)
library(glue)
source('A0_global_... |
a4ee4e6303b163a91f24af3027cf6ff70028d01a640f457f24c243a8a8f2261a | R | 3,787 | 86 | #!/usr/bin/env Rscript
## 10_master_validation.R — generated from notebook spec
## Run: Rscript 10_master_validation.R
## ============================================================
## # 10 — Master cross-omics validation panel
##
## Final integrating figure. For each of the 7 cross-omics candidates,
## build a h... |
4727f07853409b72c9fb2296827e55fd9cc380e55d58d366f59f13e2d770dc91 | R | 3,806 | 129 | options(future.globals.maxSize = 10^12)
suppressPackageStartupMessages({
library(SeuratObject)
library(Seurat)
library(Matrix)
library(SeuratWrappers)
library(purrr)
library(reticulate)
})
from_pseudospot <- function(ad.path, id) {
message(sprintf("%s: loading anndata", id))
ad <- import("anndata", con... |
18e92415bea463df9bcc068a312c0319a2a5a77702761dadae57cd29bb499ed4 | R | 3,825 | 100 | <!--
================================================================================
edfig08pq_arp3b_rescue_neurite_quantreg.R — ED Fig 8p/q
================================================================================
What this file does: Arp3b rescue quantile regression for ED Fig 8p/q.
Manuscript panel(s): ED ... |
540a67904c84d2b92d11a86b185adadac7753caefa52bb3a4d5494c683e4a411 | R | 3,830 | 140 | ---
title: "Preprocessing script for Chu 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)
library(EB... |
cddf3b9fcd998cd12c8d511325ab4759d0560220863e6aae96496edc211635f3 | R | 3,831 | 89 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
devtools::load_all("/groups/stark/vloubiere/vlite-dev/")
require(stringdist)
# Distance file
dist.file <- "db/sequence_distances/levenshtein_distances.rds"
if(!file.exists(dist.file)) {
# Import initialization and designed enhancer sequences ----
hear... |
034389a70c307baef657007978ce8ee2714132056135d89873dbcef279633a3c | R | 3,838 | 86 | ############################################################
# Identify Common Top 20% Brain Regions Across Cohorts
# Author: Yuan Zhang
# Date: 2025-07-25
#
# Description:
# This script:
# 1. Loads Brainnetome (BN) atlas and Shirer network mappings.
# 2. Loads the top 20% ROI indices (based on CCA weights)
# ... |
760e972d49fe7459acbf7a632fe6eda032ade194dba953fe21c2cb0a2cecf5e0 | R | 3,856 | 129 | library(mgcv)
library(emmeans)
library(eegUtils)
library(ggplot2)
library(dplyr)
library(patchwork)
library(e1071)
library(DHARMa)
df_combined <- readRDS("C:/df_combined_exponent.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender)
df_combined$ROI ... |
683ddad5a4963dfb5c28b6e831c243a473cca81317cd2dfe4eeaaab989bb0a70 | R | 3,862 | 98 | # 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-9219S
# Email: vbucci@umassd.edu
# Web: www.vannibucci.org
#--------------------------------------------------------------------... |
5f18fd40830ad0d5698f4b9da681219cc8a088c18a36ba049f4d5662475f078c | R | 3,879 | 74 | #Extended_data_Fig. 1b_1c
# UMAP showing the sample classification by condition and tissue
library(magrittr)
library(tidyverse)
library(Seurat)
library(future)
library(ggplot2)
library(patchwork)
##Load integrated data using relative path
data_path <- "data/ganglia_seurat_object.rds"
if (!file.exists(data_path)) {
... |
357a5b2d47d71de2b0d68d84c213bf5d49ed6f9349b07db06838e2ffff6a6a4b | R | 3,892 | 84 |
---
title: "Update CellChatDB by adding user-defined ligand-receptor pairs"
author: "Suoqin Jin"
output: html_document
mainfont: Arial
vignette: >
%\VignetteIndexEntry{Update CellChatDB by adding user-defined ligand-receptor pairs}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r setup, in... |
9f94d0a8755a8c16b174fd336fad9878ff8526da2c291d06e1a033614be19289 | R | 3,916 | 160 | ########################################################
###### Run Common Factor GWAS on Disease Groups ########
########################################################
#########
## CVD ##
#########
### Set arguments from pbs script ###
args = commandArgs(trailingOnly=TRUE)
n_start <- args[1] #Nstart
n_stop <- arg... |
4c02c1b6b75b053e50cdf192d476ee0e90f7d030140be6d85da2161ccb5c5788 | R | 3,924 | 99 | library(dplyr)
library(ggplot2)
library(ggpubr)
library(stats)
library(tidyr)
load_adni <- source("~/R/DDLS-R/load_adni.R")$value
adni_data <- load_adni()
ucsf_xsectional <- function() {
# Load all Longitudinal UCSF datasets
ucsf_data1 <- ucsffsx51final
ucsf_data2 <- ucsffsx51
cols <- intersect(colnames(u... |
86b57d9a210e7c253ef8e475a1476a1798ba4addc126c18c6877c33142a143f4 | R | 3,945 | 141 | ---
title: "Data_Cleaning"
author: "Bernard Asanbe"
date: "2025"
---
Installation and loading of packages
```{r}
# Installing required packages (only if not already installed)
install.packages(c("sf", "readxl", "writexl", "dplyr", "terra"))
# Load required packages
library(sf)
library(readxl)
library(wr... |
0b254c2310a74d7c7498f77c32d6bf1faf40e8c87205dc45f3c48bec5dc11d02 | R | 3,947 | 90 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
source("git_deepATAC/function/augmentation_function_tiling_sliding_window.R")
require(vlfunctions)
# Import folds ----
dat <- readRDS("db/folds/bulkATAC_folds.rds")
# Import bw metadata for coverage ----
bw <- as.data.table(readxl::read_xlsx("Rdata/metadata_... |
ee78db2a98b7f7a56a6d39dedc68345f18eea37c61031ace417662831444036e | R | 3,947 | 142 | ---
title: "Data_Cleaning"
author: "Bernard Asanbe"
date: "2025"
---
Installation and loading of packages
```{r}
# Installing required packages (only if not already installed)
install.packages(c("sf", "readxl", "writexl", "dplyr", "terra"))
# Load required packages
library(sf)
library(readxl)
library(wr... |
2ead1c016056a1202ab19a50feefaf21ce1b8559d90107241a341faf10063e0f | R | 3,956 | 86 | ############################################################
# Compare CCA Mode Scores Across Original and IQ-Controlled Models
# (Stanford Cohort)
#
# Author: Yuan Zhang
# Date: 2025-07-25
#
# Description:
# This script:
# 1. Loads the canonical variate scores (U for brain, V for behavior)
# from both original a... |
70ec1643f24747bbfe02bd6902b4d98aa5cbb026819ce8fd3d462cbfcc1753ea | R | 3,988 | 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_exponent.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gender... |
23e95940ea728f94516a30d511d388654a47ff2171d953f65a780d7645cb5829 | R | 3,990 | 101 | #!/usr/bin/env Rscript
#------------------------------------------------------------------------------
# Demo: Explore Pre-computed DESeq2 Results
#
# This script demonstrates how to load and analyze the pre-computed results.
# No large data files or package installation needed!
#--------------------------------------... |
905aad9de86810b598a702b7bdd428e98abaf54676f46058d25d784dce336423 | R | 3,998 | 149 |
#' The SmartMatrix Class
#'
#' @slot matrix
#' @slot meta.data Contains meta-information
setClass(
Class = 'SmartMatrix',
slots = c(
matrix = 'matrix',
row.data = 'data.frame',
col.data = 'data.frame',
misc = 'list'
)
)
SmartMatrix = function(matrix, row.data = NULL, col.data = NULL, misc = lis... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.