sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
21c4d0671b6098faa442a9dbaa4a3b0a62a9d073c27eafe73e2831f7c8f87bc4 | R | 7,453 | 220 | library(trackViewer)
library(dplyr)
library(RColorBrewer)
library(GenomicRanges)
library(magick)
library(pdftools)
library(grid)
base_dir <- "D:/Case_project/CHCHD10 alleviates Alzheimer’s Disease Pathogenesis data/Teresa update"
##############################################################################... |
8c331b9c99bd69fb8ea5877023be10de888d686035c0b30c56a6229fd6fae9a9 | R | 7,457 | 185 | library(biomaRt)
library(data.table)
library(dplyr)
library(GenomicRanges)
listEnsembl()
outp <- "/geschwindlabshares/RexachGroup/Xia_Data/QTL_fsVars/out"
source("/geschwindlabshares/RexachGroup/Xia_Data/My_R_libs/pci_snATAC_peakSet_w_Enh.R")
colors.ct <- c(ArchR::ArchRPalettes$stallion[c(1,5,3,11)], "#b9a802","#308ac... |
45247ed9327d84d40550a3f8bfba6ac6c78e704a0e477bcb17866ac3c7f09da2 | R | 7,459 | 289 | #!/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("-r", "--ref", required=TRUE, help="load rna RDS")
parser$add_argument("-q", "--quy", requ... |
735e1384ca83155c97f99f9905f64cb1e3561aeee6327d2d5d0c80d67facc06a | R | 7,461 | 230 | ##################################
# Plot malignant metaprogram scores across a heatmap stratified by assigned cell state
# Author: Kevin Johnson
# Date Updated: 2026.04.10
##################################
library(tidyverse)
library(RColorBrewer)
library(viridis)
library(openxlsx)
library(scales)
library(reshape2)
l... |
9aa04431c04d969044c8e6c93692cf616607c4ef7ad26dfe657422f10128f01a | R | 7,463 | 177 | suppressPackageStartupMessages({
library(readxl)
library(dplyr)
library(purrr)
library(stringr)
library(tidyr)
library(readr)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Validation")) &... |
06501e68896a5379ed2e181b8cfdfa4edb9c9f8e70e9f328b94f67de11e54ffe | R | 7,468 | 203 | library(Epi)
library(epicalc)
#############################
#Read command line arguments#
#############################
args<-commandArgs(TRUE)
ALL_TAXONOMY = sprintf("%s", args[1])
division = sprintf("%s", args[2])
aggregate_nr = sprintf("%s", args[3])
nr_by_index = sprintf("%s", args[4])
nr_hg_pre = sprintf("%s", a... |
f8a4813bb2e120b882d83d97a3a0a4170da83e5de9e3dc19428afc2f98f9077f | R | 7,471 | 229 | #!/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("-a", "--... |
3294bb3acf9926c96b2f1160d15e6998103f6d690ed07a4480f932faa8182606 | R | 7,494 | 150 | library(dplyr)
library(pheatmap)
library(Cairo)
library(ComplexHeatmap)
library(ggplot2)
library(dplyr)
library(tidyr)
########### Correlation coefficient ##########
# MOUSE
input_file <- paste0("/home/joonho345/1_Epilepsy_RNA/RNA_Human/10.Correlation/04.CellType_Matrix/01.Correlation_WholeGene_Allcelltype_1.txt")
cor... |
f5f057caf168dbe7634a0d694821a07c14b1a4c42009ef7a26d62e3fef8eddaa | R | 7,508 | 255 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# Script to explore pC1 inputs
#################... |
73c22501a6d8a3845ddf1375670efd0cf4e19bd6c7a828a3305d4cf169c2a74a | R | 7,517 | 175 | #' banc-alignment-false-positives — Pull reviewed alignment rejections into the forbidden-matches CSV.
#'
#' Reads `fafb_alignment_decision == F` rows from SeaTable and writes a
#' two-column (`root_id`, `cell_type`) blacklist that the Python aligner
#' consumes via `--forbidden-matches`. Written to BOTH the optic-lobe... |
cd319ebb1eba73b45dd3e97b6a814f06109297381c75ef4d1ff4ea8ec3fa168b | R | 7,521 | 171 | # ==============================================================================
# Script 12: Figure 2G - Cell vs Tumor CDH1 Alteration Barplots
# ==============================================================================
# Description: Generates CL/TCGA/FMI CDH1 alteration barplots and Fig 2F-style
# ... |
1d3594f961c3292e66e9bc5543805c8b5f1346e17207e84b3b61dbcb93199faf | R | 7,528 | 239 | #!/usr/bin/env Rscript
#Check if the optparse library is installed, required to parse arguments
`%notin%` <- function(x,y) !(x %in% y)
if(suppressPackageStartupMessages(require("optparse"))){
print("optparse is loaded correctly");
} else {
print ("trying to install optparse")
install.packages("optparse",repos="htt... |
4cdd3856187db5707fe5294188b1a9c837e75133983cd189d155e17d07694caa | R | 7,530 | 163 | library(tibble)
library(circlize)
#library(plotROC)
library(viridis)
library(zoo)
library(dendextend)
library(tidyr)
library(dplyr)
library(ggplot2)
library(RColorBrewer)
library(readr)
library(readxl)
library(here)
library(magrittr)
library(MetaNeighbor)
library(reshape2)
library(gplots)
library(conflicted)
library(Co... |
83df04e2138e061f9bce592bcbd1afb0b324741e3a25df7337dc0543960ae209 | R | 7,535 | 249 | #' Layer-level (group-level) boxplots
#'
#' This function uses the output of [sig_genes_extract_all()] as well as the
#' logcounts from the layer-level (group-level) data to visualize the expression
#' of a given gene and display the modeling results for the given gene.
#'
#' @param i A `integer(1)` indicating which ro... |
d9c838e502a44aa014c8b511798f2021778f4f1e6df1812492a2774c7923a042 | R | 7,546 | 239 | if(!require(Seurat))
remotes::install_github("satijalab/seurat", "seurat5", quiet = TRUE)
if (!require(dplyr))
install.packages("dplyr")
if (!require(SeuratObject))
install.packages("SeuratObject")
if (!require(BPCells))
remotes::install_github("bnprks/BPCells")
if (!require(lisi))
devtools::install_github("i... |
1985ff3b66d8d8988c3b569ca2cb4898e007fcdd8abdfaf1ffc265641047749b | R | 7,554 | 163 | #' Creates marker-based visualizations for cell type annotation
#'
#' Generates various visualizations based on marker-based cell type annotation results
#' stored in the `ann` object. Requires additional cell type metadata from the `meta`
#' data frame. Creates dot plots, bar plots, and facilitates faceting by cell ty... |
9e9a97c4759de3452cb62aad7197328cb831f16867ac2ffaf663179cbfe06789 | R | 7,555 | 167 | library('data.table')
library('GenomicRanges')
library('BSgenome.Zmays.ENSEMBLPLANT.4.41.1')
library('dplyr')
library('reshape2')
library('ggplot2')
# load SNPs and convert to Rle
snp_info <- fread('hmp321_agpv4_annotation.txt',header=T,sep='\t',stringsAsFactors=F,nThread=10)
# sanity check
# snp_gr <- GRanges(IRange... |
5f9c3e0de5339d5f0fc8bfe7fb1b14446ab2609c3a3b0a1b388d85eb53e32b6b | R | 7,556 | 250 | library(dplyr)
library(stringr)
library(ComplexHeatmap)
library(circlize)
library(paletteer)
integrated_model_paths <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\integrated_model" %>%
list.files(path = ., pattern = ".*", full.names = TRUE, recursive = TRUE)
abbrMapDf <- data.frame(
abbr=c("car... |
36b89a4f332c5f63f6287bf9549fd537589f1c337928c9a9f8ee655d5912678d | R | 7,559 | 211 | library(Seurat)
library(tidyverse)
library(qs)
library(Scissor)
library(CellChat)
library(rhdf5)
library(patchwork)
library(qs)
library(arrow)
library(scMetabolism)
library(ggplot2)
library(rsvd)
library(qs)
options(stringsAsFactors = FALSE)
multi_surv_df <- qread('data/TCGA-GBM_meta.qs')
final_tpm <- qread('data/TC... |
fe6fe19080b5f30ed6c6508010db7151ed982a3c81613b67c0fb3ceacf318d06 | R | 7,562 | 197 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
######################
### load libraries ###
###... |
c6a73ec812e42f0b013b5bd064a0e7ba80d65c82a118f79a3005df4e10f0ce17 | R | 7,563 | 285 |
reformat_annotations <- function(
annotation,
start.pos,
end.pos,
collapse_transcript = TRUE
) {
total.width <- end.pos - start.pos
tick.freq <- total.width / 50
annotation <- annotation[annotation$type == "exon"]
exons <- as.data.frame(x = annotation)
if (collapse_transcript) {
annotation <- spl... |
1a25962259416c4b8fdbbd5a673b49a89762061c7b06f876539e756f2a3b0bee | R | 7,571 | 245 | # ===============================================================
# 🧪 Table Analyzer — One-way ANOVA Module (Validated Version)
# ===============================================================
one_way_anova_ui <- function(id) {
ns <- NS(id)
list(
config = tagList(
uiOutput(ns("inputs")),
uiOutput... |
755cb96eb9bdbcee212cb989f3c8a44e9d634d25fa1da7cde895b06565ad7f11 | R | 7,573 | 210 | #Modified from https://github.com/nolanlab/cytofCore
#Fixes the parameters in the flowFrame, based on information
#from the corresponding exprs matrix
#if desc is different from NULL, also sets the parmeter description
#(i.e. $PnS)
#Set the range from the data or from a fixed value
update_flowFrame_keywords <- function... |
c92561932c7711da8eee784f8618b8acd8b7f9083cc1f41d7a3c2d57ad0228e1 | R | 7,573 | 237 | ################################################################################
# GO enrichment analysis (mouse; clusterProfiler) for Up/Down DEGs
#
# - No hard-coded absolute/local paths
# - Input/output provided via command-line arguments
# - Mouse annotation: org.Mm.eg.db (SYMBOL -> ENTREZID)
#
# Usage:
# Rscrip... |
e0c6f305cdb78e01e709551ba1e9a136f393e739cadd6aa0d4293e90dec57306 | R | 7,574 | 234 | ---
title: "XGboost for the feature importance for each potentially causally linked metabolic measure"
author: "Joonatan Palmu"
date: "`r format(Sys.time(), '%d.%m.%Y')`"
output:
rmdformats::robobook:
self_contained: true
thumbnails: false
lightbox: true
gallery: true
---
```{css, echo = FALSE}
.page... |
16c1747bac771014d556f949ef0a363d8618cb18f38c0c4bac7a45a68fd6952b | R | 7,577 | 192 | suppressPackageStartupMessages(require(optparse))
suppressPackageStartupMessages(require(plyr))
suppressPackageStartupMessages(require(dplyr))
#' Arguments for seqz #####
outdir <- snakemake@params[["outdir"]]
prefix <- snakemake@params[["prefix"]]
seqz_gz_file <- snakemake@input[[1]]
break_method <- s... |
23166ec6387cdf308ba925bf8d2aae372f61c7ba2b783f0608269531d6ef4045 | R | 7,580 | 135 | randomeffects_jackknife <- function(sumstats, merged_annotations,num_blocks,block,genomewide_correction,output_jackknife_h2, overdispersion, slope_correction, bivariate = FALSE, intercept = TRUE){
#Estimate h2 using all genes
if (overdispersion == TRUE){
if (intercept == TRUE) {
X = as.matrix(cbind(sumsta... |
f9cc5ff9b2a31e15146326018526c2052aa810b5e35b75953284947fe8f061ef | R | 7,583 | 173 | # 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(ggdensity)
library(ggseg3d)
library(cifti)
library(stringr)
library(factoextra)
library(matrixStats)
li... |
603687235e8ec46b8dd88d314c9a5eca907b4d2c49de8d87129b484c928097f3 | R | 7,603 | 188 | #' @title Regression tests for symptom mapping (fast)
#'
#' @description
#' Lesion to symptom mapping performed on a prepared matrix.
#' Regressions are performed between behavior and each column
#' of the lesmat matrix. Fast function based on compiled code.
#'
#' @param lesmat matrix of voxels (columns) and subjects (... |
fe346ebc4a08d776d9f51b4a451ad4336730d4c3e7b04f72bf379044d55f5a84 | R | 7,609 | 179 | library(ggpubr)
library(MOFAdata)
library(MOFA2)
library(tidyverse)
setwd("/pastel/Github_scripts/ROSMAP-MOFA")
# C2: curated gene sets from online pathway databases, publications in PubMed, and knowledge of domain experts.
data("MSigDB_v6.0_C2_human")
# C5: extracted from the Gene Ontology data.base
data("MSigDB_v6.... |
40a85d0d9e04d64593cdda53ee87dc122857df5926e5765407aed1b97967a4e4 | R | 7,617 | 195 | here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS9.R")
library(tidyverse)
library(patchwork)
library(ggbeeswarm)
library(ggrepel)
library(here)
wd <- here("data/neural_differentiation_dataset/CroCoNet_analysis/")
source(here("scripts/4.paper_figures_and_tables/helper_functions.R"))
fig_dir <- here("data/pa... |
55c188704e7d00a877b939cbdb97eb3f1adfecf67709bbb94e0b0e5875486d6d | R | 7,618 | 179 | skip_if_flywire_materialize_unavailable(
message = "Skipping CAVE tests: FlyWire materialize service unavailable"
)
test_that("cave query", {
expect_message(res <- flywire_cave_query('nuclei_v1', datastack_name = 'flywire_fafb_production', limit=10, version = 349),
'no longer available')
expect_equal... |
eccc80832f576c64a60bcac35f34fdef9fa5dc05b53a02b0d3462e3df9002cae | R | 7,621 | 235 | # Environment ------------------------------------------------------------------
library(here)
library(tidyverse)
library(lme4)
library(ggplot2)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------------------------------------... |
59e62c93800e77133bac14dd08c521f17fc7e1560b38cbe57213f87f06114014 | R | 7,625 | 234 | # Environment ------------------------------------------------------------------
library(here)
library(tidyverse)
library(lme4)
library(ggplot2)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------------------------------------... |
6cd44936a2b84932f14dfbd5a53cbd705e75571c815684ceb749aa8e807ff8a1 | R | 7,625 | 208 | library(dplyr)
library(stringr)
library(tidyverse)
library(survival)
library(survminer)
attrTitleVsName <- "D:\\work2\\t2dAndComplicationsUkb\\data\\vs\\attrTitleVsName.xlsx" %>%
openxlsx::read.xlsx(., sheet = 1)
attrTitleVsName$fieldTitleAdj <- make.names(attrTitleVsName$fieldTitle)
trait3 <- "D:\\work2\... |
9ea32de0ad06c03155a755107e97b42e8be236e66dcf07f8b707cc14b3cb9762 | R | 7,625 | 204 | ---
title: "Seurat_tail_annotations"
output: html_document
date: "2025-07-10"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Load libraries
```{r}
library(dplyr)
library(Seurat)
# Make it so my computer can actually run this code
#options(future.globals.maxSize = 1024^4)
```
Load tail file... |
06c5392fc8dab6c6ac77f1354224825a4877db13723bd0bcdd6557bbd411734f | R | 7,648 | 220 | #' strhet_mvmr
#'
#' Calculates the conditional F-statistic for assessing instrument strength in two sample summary multivariable Mendelian randomization through minimisation of Q-statistics.
#' The function takes a formatted dataframe as an input, obtained using the function [`format_mvmr`]. Additionally, covariance m... |
443eff1e15d725e6c5c09ed94859f346a8217606ff5faf7159c4aec7656ed79f | R | 7,664 | 130 | #' Plot the distance matrices of replicates based on module connectivity patterns
#'
#' Plots the pairwise distances between replicates based on module connectivity patterns for one or more modules.
#'
#' As part of the CroCoNet approach, pairwise module preservation scores are calculated between replicates, both withi... |
445a8950ac97b2c77305d4a2750a6e9623cc826f6886fef43a5b712afb1b8a17 | R | 7,667 | 321 | ---
title: "Run association of Rosmap and BDR DNA methylation 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: breezedark
theme: lumen
toc: true
number_sections: true
... |
86275ee665a3d43e1b29a33b53ccbf9722dc3a92b565bf743af348fa6a273764 | R | 7,681 | 180 | library(Seurat)
library(Matrix)
library(ggplot2)
library(plyr)
library(tidyverse)
library(tidyr)
library(dplyr)
library(ggpubr)
library(reshape2)
library(rio)
library(data.table)
library(harmony)
library(GeneOverlap)
library(readr)
library(DropletQC)
library(xlsx)
library(biomaRt)
library(stringr)
source('~/SCRIPTS/uti... |
9bc797d33223e3b6f1d07ce6e7d195c42495bb38fec3780cb334d82c3e4b5515 | R | 7,689 | 235 | # Environment ------------------------------------------------------------------
library(here)
library(tidyverse)
library(lme4)
library(ggplot2)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------------------------------------... |
e9c503b9d118159c211b15d74e92ef689a7081c99ee20c9f9ef244a6f63cc9a6 | R | 7,697 | 184 | library("methods")
library("glmnet")
library("stringr")
library("data.table")
library("dplyr")
args <- commandArgs(trailingOnly=TRUE)
###### I. paramter ######
tissue="breast" #breast, prostate
batch="2024"
model="ENF"
wk="./TWAS_2024/"
snpsets=c("200","500","1000","1500","2000","3500")
chrom <- as.character(args[1]... |
ca49791bba53865bb219999dd8e288206d378e81bdc0b85295385f067468faea | R | 7,706 | 184 | #!/usr/bin/env Rscript
#-------------------------------------------------
# Title: Use IsoformAnalyzeR to convert transcript abundance --> gene counts
# Author: Amanda Zacharias
# Date: 2023-07-06
# Email: 16amz1@queensu.ca
#-------------------------------------------------
# Notes -------------------------------------... |
e64aa80b4dca5b90d4b2afb4365c2f483f3091822100ad665be59faa176c9a9e | R | 7,706 | 120 | #' Generate the Dunedin Methylation Pace of Aging Scores!
#'
#' \code{PACEProjector} returns the Dunedin Pace of Aging Methylation Scores
#'
#' @param betas A numeric matrix containing the percent-methylation for each probe. Missing data should be 'NA's. The rows should be probes, with the probe ID as the row name, a... |
eefd87285e44903fdeb75188c7fd59cdc21ad80cc4647df71dbb0f30d7ffaa30 | R | 7,711 | 192 | ### R code from vignette source 'TitanCNA.Rnw'
### Encoding: UTF-8
###################################################
### code chunk number 1: TitanCNA.Rnw:76-81
###################################################
library(TitanCNA)
infile <- system.file("extdata", "test_alleleCounts_chr2.txt",
... |
98b481c76bb48fb903d68aec66cd410162ea13e25f5472d3df5bf7f5f48386a4 | R | 7,712 | 162 | ##################################
# Derive and annotate MPs for Undifferentiated malignant cells in the CAREmut dataset
# Author: Kevin Johnson
# Date: 2026.04.02
##################################
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir <- file.path(proj_dir, "figures")
out_data_dir <... |
b29de0a2454f5ec3de76528f5dd545a14bb2eaea1966d63b670810883c9bbb2b | R | 7,714 | 238 | library(tidyr)
library(shiny)
library(ggVennDiagram)
# devtools::load_all(path = rprojroot::find_root("DESCRIPTION"))
library(ggplot2)
library(bslib)
library(colourpicker)
library(export)
# SHINY UI ------------------------------------------------------------------
ui = page_sidebar(
theme = bs_theme(version = 5),
... |
a011e9119f14a45a81433fabb6ddbac281affc05100c6391e4adf64a521f98d0 | R | 7,715 | 141 | library(ggplot2)
file_path <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/08.Enrichment/GSEA_03.Output/gsea_report_for_MTLEALL_GOBP_1000_new_revision.tsv"
file_name <- "_1000_new_revision"
df <- read.delim(file_path, header = TRUE, stringsAsFactors = FALSE)
# Create a flag for significant terms (p < 0.05) before modif... |
f10ded50142112a12d863032f6e0caa81157b2004718f3aac340dd2f0b5b4ddc | R | 7,720 | 203 | library(haven)
library(DataExplorer)
library(dplyr)
# Modified data preparation script for synthetic COPD dataset
# This script processes the synthetic dataset created by create_toy_dataset.py
# to match the expected format for the AEnabledLoReg pipeline
# Load synthetic data (CSV format instead of SAS)
prevent_file ... |
91863da51bb33664a2962b36402903b9cba18859625a0c6e1f910eab08627f5f | R | 7,722 | 223 | ---
title: "fROI Overlap Statistical Analyses"
output: html_document
---
```{r, echo=TRUE}
knitr::opts_chunk$set(echo = TRUE)
library(lmerTest)
library(dplyr)
library(readr)
library(emmeans)
library(multcomp)
library(tidyr)
```
```{r}
extract_stats <- function(m, coef_names) {
model.df = data.frame(coef_names, summ... |
2896c8b85ba808f4763014afcc4a918905c12e5c214c45e7e84e7f63ddef63a6 | R | 7,735 | 164 |
#install.packages
library(Seurat)
library(ggplot2)
library(DoubletFinder)
library(dplyr)
library(cowplot)
library(reshape2)
library(MAST)
#load in data from Cell Ranger or other counts data ====
#for loading Cell Ranger counts:
setwd("/athena/ganlab/scratch/lif4001/DVPV/DF_2ndRound")
DVPV_CTX_311 <- readRDS(file = ... |
e3b03ecae91de120ae547d4f6cb883b069e1bbb4c03162f5fefd7ff7fa70c3dc | R | 7,735 | 166 |
# wd <- '/net/mraid20/export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
library(tgstat)
source(file.path(wd, 'scripts/util.r'))
mcmd <- readr::read_tsv(file.path(wd, 'output/metacell_model/mcmd_pl_cort.tsv'))
mcmd <- mcmd[-c(602:603),]
cust_st_ord <- c('OPCs','Astrocytes','NSC','IPC_cyc', 'IPC', 'iC... |
e3072bac0da23dbe2df3471bbdb0480235495ea262b483b0378c4f3692a10b8a | R | 7,736 | 207 | # NB `server` is part of the memoise key — without it the cache collides
# whenever two datasets share a Root UUID but live on different DVID servers
# (e.g. public `male-cns:v0.9` on emdata-mcns vs production CNS DVID).
# Querying the wrong server returns a DAG that does not contain the expected
# neuprint snapshot no... |
553dc3a62fcc24b9d682db5bf50b0037f5a201167991e4685ada43ca7bd69d58 | R | 7,739 | 295 | test_that("Test removeOutliers", {
set.seed(123)
x1 <- rnorm(20, mean = 5, sd = 0.5)
y1 <- rnorm(20, mean = 5, sd = 0.5)
x2 <- runif(5, min = 10, max = 15)
y2 <- runif(5, min = 10, max = 15)
coords <- data.frame(x = c(x1, x2), y = c(y1, y2))
new_coords <- removeOutliers(coords, k = 5, dista... |
b3d2b14eb054196099f58d5a1e7155e861cab258c8b69a7a23f3d10d80780fa1 | R | 7,740 | 201 | #' banc-calculate-skeletons — Skeletonise OBJ meshes into radius-bearing SWCs.
#'
#' Uses `fafbseg::skeletor()` (Python skeletor). Proofread neurons only;
#' tracks failures in `banc_failed.csv`, retries on Saturdays.
#'
#' @section Reads:
#' - OBJ meshes, SeaTable `banc_meta`
#'
#' @section Writes:
#' - `<banc.swc... |
ebe9d35b8f7330874648d1f64b5aa2ff7590b264477cd4f51a7b37bc3c34e6b4 | R | 7,751 | 155 | ##################################
# Derive and annotate malignant MPs for CAREmut dataset
# Author: Kevin Johnson
##################################
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir <- file.path(proj_dir, "figures")
out_data_dir <- file.path(proj_dir, "processed_data")
script_di... |
2ae244fb4f17ee758b1ad0ad7b5b7f493431089bf6b67eb3a730093f541af84f | R | 7,755 | 182 | test_that("flywire_partners / flywire_partner_summary works", {
token=try(chunkedgraph_token(), silent = TRUE)
skip_if_not_installed('reticulate')
skip_if(inherits(token, "try-error"),
"Skipping live flywire tests")
skip_if_not(reticulate::py_module_available("cloudvolume"),
"Skipping li... |
e3c82caf0d9e385eb751575f274f5c62fcc7d184e97952e47ece24938cca74f9 | R | 7,760 | 186 | ### Comparative lipid analysis between In vitro and In vitro Experiment #2
setwd(rstudioapi::getActiveProject())
rm(list = ls())
library(tidyverse)
library(ggpubr)
library(ggtext)
source("./Scripts/Function_scripts/Effect_size_functions.R")
source("./Scripts/Function_scripts/Pre-processing_functions.R")
load("./Outpu... |
cebea4724238a65b8aa41be7682d13d870946660d02f3b11e0b6781d441b8b65 | R | 7,764 | 231 | ################################################################################
# TailScore computation and visualization
#
# TailScore definition:
# TailScore = mean(z(up genes)) - mean(z(down genes))
# where z is computed per gene across all cells (mean=0, sd=1) using log-normalized
# expression (Seurat "data" slo... |
312b64d2d0e976654c90fea8e488674155a3604f3d73189ed0473e1af22ef027 | R | 7,768 | 191 | #!/usr/bin/env Rscript
suppressPackageStartupMessages({
if(!require(optparse)){ install.packages("optparse"); library(optparse) }
if(!require(data.table)){ install.packages("data.table"); library(data.table) }
if(!require(dplyr)){ install.packages("dplyr"); library(dplyr) }
if(!require(tidyr)){ install.package... |
d88697f833a5b33cb2471012ee7a08052ad7eda518fd3c989a623b80c6bccf88 | R | 7,769 | 246 | ---
title: "Figure3_InferCNV"
output: html_document
date: "2025-04-19"
---
In this script, inferCNV is used to confirm malignant clusters identified by combined UMAP and cellranger cell type calls. seurat objects with dim reductions are imported (script 3) along with a gene order file produced in script 4. Output is i... |
70cf295d9aabd010897d3a22445c467786abeced576e01fb4ff2d848c819e7dd | R | 7,779 | 231 | ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
# Parameter settings
##### ##### ##### ##### ##### ##### ##### ##### ##### #####
setwd(file.path(getwd(), "R"))
source("00_directorySettings.R") # load baseDir, xeniumDir
source("00_settings.R")
dataDir <- file.path(baseDir, "data")
outDir <- file.path(baseDi... |
90b945a0ca49d5b7ce2c8aaee9c3ae98cf03725f22ca3f93482826b85afc5675 | R | 7,784 | 221 | # ==============================================================================
# Script 00: Load Cell Line Annotations and Histology Data
# ==============================================================================
# This script loads and prepares cell line annotation data including:
# - Histology classificatio... |
fe6df85cc6af1044da93215b1fef76eb65e157bba77e173a05233df2dd3c7b00 | R | 7,784 | 395 | # Reproducible workflow for
#RF and XGBoost bootstrap modeling
# --------------------------------------------------
# 1. Required Packages
# --------------------------------------------------
packages <- c(
"sf",
"dplyr",
"caret",
"ranger",
"xgboost",
"Matrix"
)
missing_packages <- packa... |
17f45e173552c4fed2f884fdad16e479b9015d38825a29f7c6aa8cc135639542 | R | 7,792 | 251 | library(circlize)
library(ggthemes)
library(colorspace)
#png("D:/PEA/pEA_overlap_chord.png", width = 5000, height = 3000, res = 600)
#pdf("D:/PEA/PEA_overlap_chord.pdf", width = 4, height = 2.5,
# family = "ArialMT", useDingbats = FALSE, pointsize = 12,
# paper = "special", compress = FALSE)
cairo_pdf("... |
be92b0d87c8c1aac2856c99ceecaff5150c7116b68f0b4601d1b87fdb26771f1 | R | 7,802 | 144 | suppressMessages(suppressWarnings({
library(Seurat)
library(dplyr)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(igraph)
require(VennDiagram)
}))
parser = argparse::ArgumentParser(description="Test paralog importance on cell marker genes")
parser$add_argument('-I','--input', hel... |
8a463f76c791cb1c5bc33fd26767214fab5cf4852d23c4374884dd0de7f9e33e | R | 7,807 | 221 | ### Data Preprocessing - Creating a long form dataframe from the FC matrices ###
# Install packages
#install.packages('stringr')
#install.packages('tidyverse')
#install.packages('readxl')
#install.packages('reshape2')
# Packages
library(stringr)
library(tidyverse)
library(readxl)
library(reshape2)
######### Setting ... |
59fade7c85865ea4d5eadfab7be588f672d1db0b8363e183536bef4ac12dff27 | R | 7,809 | 196 | ##################################
# Representative gene expression heatmap for malignant metaprograms
# Author: Kevin Johnson
# Date Updated: 2026.04.10
##################################
library(tidyverse)
library(RColorBrewer)
library(viridis)
library(ggpubr)
library(EnvStats)
library(scales)
proj_dir <- "/vast... |
e3daf9ee3cdfd7e26c4340e7f1e7cb5b34259b20a29d3b571f87d2e6d13121a1 | R | 7,809 | 196 | get.gtdb.mapper <- function() {
require(stringr)
require(readr)
require(dplyr)
add.prefix.to.silva <- function(x) {
if (is.na(x)) return(NA)
if (str_count(x, ";") != 6) return(NA)
return(gsub("(.*);(.*);(.*);(.*);(.*);(.*);(.*)",
"d__\\1;p__\\2;c__\\3;o__\\4;f__\\5;g__\\6;s__\\7",... |
6fc2f1b8e8816706a4a847c124741ccae2e29117e34973f2e101bbc5f2fbc50f | R | 7,815 | 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("-r", "--ref", required=TRUE, help="load rna RDS")
parser$add_argument("-q", "--quy", requ... |
a9f6fa33896c6fce253df6483b0aa64c16b1abbba2c8732635fe8817692f9d49 | R | 7,815 | 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("-r", "--ref", required=TRUE, help="load rna RDS")
parser$add_argument("-q", "--quy", requ... |
8de54a8f711ce0b8c0135529e1ec3149656b5415e7b890edf28e7213dea93eac | R | 7,819 | 194 | ---
title: "iNeuron_analysis"
output: html_document
date: "2025-11-20"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(ggplot2)
library(dplyr)
library(tidyr)
library(Seurat)
library(DoubletFinder)
library(readr)
```
Let's just load and process the dataset with Seurat
```{r}
wpi1... |
a31779732140fa7b15e43bbc8c08917e3ca6a011394a8160955816f93eeef194 | R | 7,831 | 147 | suppressMessages(suppressWarnings({
library(Seurat)
library(dplyr)
library(ggplot2)
library(ggpubr)
library(cowplot)
library(igraph)
require(VennDiagram)
}))
parser = argparse::ArgumentParser(description="Test paralog importance on cell marker genes")
parser$add_argument('-I','--input', hel... |
801f91303914da14e7355bac326d5d48a492015966ace5dd408b9e1023e7f9d8 | R | 7,839 | 197 |
### ----------------------------------------------------------------------
rm(list = ls())
library(tidyverse)
library(ggthemes)
library("scales")
library(ggpubr)
library(ggbeeswarm)
library(stringi)
library(openxlsx)
library(eulerr)
## ----------------------------------------------------------------------------------... |
86299a601de7cf31270f2e8aa575a7bfeb4e726b24007320afb25452904ddd3c | R | 7,840 | 213 | #' strength_mvmr
#'
#' Calculates the conditional F-statistic for assessing instrument strength in two sample summary multivariable Mendelian randomization.
#' The function takes a formatted dataframe as an input, obtained using the function [`format_mvmr`]. Additionally, covariance matrices
#' for estimated effects o... |
97dc7b986e5cd3d80b5d65dedc883ae7530a09e57b1b8f041243a0c0bd0d7253 | R | 7,848 | 224 | #!/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("-r", "--ref", required=TRUE, help="load rna RDS")
parser$add_argument("-q", "--quy", requ... |
3e7fbc513d7f5ceb8562852e0acd47290e0398725160fbf47cb268314052d229 | R | 7,850 | 153 | library(dplyr)
library(pheatmap)
library(Cairo)
library(ComplexHeatmap)
library(ggplot2)
library(dplyr)
library(tidyr)
########### Correlation coefficient ##########
# MOUSE
input_file <- paste0("/home/joonho345/1_Epilepsy_RNA/RNA_Human/10.Correlation/05.GO_Matrix/01.Correlation_WholeGO_upper_Mouse_FILTERED.txt")
corr... |
1af93eba956e5bacef04f970f78262610706cdee02630dfc5c37af213febed3d | R | 7,856 | 200 | ### Overlapping lipid analysis between In vitro and In vitro Experiment #2----------------------------------------------------------------------
rm(list = ls())
library(tidyverse)
library(ggthemes)
library("scales")
library(ggpubr)
library(ggbeeswarm)
library(stringi)
library(openxlsx)
library(eulerr)
## ------------... |
3697171670ec88acd9fbc594a516a7139eb175a179a59dcb0243dece29dd7b53 | R | 7,863 | 241 | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' @title Fast Brunner-Munzel tests (v1)
#'
#' @description
#' Takes a binary matrix of voxels and a vector of behavior
#' and runs Brunner-Munzel tests on each voxel.
#' This is a fast functio... |
cb016846fc83896f9a270740bda22a3730a9ed21530b6100b6a6895ca7f747fd | R | 7,867 | 223 | # Suppress R CMD check NOTE about data.table NSE
utils::globalVariables("x")
select_top_n<-function(scores,n_top){
d <- data.frame(
x = data.table::copy(scores),
indice=seq(1,length(scores)))
data.table::setDT(d)
data.table::setorder(d,-x)
n_top_indice<-d$indice[1:n_top]
return(n_top_indice)
}
#'... |
5658588135d726f88773ddb43e3ff539c32ae2ead75e879afe8ce37cb4a52251 | R | 7,870 | 161 | ## Boilerplate
## Start
library(metacell)
# devtools::load_all("~/src/metacell.flow")
library(metacell.flow)
library(princurve)
library(vioplot)
# wd = '/net/mraid20/export/tgdata/users/yonshap/proj/mmcortex'
wd <- '.'
# setwd(wd)
set.seed(1337)
db_path = file.path(wd, 'scdb')
if (!dir.exists(db_path)) {d... |
b7ace7e981dfa7f35c2ef1b5ea8ecbc9adc6dd9abce665ee23abe04e695891b4 | R | 7,872 | 204 | #' Quality Control for Spatial Data
#'
#' This function identify spots in a
#' [SpatialExperiment-class][SpatialExperiment::SpatialExperiment-class] (SPE)
#' with outlier quality control values: low `sum_umi` or `sum_gene`, or high
#' `expr_chrM_ratio`, utilizing [scuttle::isOutlier][scuttle::isOutlier]. Also identif... |
535b40735314d864301c20b9252d2d6b1cf52a69af709497186501e8e0bcd584 | R | 7,877 | 219 | rm(list = ls())
library(dplyr)
library(plyr)
library(Seurat)
library(ggpubr)
library(reshape2)
library(tidyr)
library(tidyverse)
library(DropletQC)
source('~/SCRIPTS/utility_functions.R')
# Load datasets
ourseur = read_rds('~/workdir/01_MACAQUE/OUR/02_CELLBENDERED_CLUSTER/Macaque_Putamen_Our_Clustering4.RDS')
heseur =... |
930e28c14ccba3da10c2fa65d70c0b1234a2667ff7d072df26b0b10d730389b3 | R | 7,882 | 232 | ##########################################################################################
# S4Vectors/BiocGenerics Within Methods
##########################################################################################
#' Negated Value Matching
#'
#' This function is the reciprocal of %in%. See the match funciton i... |
ed0c7bb559e51e05d564de754319735bcace8642299fd9a02e90fdcf84c76dad | R | 7,882 | 161 | # 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... |
b7d09551add153a8f98f22e070bc3b7db0a199e885edc3c769027d62f8cfafef | R | 7,903 | 117 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/daab6ea5-962c-4eb4-a9d1-2a4d7c2176a0 ####
##... |
3308f5bae76feff5dd652fb8c6831ed643bfdcf30802a7f40534c72544cfca07 | R | 7,922 | 192 | #############################################
### Calculate MANC flow centrality splits ###
#############################################
source("banc/banc-startup.R")
manc.confidence.threshold <- 0.05
nt.cols <- c("gaba", "acetylcholine", "glutamate", "octopamine", "serotonin", "dopamine", "neither")
# File paths
spl... |
487943b61b89117f75551f1bd89e2b9063e840e6e1e0f484377f483cb8a3b89c | R | 7,929 | 313 | ---
title: "Add annotation to comb-p results generated externally."
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
number_sections: true
... |
1ab415bf5fc7fe00bf1e89f55cc5c3cfa8e81e8613ac03a018682b00706be9a0 | R | 7,943 | 210 | # ============================ SETUP ============================
suppressPackageStartupMessages({
library(Seurat)
library(dplyr)
library(tibble)
library(ggplot2)
library(progress)
})
# ============================ PATHS ============================
base_dir <- "/home/cxy605/Synapse/ROSMAP_scRNAseq/OPCs... |
55ed4452db5356bfe082ed7d54a0f7e09aad4b901590dc49e5a773cce546d070 | R | 7,944 | 195 | #' banc-delete — Delete redundant / stale per-neuron data files.
#'
#' Sweeps the per-neuron file trees (OBJ, SWC, L2 SWC, split SWC, synapses,
#' images) for files whose root_id no longer appears in SeaTable, removes
#' them, and reports coverage statistics per tree.
#'
#' @section Reads:
#' - SeaTable `banc_meta`
#... |
52c20b96d26c0c6fb63dfc780d254d677565a9dce6c5c570f13d92cdba70938d | R | 7,951 | 212 | library(dplyr)
library(plyr)
library(Seurat)
library(ggpubr)
library(reshape2)
library(tidyr)
library(tidyverse)
library(DropletQC)
source('~/SCRIPTS/utility_functions.R')
# Load datasets
ourseur = readRDS("/home2/gkonop/workdir/01_MACAQUE/OUR/02_CELLBENDERED_CLUSTER/CAUDATE/ANNOTATION/Macaque_Caudate_Our_Annotated_FI... |
3807634cc69eeaafa4f06c7af4136c2cabab1f26e681f85f3e1cff20cb030387 | R | 7,966 | 206 | library(Matrix)
library(data.table)
library(protr)
library(parallel)
#indf needs at least three columns: "endpoint", "uncert", "aa_substitutions"
#default: use number of instances of location and transition types.
#toadd: existence of mutation types. conjoint triad category transitions
#noagg ignores the aggregation t... |
41e82e400a444068efcca68e77e28468ad02719ea4ce60a5919879dd85881395 | R | 7,970 | 210 | #!/usr/bin/env Rscript
suppressPackageStartupMessages({
library(Seurat)
library(ggplot2)
library(dplyr)
})
# ============================================================
# Purpose
# ============================================================
# A general, reusable UMAP plotting utility for Seurat objects.
#
# S... |
d768ac5ff8e090203109cb8503274f5e9a7b03767fe97dc58e7bb0ea026314e5 | R | 7,980 | 186 | library(Seurat)
library(Matrix)
library(ggplot2)
library(plyr)
library(tidyverse)
library(tidyr)
library(dplyr)
library(ggpubr)
library(reshape2)
library(rio)
library(data.table)
library(harmony)
library(GeneOverlap)
library(readr)
library(DropletQC)
library(xlsx)
library(biomaRt)
library(stringr)
source('~/SCRIPTS/uti... |
d1753d78ab3e408c3f6b431753eeb4f1e8eb1b790a0be86f5da511a039992edb | R | 7,987 | 251 | ---
title: "04 — Visium Integration: Basak + Weber, Annotation"
---
This script integrates the four Basak Visium sections with the published Weber
et al. (2024) LC Visium data, annotates the resulting spatial clusters, and
saves the final annotated object used for all Visium figures.
Inputs:
- `output/03_visium_bas... |
1ffce7cb178a7ce8d20fc75cd81d07638641b79ca5ecc34653f9ba9406a01498 | R | 7,991 | 222 | ####################################
### COLLATE BANC BRAIN INFLUENCE ###
####################################
source("banc/banc-startup.R")
overwrite <- TRUE
n_cores <- max(1, parallel::detectCores() - 1)
####################
### WRANGLE DATA ###
####################
# Get current meta
banc.meta <- banctable_query()... |
2f519af48107e82f7afc56dba269f89342c2f143c9ade801498caefe99284b23 | R | 7,992 | 158 | library(tidyverse)
library(lsr)
get_intro_df <- function(intro){
obs_pi <- read.table(paste0("data/introgression_scans/bed_files/", intro, "_intro.merged.diversity.bed"),
col.names = c("chrom", "start", "end", "pi"))
obs_pi$t_dist <- read.table(paste0("data/introgression_scans/bed_files/", i... |
404638851bd15a98c5cb84641b84643f8f95cb9e1dede92673281bcf2fafb278 | R | 7,994 | 226 | rm(list = ls())
library(Seurat)
library(Matrix)
library(ggplot2)
library(plyr)
library(tidyverse)
library(tidyr)
library(dplyr)
library(ggpubr)
library(reshape2)
library(rio)
library(data.table)
library(harmony)
library(GeneOverlap)
library(readr)
source('~/SCRIPTS/utility_functions.R')
set.seed(1234)
# Subset non-spn... |
32ecb7a746fd07333be657a8ffbcfb75c5fb668c8fafe69e8c0ffbdfbda725b4 | R | 7,995 | 177 | #' banc-publish-synapse-lookups — Publish version-stable syn_id → neuropil/region/side parquets.
#'
#' Synapse `id` is stable across BANC root_id versions; downstream consumers
#' join once and reuse.
#'
#' @section Reads:
#' - per-version v1/v2/v3 neuropil parquets (inline paths)
#'
#' @section Writes:
#' - GCS `s... |
f8c567bc1151c522c4f5f14e9f83bf2426cc5f9727c953711ae938749f6e4fff | R | 7,995 | 272 | load('C:/research/paper/NL-HSIM/sorted_Group8.RData')
library(energy)
library(pheatmap)
source("C:/research/paper/NL-HSIM/environment.R")
source("C:/research/paper/NL-HSIM/nystrom_kpca_core.R")
source("C:/research/paper/NL-HSIM/preimage.R")
source("C:/research/paper/NL-HSIM/kpca.R")
source("C:/research/paper/NL-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.