sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
223e997ee705def41d17f9ad95f112b97618faf1fbfb01e39aa9db32054ed60f | R | 9,336 | 238 | # Training a multiclass classifier
# input
#' train_Data: a gene expression matrix (variable genes x cells)
#' train_labels = factor of labels
#' var.genes = features to use for learning
#' do.scale = whether we want to z-score the features
#' train.frac = fraction of cells in each ident we want to use for training
XGB... |
883557292e2f9f9394e637dce4a20623bb691b9d59479e22cd4d1231514f927e | R | 9,367 | 226 | ## helpers.R — shared utilities for r_notebooks/
## Loaded by every notebook with: source("helpers.R")
## Provides:
## - PROJ_ROOT, PROT_ROOT, OUT_DIR, FIG_DIR, CACHE_DIR
## - CROSS_OMICS / RECURRING / PAPER_TOP / ECM_FAMILY gene sets
## - vsn_with_fallback() — robust VSN that falls back to median-center
## - d... |
f076b58b64ab6b6e3de654e7b5225e9a1c223b3d6b9f13d83a80a92797d1d120 | R | 9,367 | 328 | ############################################################
# Visualize res$corr.Y.Cy as heatmaps
# for CMI and Stanford combined CCA analyses
# (flip all signs before plotting)
#
# Also create a scatter plot for a specific mode
# (default: Mode 2) using:
# brain = res$Cx[, mode]
# beh = res$Cy[, mode]
#
# Saves... |
47a77a343cbebab6c977cb98c5b5562682ecae7025db4a29348d880d52ce93f9 | R | 9,403 | 178 | #!/usr/bin/env Rscript
## 02_csf_timstof_dep.R — generated from notebook spec
## Run: Rscript 02_csf_timstof_dep.R
## ============================================================
## # 02 — CSF timsTOF proteomics: DEP/limma reanalysis
##
## Cell 2026 **timsTOF DIA** platform (Bruker timsTOF Ultra) — independent
## ... |
17c9e390a25b0b3effdf83b3485debfa292617c17350603c8940935a5f33b8eb | R | 9,417 | 222 | library(dplyr)
library(Rmisc)
library(ggplot2)
library(ggpubr)
library(stringr)
library(ggforce)
library(paletteer)
library(ggsci)
degrees <- c(2,3,4) #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-D... |
ca01ba846e45bda8eb184293f2783f422bc61087bf317582a25b7166188c556b | R | 9,439 | 288 |
# Usage:
# subclustered_dendrogram: function name
# dis_mat: path to dissimilarity matrix
# k: number of clusters to start with (default=3)
# k_increment: number of clusters to add at each iteration (default=5)
# max_size: maximum number of observations in each cluster (default=40)
################ subclustered dendr... |
939bea22b498893ccf45de26def3024a5d2f5bfc31225af081b4d30dcda070c2 | R | 9,483 | 330 | ###
# module load conda_R/3.6.x
library(jaffelab)
library(Seurat)
library(scater)
library(DropletUtils)
library(limma)
library(scrattch.io)
options(stringsAsFactors = FALSE)
library(org.Hs.eg.db)
library(GenomicFeatures)
library(vroom)
library(Matrix)
library(lattice)
library(RColorBrewer)
## location of data on clus... |
eef7c61db9a2097ed9e5ac05dc42886070fb1f1070ec74ea5b3a644c9347cc12 | R | 9,486 | 324 | ---
title: "02 Normalisation and Clustering"
output: html_document
---
```{r setup, include=FALSE}
# If running interactively from within /scripts, move up to project root
if (basename(getwd()) == "scripts") setwd("..")
# Now we are in the project root
knitr::opts_knit$set(root.dir = normalizePath("."))
knitr::opts_... |
8b112d370102ee9a8c2e4eed4dbdd19b2a844a8dfec394da3d1981b654a79617 | R | 9,490 | 147 | #set library paths and load libraries:
.libPaths(c("/lisc/data/scratch/molevo/agcole/R/libs/seurat4/","/lisc/data/scratch/molevo/agcole/R/libs/course24/","/lisc/opt/sw/software/R/4.5.0/lib64/R/library"))
setwd("/lisc/data/scratch/molevo/agcole/R/Aurelia_51k/Ac_manuscript_revision_ACOE")
library(Seurat,quietly=T)
pack... |
97119ae4af6e658a0c2a86e6bda56d84e9a64619e1765c8f9425dd6500991b9b | R | 9,539 | 223 | library('SingleCellExperiment')
library('here')
library('readxl')
library('limma')
library('sessioninfo')
dir.create('pdf', showWarnings = FALSE)
dir.create('rda', showWarnings = FALSE)
## Load data
load(here(
'Analysis',
'Human_DLPFC_Visium_processedData_sce_scran.Rdata'
))
## Functions derived from this sc... |
c01d497b33f8f50fcbbb0dd0ef7f2d3c078aa4628ce7fa857d721e7c8457018f | R | 9,563 | 309 | ########################################################################
# 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,
# ... |
02c0ac7199145455826858957aa065f3d770bbd57e68ccce8dddde6e4e948007 | R | 9,567 | 200 | ### This script investigates associations between anxiety and motion
#########################################################
#########################################################
### (A) Installing and loading required packages
#########################################################
if (!require("dplyr")) {
... |
ef0d974450f4e3b116b24f25dc11ce984365ee4bb44c703018981857ab4a43e1 | R | 9,652 | 200 | #load required libraries
library(Seurat)
library(SeuratWrappers)
library(Azimuth)
library(ggplot2)
library(patchwork)
library(SCpubr)
library(dplyr)
library(stringr)
library(ggnewscale)
# 1. Load and preprocess superior cervical ganglion (SCG) data
data.healthy <- '231208_snSeq_clean_up_hSCG_healthy_CBend3_threshold_1... |
e776023239979a2c631e040d462a229125c85374e9705b9bf34ad7cf6b0b41c3 | R | 9,712 | 328 | ---
title: "SpatialDE subsampling comparison"
author: "Lukas Weber"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output:
html_document:
toc: true
toc_depth: 2
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
```
# SpatialDE subsampling comparison
Comparison of ge... |
7e21814bebe838db11388504ae4b3f6ba61debde7fff9cda4e251199903c6a54 | R | 9,732 | 253 | # CSF_cfDNA_5mC_5hmC_analysis.R
# this file is meant to be used inside Rstudio
# this script takes in promoter methylation (5mC) & intragenic hydroxymethylation (5hmC) % per CpG site with fdr-corrected q values, groups by gene level
# and plots the promoter 5mC% or intragenic 5hmC% per gene (volcano plot) or per samp... |
467a0a6bb2ead155e2c8c9554d7bb3ef46a465c19b170750e8dede9d5592cf23 | R | 9,848 | 297 | ###
# module load conda_R/3.6.x
library(jaffelab)
library(Seurat)
library(scater)
library(DropletUtils)
library(limma)
library(lattice)
library(RColorBrewer)
library(Matrix)
library(parallel)
## read in data
pd = read.csv("mathys/snRNAseqPFC_BA10_biospecimen_metadata.csv", as.is=TRUE)
pheno = read.delim("mathys/filte... |
40abb27f549b5c8dd8db847e25da482c7c9df4b2fc6ebb94040f4327070ba928 | R | 9,925 | 204 | #Script that tests the retest reliability of the neural efficiency
#########################################################
### (A) Installing and loading required packages
#########################################################
if (!require("dplyr")) {
install.packages("dplyr", dependencies = TRUE)
library(dply... |
4f3d2b0c684438e9a13650f67994a69c456351418873bb2f68d705d85b678866 | R | 9,992 | 260 | # ===================================================================
# Retinal Cell Type Identification Using Known Markers
# ===================================================================
library(Seurat)
library(tidyverse)
library(patchwork)
# Load your Seurat object (if not already loaded)
# retina <- readRDS... |
4da882069c4e78ae853b52633324ce22917d68da52f79768f3e5b13c67baa41d | R | 10,012 | 190 | library(tidyverse)
library(stringr)
library(plyr)
library(tidyr)
library(wesanderson)
library(cowplot)
library(beepr)
library(data.table)
library(reshape2)
library(gridExtra)
library(purrr)
library(gplots)
library(RColorBrewer)
library(GenomicRanges)
setDTthreads(threads = 192)
#Gets first and last exons
firs_last_fun... |
83e0da2b5a799489e19181328c86588769bb22fd47a27c40da71a416f854a6a2 | R | 10,131 | 226 | .LOG <- function(..., file, print = TRUE) {
msg <- paste0(..., "\n")
if (print) cat(msg)
cat(msg, file = file, append = TRUE)
}
.get_renamed_colnames <- function(hold_names, userprovided, checkforsingle=c(), filename, N_provided, log.file,
warnz=FALSE, warn_for_missing=c(), stop... |
365b306eec2006caa853dbbd31f4c32a35156dd92c33d8140721506b30c9ab16 | R | 10,143 | 192 | #!/usr/bin/env Rscript
## 01_csf_astral_dep.R — generated from notebook spec
## Run: Rscript 01_csf_astral_dep.R
## ============================================================
## # 01 — CSF Astral proteomics: DEP/limma reanalysis
##
## **Cell 2026 (Skene/Mann)** Astral DIA — *single largest CSF proteomics cohort*... |
03416497c555826d7fd989b43a511cd037278cde0dc7bb1cd51186d9b5093468 | R | 10,160 | 225 | #' Simulate GWAS summary statistics for multivariate LDSC
#'
#' \code{simLDSC} simulates GWAS summary statistics across multiple phenotypes given a population genetic covariance structure, phenotypic correlations, sample sizes, and LDSC intercepts. Useful for testing multivariate LDSC pipelines or validating SEM-base... |
bde5fb8e28ccc33987e4dc76e21864febc5649b08dfa87f64a196ad00a783792 | R | 10,162 | 120 |
---
title: "FAQ on applying CellChat to spatially resolved transcriptomics data"
author: "Suoqin Jin"
# date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
theme: united
mainfont: Arial
vignette: >
%\VignetteIndexEntry{FAQ on applying CellChat to spatially resolved transcriptomics ... |
9809ab448bb2781cc293705cd970f478be393770014c039aa56b6385eb4c2f71 | R | 10,182 | 323 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Soma-patch fluorescence line-profile colocalization (Arp3 / NMIIb / F-actin)
## What this file does
Canonical Patch_profile_Corr analysis for ED Fig 6g. Reads paired soma-patch
line-profile CSVs (`profiles1.csv`, `profiles2.csv`, plus the bundled
`profiles.csv... |
707670a7def698ebe707a9710b2f3a4f2ef0e4bc7716089e644f2f09bcb68586 | R | 10,233 | 332 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Arp3 / actin / MRLC soma-patch line-profile correlation (alternative-cohort variant)
## What this file does
Alternative-cohort variant sourced from `D:\DVElite`. Reads paired
soma-patch line-profile CSVs `Myl.csv`, `Actin.csv` and `Arp3.csv` per neuron
(lines ... |
3ced8ac1c2d34ea466b0a0759d1ef5dd8971ef15c4f21a198a662aad1b60a20c | R | 10,281 | 263 | #' @title Seurat to AnnData Conversion and Management Tools
#' @description This documentation encompasses a suite of functions designed to facilitate the conversion and management of data between Seurat objects and AnnData structures. The functions cover the entire workflow from initial conversion of Seurat objects to... |
93f9d062aea5884460fd0df5df38be624c180c392adca3eca7b1abad908c15aa | R | 10,316 | 338 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Arp3 / actin / MRLC soma-patch line-profile colocalization
## What this file does
Reads paired soma-patch line-profile CSVs `Myl.csv`, `Actin.csv` and
`Arp3.csv` per neuron (lines 55, 60, 65, 76, 80), computes per-patch
correlation between the three pairwise i... |
fd35d4ab8231bcebe7be0216ac9bc4c8cc0eccfd90a5814417ae62de0436d5eb | R | 10,334 | 212 | ################################################################################
### Modifier Interval Candidate genes expressed in Telocytes, immune cells
################################################################################
### Import Packages:
library(Seurat)
library(dplyr)
library(patchwork)
l... |
dfc88b0e3ab5bedcb146cd862e691f65c37ab71c6ae399a8d29f07b645b1a511 | R | 10,362 | 349 | ##multiGene takes as arguments:
#1.covstruc from ldsc
#2. Genes from sumstats
#3. LD matrix from package of users choice
#4. [optional] varGene_SE in case 1e-9 is too small
#5. [optional] Genelist if the user wants to create all sumstats at once, but only subset certain rs numbers for multiGene
multiGene <-function... |
5b5b87a665da79e72958bbe33dfad4e39fe355c14022e7350e18331d052e4fc6 | R | 10,391 | 271 |
summaryGLSbands <- function(OBJECT = NULL,
Y = NULL, V_Y = NULL,
PREDICTORS, INTERVALS = 20,
CONTROLVARS = NULL, INTERCEPT = T,
QUAD = F, BANDS = T, BAND_SIZE = 1,
XLAB = "",... |
6473addf98f3932205a10c2e16baa376587ede810021fa9e5bc29000d2ea7ad3 | R | 10,448 | 380 | suppressPackageStartupMessages({
library(ggplot2)
library(SeuratObject)
library(forcats)
library(ggrepel)
library(ggridges)
library(patchwork)
library(data.table)
library(purrr)
})
vlc <- function(deg, pval.thresh = 0.05, abs.lfc.thresh = 1) {
ggplot(deg) +
aes(
x = lfc,
y = -log10(ad... |
74d5982560a9d05b51bb3fb3e49cd622d3f47594f98c23e62fefdf4407cce124 | R | 10,460 | 214 | ## 15_genelevel_weighting_corrected.R
##
## Reviewer 1, point 8 — corrected replacement for 14_genelevel_weighting_final.R.
##
## Two errors in script 14 are fixed here.
##
## ERROR 1 — the wrong effect-size comparator.
## For any linear summary theta_hat = sum(a_i b_i)/sum(a_i) of probe effects b_i with standard
## ... |
5cc1eeb6db125a363a83b6e366641b3c9c40cf10032400613d2bbbcaef4c7dad | R | 10,499 | 304 | library(GO.db)
library(AnnotationDbi)
# ============================================================
# direct_roots:只保留"化学物质转化"类过程
# 移除:GO:0043170 (macromolecule metabolic,太宽,含转录/翻译)
# GO:0006139 (nucleobase-containing,含核酸代谢/转录)
# GO:0006810 (transport,存在摇摆,移至可选)
# =======================================... |
2c2c400b64f6b91767dbabf9def0881f2ee21121416c4fb8630a4afd42b4ddb5 | R | 10,501 | 163 | # Set workpath ----
setwd("/groups/stark/shenzhi.chen/projects/transferLearningMammalianEnhancerDesign202408/")
devtools::load_all("/groups/stark/vloubiere/vlite/")
options(datatable.prettyprint.char = 20)
# Import models metadata ----
meta <- readxl::read_xlsx("clean_version/Rdata/metadata_ATACSeq_models.xlsx", skip ... |
7727ad769ecdee08755e87b8eba9cf9e1a40fb8723124386d365c3c184bc5195 | R | 10,607 | 303 | ---
title: "ED Fig 11i — Somatic EB3 intensity timecourse during washout"
output: html_notebook
---
<!--
# What this file does
Computes the **time-course of somatic EB3 fluorescence intensity** during
the CK666 → washout recovery window. For each cell, intensity is binned
into 25-frame time windows, normalized to tha... |
8ef9bda9807c67be86092245b4f00bd7510e7aa09a078949c4e04ca16bd58032 | R | 10,609 | 216 | .commonfactorGWAS_main <- function(i, cores, n, S_LD, V_LD, I_LD, beta_SNP, SE_SNP, varSNP, varSNPSE2, GC, coords, k,
smooth_check, Model1, toler, estimation, order, utilfuncs=NULL, basemodel=NULL, returnlavmodel=FALSE) {
if (!is.null(utilfuncs)) {
for (j in names(utilfuncs)) {
... |
6e0111076396123274a0f7fbdfb61ecfc1621b41d87627468a3c0f26fc8f9a35 | R | 10,636 | 330 | #!/usr/bin/env Rscript
# =============================================================================
# Generate Figure 5: Differential Expression Volcano Plots
# - Volcano plots for each cell type (Rods, Cones, Müller Glia, etc.)
# - Bar chart showing number of DEGs per cell type
# ===================================... |
8e7c3417b876bc72a55468c1eb667a2d45adb83d54e00e6aba2b1122dd2d3909 | R | 10,678 | 364 | multiSNP <-function(covstruc, SNPs, LD, SNPSE = FALSE, SNPlist = NA){
time<-proc.time()
i = 1
V_LD<-as.matrix(covstruc[[1]])
S_LD<-as.matrix(covstruc[[2]])
I_LD<-as.matrix(covstruc[[3]])
SNPs<-data.frame(SNPs)
LD<-as.matrix(LD)
LD_names<-rownames(LD)
SNPs_LD<-gsub("_.*","",LD_names)
#A2_... |
cf25adf47b69880903cbf3c658a027a6c8f6fb96d0b134b3184cf2344c1122fb | R | 10,679 | 276 | #' Plot estimated and fitted model parameters
#'
#' @param vst_out The output of a vst run
#' @param xaxis Variable to plot on X axis; default is "gmean"
#' @param show_theta Whether to show the theta parameter; default is FALSE (only the overdispersion factor is shown)
#' @param show_var Whether to show the average mo... |
40c88c8838f3e6c9e99ae4fb8b70973e89025e1056519dfc2278001705f84844 | R | 10,688 | 263 | # ==============================================================================
# Script: 10_in_vitro.R
# Manuscript relevance: 3.8, Fig. 7
# ==============================================================================
# PURPOSE:
# Validate the linear lactate–pyruvate framework in vitro by testing whether
# elec... |
4ad62d313ed6e64ce29b0cab474c79ab22f36cb3b9a769e29cc808945e1ac24c | R | 10,710 | 323 | #' @importFrom S7 new_class new_property class_any S7_class prop
NULL
# Cache environment for the S7 class
.element_text_repel_cache <- new.env(parent = emptyenv())
get_element_text_repel_class <- function() {
if (is.null(.element_text_repel_cache$class)) {
element_text_class <- S7::S7_class(ggplot2::element_te... |
d4dfc5c858ce937af6bdf4a16881b165a30b8a4e46e924fcb45c1ac4923d745e | R | 10,777 | 293 | library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(ggpubr)
#library(Microsoft365R)
########## Privacy ############
df <- read_excel("~/Python/WASP-DDLS/results_final.xlsx")
df$dname <- df$Dataset
df$Dataset <- c("Synthpop", "CTGAN (default)", "CTGAN (optim)",
"TabPFN (1.0)", "TabPF... |
f5334b727f20f551995c411b9aae1927d5ef4e25cc5858e480e455580d70290e | R | 10,794 | 279 | # 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... |
3807575b920ee894a4c7e161ed4a74590482f01bf8c2b6ea83fbd26e1e8019ce | R | 10,816 | 325 | ---
title: "SpatialDE statistics"
author: "Lukas Weber"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output:
html_document:
toc: true
toc_depth: 2
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(echo = TRUE, cache = TRUE)
```
# SpatialDE statistics
Comparison of gene-level test statistics... |
c3dd9dade4fe0c2e89c7c426dae7e7ba57225d8e91f599d9b60f333b51e12476 | R | 10,841 | 277 | load_condaenv <- function(conda_env) {
library(reticulate)
# # Check if Conda is installed
#
# if (!conda_exists()) {
# # Install Miniconda if Conda is not installed
# message("Conda is not installed. Installing Miniconda...")
# install_miniconda()
# }
# Check if the specified Conda environmen... |
37df851c1e289449c0d7ea6755b6fd5d8c7ecddfefd5c1e2d03f92730e6105f2 | R | 10,917 | 298 | # modified from AUCell package version 1.19
.AUCell_buildRankings <-
function (exprMat, featureType = "genes",
keepZeroesAsNA = FALSE, BPPARAM = NULL, plotStats = FALSE,
verbose = TRUE) {
import("DelayedArray")
import("DelayedMatrixStats")
if (keepZeroesAsNA) {
zeroesCoords ... |
088ddb7c5e6e9b94e5b3cd913c45679e98b5bf3a353c158d7ab25297ce89f4a3 | R | 10,927 | 260 | ---
title: "Using the UMI-fy transformation"
author: "Christoph Hafemeister"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
highlight: pygments
df_print: kable
link-citations: true
---
```{r setup, include = FALSE}
library('Matrix')
library('ggplot2')
... |
dbc13c5a2dff0aa969c12153c9854742d4dc2dce3ca8a1b3135c367fc9627723 | R | 10,938 | 375 | library(ggplot2)
library(scico)
library(patchwork)
library(readxl)
library(reshape2)
library(readxl)
# Import data
Wt_E8_data <- as.data.frame(read_excel("Data_1.xlsx", sheet = "Wt_E8.5_data", col_names = TRUE))
NMPoutlines <- as.data.frame(read_excel("Data_1.xlsx", sheet = "WtE8_NMP_ROI_outlines", col_names = TRUE))
... |
1e8a7121237e13403eabf53c0e5d26a6e541959eab969888a764aa5e738bf3ec | R | 11,054 | 389 | ## From spatialLIBD/global.R
library('ggplot2')
library('cowplot')
library('Polychrome')
library('viridisLite')
## Should be part of the spatialLIBD package... when I make it :P
geom_spatial <- function(mapping = NULL,
data = NULL,
stat = "identity",
position = "identity",
na.rm = FALSE,
show.le... |
dca26fb709187c712fc70bfa6116fe7523fc90799f5ba604ed29d767a10863cd | R | 11,078 | 319 | #!/usr/bin/env Rscript
# =============================================================================
# Supplementary Figure 5: Quality Control and Sample Metadata
# - Panel A: QC metrics by genotype (violin plots)
# - Panel B: UMAP by donor ID
# - Panel C: Cell counts per donor
# - Panel D: Cell type distribution tab... |
234b3e6277793de5fe23cbcc6293affaec92d3dc6a65771b96bedb43bd64381f | R | 11,108 | 230 | #' evalaute performance
JSD_performance <- function(spots_true_composition, spots_predicted_composition)
{
suppressMessages(require(philentropy))
jsd_matrix <- matrix(nrow = nrow(spots_true_composition), ncol = 1)
for (i in seq_len(nrow(spots_true_composition))) {
x <- ... |
6f0a81eac9099f80237718880038e0408fa22dd528cbe3e31e74c27c9ae93c93 | R | 11,130 | 209 | #Script that mostly creates figures and does some analyses requested by the reviewers
#########################################################
### (A) Installing and loading required packages
#########################################################
if (!require("dplyr")) install.packages("dplyr", dependencies = TRUE)... |
26fd07247d9fbbddb69a47b34d0cf718ad309eb612baa74fce7051c6876f64b6 | R | 11,133 | 221 | #Following from slide 45 from
#https://github.com/rcc-uchicago/genetic-data-analysis-2/blob/master/slides.pdf
library(ggplot2)
library(ggrepel)
library(qqman)
library(dplyr)
library(data.table)
library(ggplot2)
library(ggpubr)
library(factoextra)
library(sommer)
library(gdata)
library(stringr)
library(dp... |
efc8c6fbad81399ee265f89857b511f3479b34881c183484822c71c1eae77567 | R | 11,140 | 206 |
---
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... |
6260b414c808dd46e02516ff5466862430700f3e9986476a66e61b62abb53130 | R | 11,160 | 285 | library('SingleCellExperiment')
library('here')
library('jaffelab')
library('sessioninfo')
dir.create('pdf', showWarnings = FALSE)
dir.create('rda', showWarnings = FALSE)
## Load data
load(here(
'Analysis',
'Human_DLPFC_Visium_processedData_sce_scran.Rdata'
))
## For plotting
source(here('Analysis', 'spatial... |
05719cf7456aaea3563cd0f1f69a3ef157bf627f1f56a4f1fdf56b6f8aef906f | R | 11,345 | 393 | ---
title: "Analysing beat-side combinatorial code similarity across PNs based on the single-cell/nucleus RNAseq data"
output: html_notebook
---
```{r}
library(tidyverse)
library(magrittr)
library(ggplot2)
library(ggridges)
library(ggrepel)
library(ggpubr)
library(RColorBrewer)
library(gplots)
library(ggtext)
library(... |
d32ad995a04b2aa3ffb3c9509960d78ef2ecdab18f92fbeeb57bbcefc83188f4 | R | 11,515 | 285 | library(readr)
library(dplyr)
library(lme4)
library(emmeans)
library(effects)
library(car)
setwd("~/OneDrive - Fondazione Istituto Italiano Tecnologia/IIT_Postdoc/WP4/Deeplabcut")
#setwd("C:/Users/tnguyen/OneDrive - Fondazione Istituto Italiano Tecnologia/IIT_Postdoc/WP4/Deeplabcut")
mean_velocity <- read_csv("mean_vel... |
8e0fe4f7e1c17fb65fa3945e59b7a2b2f766dd21c07c9476aa8440c2ef5c4b41 | R | 11,591 | 282 | # 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
#---------------------------------------------------------------------... |
615197cf068aa13897cde5f999d0fd6cb9634eb0012e4ba4ab25a6db9ec80d31 | R | 11,596 | 432 | library(ggplot2)
library(scico)
library(patchwork)
library(factoextra)
library(RColorBrewer)
library(readxl)
# Import data
Wt_E8_data <- as.data.frame(read_excel("Data_1.xlsx", sheet = "Wt_E8.5_data", col_names = TRUE))
# Isolate example embyro of four somite pairs where fate map is known.
SP4<-Wt_E8_data[Wt_E8_data$... |
624e871c477324f52c234404a8b3e6ae383d2b48cdf29ca1e686aa488ef72543 | R | 11,611 | 262 | setwd("/groups/stark/vloubiere/projects/DeepATAC_shenzhi/")
source("git_deepATAC/function/augmentation_function_tiling_sliding_window.R")
require(vlfunctions)
# Import models metadata ----
meta <- readxl::read_xlsx("Rdata/metadata_ATACSeq_models.xlsx", skip = 4)
meta <- as.data.table(meta)
# Create output files ----
... |
672a715cec8df76c38a7a32ac9d6e8f51095ead701761eb1c480523d36cbd722 | R | 11,630 | 353 | #!/usr/bin/env Rscript
# Input: the CSV/TSV produced by 01_calculate_roi_isps.py.
# Trial-level detail-specificity LMM with sign-flip permutation,
#
# Per ROI x contrast-type (true/false) it fits one lme4 model on
# per-trial WBSLD (= WSLD - BSLD):
# shared_nps ~ version + (1|pair_id) + (1|event) + (1|stimulus)
# Per... |
be32540ca86ecb1c46838a050df994430f47b15d6be3984934e32d1739b8f2f8 | R | 11,681 | 443 | ---
title: "Analysing beat-side combinatorial code similarity across ORNs based on the single-cell/nucleus RNAseq data"
output: html_notebook
editor_options:
chunk_output_type: inline
---
```{r}
library(tidyverse)
library(magrittr)
library(ggplot2)
library(ggridges)
library(ggrepel)
library(ggpubr)
library(RColor... |
28620eb6ef74b9edb6ba18d56fb57fe083f58b37e5d5737876575c5eae081136 | R | 11,737 | 402 | ############################################################
# Behavioral Analysis Script
# Author: Yuan Zhang
# Date: 2026-05-25
#
# Description:
# This script performs behavioral analyses for two cohorts
# (CMI-HBN and Stanford), including descriptive statistics,
# Pearson correlations, and group comparisons. Inferen... |
aca1f72fd30d53aa9f5afdfd4096dfb62d821c7cd0068e4156752e4f9b52022f | R | 11,839 | 269 | ################################################################################
### Zhao et al., 2022 Developmental Cell scRNA-seq data: Mouse Intestinal Atlas
### by Age: Subsetting the Enteric Neural Crest-Derived Cells.
################################################################################
### Impor... |
5976b735cc528b47d3e7bab2c29e859c62bba450d0f8b0742975911862680c5d | R | 11,862 | 250 | #!/usr/bin/env Rscript
# Written by Harshil Patel and Gavin Kelly and released under the MIT license.
################################################
################################################
## REQUIREMENTS ##
################################################
####################... |
c93746db49df6892734e6223d46ddf4db9bc91a1fa6ee491e24bf282950a4fda | R | 11,942 | 290 | library(ggtranscript)
library(rtracklayer)
library(readr)
library(tidyr)
library(stringr)
library(Biostrings)
library(arrow)
library(biomaRt)
library(ggtranscript)
library(ggplot2)
library(readxl)
library(GenomicFeatures)
library(txdbmaker)
library(dplyr)
# Create example figures that illustrate the usage of an altern... |
49d3183fb48c7a556c12a7926b9ac34c3db6f72dc9ade2a88c5f59e78e1590ad | R | 11,959 | 320 | library('SingleCellExperiment')
library('broom')
library('ggplot2')
library('cowplot')
library('sessioninfo')
## Load the sce object from sce_scran.R
load('Human_DLPFC_Visium_processedData_sce_scran.Rdata',
verbose = TRUE)
dir.create('pdf', showWarnings = FALSE, mode = '0770')
##
d <- as.data.frame(colData(sce))
... |
4b0579b90b5c6a085d8030810bd8139801bfdb3e2a7e181b5603eb3def232f5a | R | 11,964 | 276 | commonfactorGWAS <-function(covstruc=NULL,SNPs=NULL,estimation="DWLS",cores=NULL,toler=FALSE,SNPSE=FALSE,parallel=TRUE,
GC="standard",MPI=FALSE,TWAS=FALSE,smooth_check=FALSE){
# Set toler to machine precision to enable passing this to solve() directly
if (!toler) toler <- .Machine$double... |
11aa345b9bfaeb4cfe0c72ed2b2a4f2fd9c2d0fc984d3ee3dd45e48077693ea2 | R | 11,993 | 358 | library(ggseg)
library(ggsegGlasser)
library(ggplot2)
library(dplyr)
# define plot funtion
plot_bil_map <- function(df_plot, limb, limt, savename){
# use ggplot + geom_brain
pdf(file = savename, width = 10, height = 5)
p <- ggplot(df_plot, aes(fill = score)) +
geom_brain(
atlas = glasser,
col... |
5ed0a81dc4054eb96454c2637fbca3575eb36778e040283e00d36545ac2358f6 | R | 12,017 | 315 | suppressPackageStartupMessages({
library(dplyr)
library(ggplot2)
library(cowplot)
library(gridExtra)
library(mclust)
library(pheatmap)
library(SpatialExperiment)
library(scran)
library(ggspavis)
library(ggrepel)
library(dbscan)
library(scater)
library(tibble)
library(limma)
library(bluster... |
40c404b263f9f163a1f39c9bc7d839995a41cabc634379f1bcc0a4c0a435ad3b | R | 12,042 | 313 | library('derfinder')
library('BiocParallel')
library('Biostrings')
library('GenomicRanges')
library('GenomicFeatures')
library('org.Hs.eg.db')
library('biomaRt')
library('jaffelab')
library('getopt')
library('rafalib')
library('devtools')
library('SummarizedExperiment')
library('plyr')
library('rtracklayer')
## read i... |
d453cc723b7c21ec31d6c9f03247f31cdc21bd6bc08a8223aa3fad7c233c9ff4 | R | 12,073 | 357 | 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_covariation.rds")
df_combined$Subject <- as.factor(df_combined$Subject)
df_combined$Gender <- as.factor(df_combined$Gen... |
2dacc95fefd3279e905fa9b4d443596e39114c186aef7042286e5dca1605201b | R | 12,102 | 284 | # Internal per-gene analysis helpers: donor/covariate assembly, QR
# residualization, and susieR fitting / credible-set extraction.
#
# All functions in this file are internal (not exported).
#' @keywords internal
#' @noRd
build_gene_data <- function(gene_id, variant_ids, expression_matrix, genotype_matrix,
... |
4457b01ccc4277a17b56abfe3fb5afc448fe71128ff23e143d836ba5764bcc1a | R | 12,111 | 259 | ## helpers.R — shared utilities for Methylation/r_notebooks
## Loaded with: source("helpers.R")
##
## Provides:
## - PROJ_ROOT, METH_ROOT, OUT_DIR, FIG_DIR, STRATA_DIR, COMBINED_DIR
## - CROSS_OMICS / METH_TOP / cross-omics-by-tissue panels
## - load_meth_stratum(name) -> list(mat, groups, meta) for a meth stratu... |
3faf1810ac1beb19b038ad958a06cd2e07f5a2e07126a2782e02de3680f9de37 | R | 12,203 | 211 | attach(Loadings_Parameters) #attach file with all loading parameters
#next, more clean up
Loadings_Parameters <-data.frame(Loadings_Parameters) #unlist the whole file so that analysis is easier
#read specific rows and columns to make a specific two variables for HC and SCZ from the loading means worksheet
library(rea... |
2dfb20f29a02cc2714158c3877ed2bf55df9c58b91430a79b0ffd8b9962e00dc | R | 12,319 | 451 | # -------------------------------------------------------------------------
# Network Analysis: Correlation of GMV maps with NMDA receptor density within
# each Shirer network
# Author: Yuan Zhang
# Date: 2026-05-29
#
# This script:
# - Loads CCA .RData files for CMI and Stanford cohorts.
# - Extracts sign-oriented... |
e91c5dba99a04ea2ddb7c8bee6c7a6cc4586079e761151da5be0113e67607645 | R | 12,323 | 439 | ############################################################
# Partial correlation between original U and V controlling
# for global morphometric covariates
# 1) SST_GVOL
# 2) SST_BVOL
# + permutation test for significance
#
# Author: Yuan Zhang
# Date: 2026-03-30
###################################################... |
fcaf0adbfe1d4fa45cfa3da6901891d992fa641bbf6a41def2766ed9d7e52eec | R | 12,342 | 333 | #========================================================================================#
# Author: James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, University of Oslo
#
# Purpose: Reproduce Extended Data Fig. 5 (Summary of the number of reported significant effects and their directions across ... |
b0876f6bf8d7c02fb77c0a035328531cb3850d975f05e9fa0a30b6448f678c8e | R | 12,360 | 226 | .sumstats_main <- function(X, utilfuncs, filename, trait.name, N, keep.indel, OLS, beta, info.filter, linprob,
se.logit, name.beta, name.se, ref, ref2, file=NULL, log.file=NULL,direct.filter) {
if (!is.null(file)) {
file <- data.frame(file)
} else{
file <- data.frame(read.table(fi... |
1beca4ed3a185c866a0d20cec113e8a03c968764273e3413403357d4d75faffb | R | 12,377 | 376 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Fig 1i/k/l - Frequency of somatic actin waves + axonal/neurite growth in
# unpolarized cortical slice neurons (DIV-0, E15.5).
## What this file does
Body has 3 analytical sections producing distinct outputs:
1. **Wave count** (lines 76-145): reads per-cell wa... |
64efc822edcfddbd74c27d3211403e984225c5eb6a67c98414ec65a7ecee0d1a | R | 12,419 | 329 | #' @title Cluster proportion bar plot
#' @description Plot the percentage/absolute cell count of each cluster in each sample
#' @param origin factor/vector of sample
#' @param cluster factor/vector of cluster
#' @param rev If TRUE, plot the proportion of sample in each cluster, Default: F
#' @param normalize Normalize ... |
e42f309ef804f92ca4f61b2dbffdd8b47c0b93afc7b53d44d28ebf997a8f3fcd | R | 12,430 | 257 | #!/usr/bin/env Rscript
## 09_inverse_concordance_scan.R — generated from notebook spec
## Run: Rscript 09_inverse_concordance_scan.R
## ============================================================
## # 09 — Inverse-concordance discovery scan (RNA ↔ methylation)
##
## Beyond the original cross-omics 7-gene panel, t... |
42cc19b7438d061c06a5f3f83b25737acc9a366f1082e512993ed9d6034cf775 | R | 12,446 | 570 | ---
title: "MitoMicroPub_FinalDataAnalysis"
author: "Abigail Wendland"
date: "2026-04-25"
output: html_document
---
## Overview
- This analysis investigates mitochondrial health using red:green fluorescence ratios across different age groups and treatment conditions.
- the data used for analysis was obtaned using Ima... |
4de9ad6142064dcb71394e31031a8f952643088d71ad956f90d23fe352827004 | R | 12,449 | 432 | # Create dendograms from a dissimilarity matrix
# Authors:
# Mirko Pavicic
# Alice Townsend
# Kyle Sullivan
# Manesh Shah
# Erica T. Prates
# Created: 2023-08-21
# Last Modified: 2023-10-08
# Version 0.2 (2023-08-25)
# - Added log2fc heatmap
# Version 0.3 (2023-08-29)
# - Added subclustering function
####... |
015062c0d568605436fb3942401f9cf560875942cf3a7a55b077b1495dbb3070 | R | 12,476 | 301 | ################################################################################################################
## Filename: ssgsea-gui.R
## Created: September 09, 2017
## Author(s): Karsten Krug
##
## Purpose:
## - Wrapper to ssGSEA script to perform single sample Gene Set Enrichment analysis.
## ... |
42cd52ad3edc5ca9ef5b0ec2da3d15d5075747d160374308521c46583ad43a57 | R | 12,590 | 358 | #!/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... |
83bacd65bd41166db058a8daf5f9198cff82785bb1280d654f83795174e34ab8 | R | 12,647 | 336 | # 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, ... |
100128c33359f22ed03223ee90694b5bb00ddf4287c7088867208deb3e2eecb8 | R | 12,682 | 265 | #========================================================================================#
# Author: James M Roe, Ph.D.
# Center for Lifespan Changes in Brain and Cognition, University of Oslo
#
# Purpose: get empirical p-value maps using null models from regional wild bootstrap resampling
#============================... |
f021e7c31c86014d665837d2d3b039e02b0d4483c71af834a607f46f940df777 | R | 12,706 | 316 | ### MICROEXONS ###
library(dplyr)
library(tidyr)
library(arrow)
library(purrr)
library(edgeR)
library(IsoformSwitchAnalyzeR)
classification <- read_parquet("nextflow_results/V47/final_classification.parquet")
#Subset the transcript file to these PB IDs.
tr_count <- read_parquet("nextflow_results/V47/final... |
8250b47f67138ee5ba1a51504926bfaef2b870892653f77ac077228fd73d1536 | R | 12,722 | 496 | ############################################################
# CCA Reporting Full Statistics
# Author: Yuan Zhang
# Date: 2026-05-25
#
# Description:
# This script loads saved CCA RData files and generates
# reporting-ready statistics for editor requirements:
# 1. Wilks' Lambda dimension tests
# 2. Pillai's trace m... |
7af4e06c3801fe25482a522599c32fc96c625ecece6d641d00fc9041870b1f52 | R | 12,791 | 301 | #' @title Gene Naming Conversion Functions
#' @description These functions facilitate the conversion between human and mouse gene symbols and Ensembl IDs, and vice versa. They leverage both local and remote databases to provide fast and reliable gene identifier conversions, supporting a wide range of genetic studies.
#... |
555cb5edaa648953bfa003680ec3471edbaf6f6da8b5c0ea1938da9b11081391 | R | 12,963 | 251 |
---
title: "Update CellChatDB by integrating new ligand-receptor pairs from other resources or utilizing a custom ligand-receptor interaction database"
author: "Suoqin Jin"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
theme: united
mainfont: Arial
vignette: >
%\VignetteIndex... |
ad70d2738f74e1fd4a5e14bb06394788125ee98044ca1676ed88ad8294159120 | R | 12,990 | 358 | #!/usr/bin/env Rscript
# =============================================================================
# Generate Complete CLRN1 Expression Figure
# Panel A: UMAP (WT vs KO split)
# Panel B: CLRN1 by Cell Type
# Panel C: CLRN1 in Müller Glia (WT vs KO)
# =================================================================... |
d2e8242637b8e2d61ed504f6062ca930f7b23bb0b7749278ee4e9a92b2b91516 | R | 13,058 | 248 | #Melanie Weilert
#November 2020
#Stowers Institute, Zeitlinger Lab
#Purpose: Import an ATAC-seq .BAM file and deduplicate, correct Tn5 bias, and modify fragment sizes to provide higher quality coverage.
suppressPackageStartupMessages(library(optparse, warn.conflicts=F, quietly=T))
suppressPackageStartupMessages(librar... |
d291bd9e6035381e8b23467eda55fa73f900fee15991da4bef4481637d53115c | R | 13,104 | 201 | ####################################################################################
## Automatic Cleaning Pipeline for Luminex Data ##
## ##
## Author: Dennis C.Y. Chan ... |
04b757baadbc298f7188a86b28027940596b149cdc956095d2c9b4c569c559de | R | 13,170 | 390 | ---
title: "Comparison SpatialDE genes"
author: "Lukas Weber"
date: "`r format(Sys.time(), '%Y-%m-%d')`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Comparison SpatialDE genes
Comparison of top significant genes detected by SpatialDE (from script `sce_spatialDE.Rmd... |
aa5e2aeb0649786d02fddd568d3ff51ab3a4ba166e006be199aba596d628f9fc | R | 13,177 | 225 | ################################################################################
### Modifier Interval Candidate Gene Pipeline Part 2,3-A:
### Supp. Figure 4, gene expression profile of scRNA-seq CellChat genes
################################################################################
### Import Packages:
... |
e6596e009357aa070144dd2f700058b5d19c94d12b0eed02848d182e2b73ac04 | R | 13,189 | 374 | ---
title: "Using sctransform with Smart-Seq2 data"
author: "Christoph Hafemeister"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
highlight: pygments
df_print: kable
link-citations: true
---
```{r setup, include = FALSE}
library('Matrix')
library('ggp... |
0c67f4c32a237cf3ac20ef1d3da792b47afbd54927ec4948a024e22fdfb32975 | R | 13,276 | 425 | ---
title: "R Notebook"
output: html_notebook
---
<!--
# Longest-neurite-length quantification across DMSO / CK-666 / washout
## What this file does
Reads per-neuron longest-neurite-length CSVs from `folder_path` (`list.files`
at line 53, loaded line 57) for the CK-666 washout experiment (DMSO,
CK-666-treated, washo... |
ab8177627598a8a40e3e46cb604ab193c9ba6bf6fe7abe837da7a8c4d2fb9f25 | R | 13,410 | 375 | ## ----setup, include=FALSE------------------------------------------------
knitr::opts_chunk$set(
cache = FALSE,
cache.lazy = FALSE,
tidy = TRUE
)
## ----Libraries, echo=TRUE, message=FALSE, warning=FALSE------------------
library(tidyverse)
library(ggplot2)
library(Matrix)
library(Rmisc)
library(ggforce)
libr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.