sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
bd3fbd7e0ec326125bda7837792d3c9bc2deeb1f7038ab028caf06235ff45d9e | R | 15,216 | 422 | ###############################################################################
## Ribosome Paradox: Three Pools, Three Fates ##
###############################################################################
library(here)
library(ggplot2)
library(dplyr)
library(tidyr)
library(patchwork)
... |
6c9e18dc927ab3fcec6de471a603f9112d560b1429d4a7d22d04ae5e8b9226c1 | R | 15,221 | 474 | # ===============================================================
# 🟦 Descriptive Visualization — Numeric Histograms
# ===============================================================
visualize_numeric_histograms_ui <- function(id) {
ns <- NS(id)
tagList(
with_help_tooltip(
checkboxInput(ns("use_... |
45fbeabadcf5315634a2b50f0b71d28a759ba050609ff9fdb86142f5d194d5b9 | R | 15,225 | 218 | #' Plot module conservation
#'
#' Plots the tree-based statistics that characterize the cross-species conservation of the modules and marks the modules that were found to be conserved/diverged.
#'
#' To determine whether a module as a whole is conserved, diverged overall or diverged on a specific lineage, the CroCoNet ... |
9c57d4a06de53576bacafb1b73b600c830ec8e4e7648e6fc763db21a8284d5dc | R | 15,253 | 506 | # ageMutationTools.R
#
# Utilities for modeling binary mutation status (0/1) vs Age
# using logistic regression with natural splines: splines::ns().
#
# Dependencies: stats, splines, ggplot2
#
# ------------------------------------------------------------
# ---- helpers ----
.assert_has_cols <- function(df, cols) {
... |
1656498a87f841818a7361410b0200f7d3ec1da8bc16ca41d3b98c2b45f083ea | R | 15,257 | 367 | ---
title: "Fig2"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE)
```
## Fig. 2, statistics and panel figures a to e ##
Comparison between neurodevelopmental and psychiatric disorders (NPDs) associated rare genetic liability (CNVs) and diagnosis on A) mean c... |
87c5b2287d96cb053907a51651b5b974b529a5356649f3cefbaa093f79163df9 | R | 15,283 | 483 | # ===============================================================
# 🧪 Visualization Module — Two-way ANOVA (Apply-button version)
# ===============================================================
visualize_twoway_ui <- function(id) {
ns <- NS(id)
sidebarLayout(
sidebarPanel(
class = "ta-sidebar",
... |
1a801547ef1f2922d47bdd7c2a914e007206764cb36c197996cc532a08f74032 | R | 15,291 | 271 | InputData <- read.delim('InputData.csv', sep=',', header = TRUE) # data import
head(InputData, n = 20) # showing first n rows
library(biomaRt) # package selection
######################################################################
###Downloading information about Ensembl database version and description of ... |
87096a0b49dbaee31d16eacd558b44c899687286b1f61c67baed2adc632c509e | R | 15,300 | 243 | library("spatialLIBD")
library("sessioninfo")
spe <- fetch_data("spatialDLPFC_Visium")
lobstr::obj_size(spe)
# 6.97 GB
## Subset to just 3 samples used in Figure 2A
spe <- spe[, spe$sample_id %in% c("Br8667_mid", "Br6522_ant", "Br6432_ant")]
lobstr::obj_size(spe)
# 777.93 MB
imgData(spe)
# DataFrame with 12 rows a... |
81cc52b74f7e14efb595a88dcd7b4ed57e60469e7aec3128d8e832a8b99934c4 | R | 15,305 | 368 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
############################
### COMPARE CONNECTI... |
2fe3822553a0d792aa3a93ca67d9951acf0ad9aa74462e365fd0acfd32ca24c4 | R | 15,328 | 386 | #' Semi-automated annotation of query clusters
#'
#' This function provides a semi-automated approach for annotating query clusters. Users are prompted to manually assign names to clusters based on visualizations of marker-based or marker-free data.
#'
#' @param ann An object containing SAHA analysis results.
#'
#' @p... |
882da35ac0337a7839210550490cff0cb0da5e896d92c50d6ae631d32f432118 | R | 15,340 | 524 | ---
title: "Main Figures — Figures 1 and 2"
---
This script produces the panels for main Figures 1 and 2.
Inputs (processed Seurat objects from analysis scripts):
- `output/01_basak/basak_snRNA_seurat.rds`
- `output/02_meta/meta_snRNA_allcells_seurat.rds`
- `output/02_meta/meta_snRNA_neurons_seurat.rds`
- `ou... |
fba264d52569c71657fbdf33ad579e2f00606ffd11603145b1dcb8d7580b8c3d | R | 15,354 | 333 | # open R
srun -n 10 -p interactive --pty /bin/bash
module load cluster/gsl/1.15
module load cluster/htslib/1.9-devel
module load cluster/build_tools/llvm/8.0
module load cluster/util/gcc/8.2
module load hdf5_18/1.8.21
conda activate r_env
#conda deactivate
R
# R script to generate heatmaps for the LDSC results
#... |
1a2d55270fcb33db34c9d9ecd8c30875797b49e720cc6e8f94f34ab82cdec739 | R | 15,378 | 321 | # 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... |
8186126b59a0cbf89806fdee60ea8b9d81b466458435c660f7e7e4349640f95d | R | 15,403 | 503 |
#This code currently gets the log2 TMM expression of GDF15, then centers and scales it, and then compared the pc2 score (which also gets centerd and scaled) for each tissue
# Control F and then replace "Factor1" with Factor_
rm(list = ls())
# BiocManager::install("edgeR")
# install.packages("readxl")
library(tidyv... |
372d2be70873997a5b758b70c600db5d794e818ef21a0bda39b447d2c016efbd | R | 15,416 | 424 | library(Seurat)
library(ggplot2)
library(scCustomize)
library(patchwork)
library(RColorBrewer)
library(viridis)
mouse_gene_names<-read.delim("mouse_genes_names_Ens100_rmdup.txt",row.names=3)
genes_to_ens<-function(gene_symbol) +
{ return(as.character(mouse_gene_names[gene_symbol,1]))}
data <- readRDS("../data_obje... |
301733d88f3bb7dccad90a13bf31373322c90cb75e6c585b501b0d561e97983b | R | 15,440 | 397 | ###########################################################################
###############--------------- MAIN ANALYSES ---------------###############
###########################################################################
### In this script:
# (1) Prep data
# (2) Partial least squared regression
# (3) General l... |
05d0337c6fb7349a8d178e6b95f12b4cc4749151ff773319e9992be460508e77 | R | 15,459 | 238 | ---
title: "Inferring Gene Regulatory Networks from GTEx Gene Expression Data in R with OTTER"
author: Rebekka Burkholz
date: 2020-9-22
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Inferring Gene Regulatory Networks from GTEx Gene Expression Data in R with OTTER}
%\VignetteEngine{knitr::rmarkdo... |
f799e2bf1df7fec7e7bb0a27b535626f90e5d5b7c494177a72dfa7f722f55b84 | R | 15,475 | 445 | rm(list = ls())
library(dplyr)
library(plyr)
library(Seurat)
library(ggpubr)
library(reshape2)
library(tidyr)
library(tidyverse)
library(DropletQC)
library(readr)
source('~/SCRIPTS/utility_functions.R')
#####
## LOAD COUNT MATRIX
#####
# Only the putamen samples
srrMeta = read.csv('~/project/00_FASTQ/MACAQUE_HE2021/H... |
1967985d6a1993f4aa08e1f853346376e08486ffaa403e6b7d0fe78d0025f751 | R | 15,496 | 325 | #' banc-connectivity-review-groups — Assemble cross-matched neuron groups for review.
#'
#' Three predefined groups (`antennal_lobe`, `central_complex`, `brain_motor`):
#' joins BANC↔FAFB matches and Codex alignment scores into a manual-review CSV.
#'
#' @section Reads:
#' - GCS `compiled_data/banc_<ver>/*.feather`, ... |
aefadce224a2a8c16c2bbb1193bcbd9a68139e41bc8cd219f1c60b174200ca04 | R | 15,496 | 443 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(here)
library(lme4)
library(ggplot2)
library(ggpubr)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
library(glue)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------... |
40dafcd28a80bdfb98738088270b7b0edd22531d77fa784e9990518b8764fa70 | R | 15,517 | 525 | 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 COUNT MATRIX
#####
# Only the caudate samples
allsamps = rio::import('~/workdir/TABLES/Primate_Tables_From_EmilyOh/C... |
da0aa17296e30191bd439e0ad005d9bbbabd3c7f57ce8873f1074bae356c7fcc | R | 15,529 | 406 | #' banc-spectral-clustering — R port of the BANC CNS-network spectral clustering.
#'
#' Column-normalised symmetrised adjacency → normalised Laplacian → KMeans
#' on bottom-k eigenvectors → UMAP. Cluster labels assigned by majority vote
#' against existing SeaTable `cns_network` annotations.
#'
#' @section Reads:
#' ... |
f8d2ba228d2caabc1a7a5837d3937f3657fd4503a580490474f3965c26a2f1da | R | 15,539 | 385 | # ==============================================================
# Astrocytes: derive ad_status, save clinical_w_designations.csv,
# merge, run DEG (Wilcoxon, unfiltered),
# and also output cell_type_distribution.png
# ==============================================================
suppressPackageStartupMessages({
li... |
ba1f76849e63d0b4a63df508de0055171f801ab1d1e79f7da69318816a31f0ae | R | 15,549 | 380 |
## Figure 3 ####
tell_user('done.\nCreating Figure 3...')
resx=300
png('display_items/figure-3.png',width=resx*6.5,height=5.5*resx, res=resx)
layout_matrix = matrix(c(1,2,
3,4), nrow=2, byrow=T)
layout(layout_matrix)
panel = 1
xats = c(0,1,3,7,10,14,21,28,35,42)
# Load mixture model paramet... |
97bffedb23eb274a9c981d9373cd2fdeeb856203628a61a198f55a99bd8cc058 | R | 15,594 | 345 | ---
title: "Seurat_tail_initial_final"
output: html_document
date: "2025-07-08"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load Libraries
```{r}
library(dplyr)
library(monocle3)
library(Seurat)
library(DoubletFinder)
```
install for DoubletFinder:
remotes::install_github('chris-mcginnis-u... |
b2d5f0fe69a30b06a715ea69b19d3bfd91aede29adce38ec4532fb948dd9d1b2 | R | 15,626 | 458 | ################################################################################
# Slingshot trajectory inference (UMAP) + pseudotime analysis
#
# - No hard-coded absolute paths
# - No printing of local file paths
# - Designed to be uploaded to a PUBLIC GitHub repo
#
# Usage:
# Rscript trajectory_slingshot_public_saf... |
500f425cf7c50650c69e4a7648cee0a74af2ee1f87733ed68cf428b1c18afbf2 | R | 15,629 | 520 | ---
title: "SpNeigh analysis of human HER2+ breast cancer Xenium data"
author:
- name: Jinming Cheng
affiliation:
- &duk_nus Centre for Quantitative Medicine,
Duke-NUS Medical School,
Singapore, 169857,
Singapore
# email: jinming.cheng@outlook.com
date: ... |
6802d5d1fddc159f4cdadad07433d27a9a40d243a32a3d63ce32969dd3140341 | R | 15,674 | 281 | # Load required libraries
library(ggplot2)
library(ggrepel)
library(dplyr)
library(tibble) # To use rownames_to_column
log2fc_threshold_up <- 1
log2fc_threshold_down <- -1
padj_threshold <- 0.05
########## Human MTLE gene count ###############
# Import Human MTLE data
file_path <- "/home/joonho345/1_Epilepsy_RNA/RNA... |
d478fc00c3282e22cf8bc81de26e21a31da5d364843d2086bc7702fec272e977 | R | 15,692 | 406 | root="C:/Users/Jun/Documents/R/AA_wSignal/"
pre=2 #for peri-event histogram in seconds
post=2 #for peri-event histogram in seconds
preheat=10 #for heatmap in seconds
postheat=30 #for heatmap in seconds
sps=0.1258291 #signals/second
tdir=paste(root,"rtrack",sep="")
tfiles=list.files(tdir)
outpath=paste... |
39d7feef0e7327c47bbbd4d967fc6b2247c96987ef0f9b134b91aa00dda006a0 | R | 15,715 | 396 | library(shiny)
library(ggplot2)
library(purrr)
library(shinythemes)
library(shinyWidgets)
library(MHCbinding)
library(DT)
library(dplyr)
library(ComplexHeatmap)
library(circlize)
library(cowplot)
library(shinyFeedback)
anchar <- readRDS("data/example_anchar.rds")
gene <- unique(anchar$genes)
plot_heatmap <- function(... |
225617cea32d058b3674a7abe03ed22bb2c95c6b92ec2b2c22e478cf2dc94d17 | R | 15,722 | 416 | ---
title: "Supplementary materials"
subtitle: 'Bayesian Brain in ADHD: potential catecholaminergic
pathway of volatility estimation'
author: "Plank et al."
date: "`r Sys.Date()`"
output:
pdf_document:
toc: true
number_sections: true
latex_engine: xelatex
fontsize: 9pt
geometry: margin=0.5in
header-inclu... |
295d1d7d7587ddcdd057dfa19638fee4db104fef47b4e20bb5e8d1ac3b6598c6 | R | 15,732 | 373 | # Convenience functions ---------------------------------------------------------
make_tiny_design <- function(trend, ...) {
cov_names <- trend[[1]]$covariate
for(nm in names(list(...))) cov_names <- c(cov_names, nm)
return(design(factors = list(subjects = 1, S = 1), Rlevels = 1,
covariates = cov... |
ca620dc55bab335b3b9600d154a43acd8d7ba6ae73de18d2158c7e85d58a6ffb | R | 15,741 | 320 | # 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... |
560d9e5feea323cb052e62df6cef312fd55aed9a76c86f40810109adeb8b2571 | R | 15,753 | 483 | ---
title: 'PANAS Analysis'
author: "Dr Emily Stanyer"
date: "`r Sys.Date()`"
output:
html_document:
toc: true
df_print: paged
pdf_document:
toc: true
number_sections: true
params:
data_dir: Data/raw/PANAS
data_file: PANAS_data_raw.csv
out_dir: Output/PANAS
fig_dir: Figures/PANAS
clean_dir... |
7b060e123b5ad3272848299bcf709b1bdd8ef36adce4f9dffcf2ec56fa64a406 | R | 15,773 | 335 | ---
title: 'SCENIC: Introduction and setup'
subtitle: SCENIC (Single Cell rEgulatory Network Inference and Clustering)
abstract: SCENIC is a tool to infer Gene Regulatory Networks
and their associated cell states from single-cell RNA-seq data.
This introductory vignette provides an overview of the steps of the work... |
d1a3367c1911fd9bcbff3800b802bd1824a80d9b561b5c7b6fbe40861ec73be8 | R | 15,796 | 370 | # ============================================================================
# Figure 4D: ISR Scores by Proliferative Group
# ============================================================================
# This script compares ISR scores (Avg_Factor1) between Proliferative vs
# Non-Proliferative tissues (split at medi... |
be9e250b8bb483d2be1f0d6a7cdc7c587b96045dbcfe78ae77dfce6832d84532 | R | 15,806 | 390 | #' banc-alignment-sweep-eval — Evaluate alignment sweep runs.
#'
#' Reads all sweep outputs under a given data directory, computes per-run
#' metrics + cross-run agreement, and writes summary CSVs + a comparison PDF.
#' Read-only on SeaTable.
#'
#' @section Reads:
#' - `data/<dataset_dir>/banc_<prefix>_both_meta.csv`... |
5a18575ab9883dc536f30569bb3829fe7f16ab9434bb58e5887e8445bd9d3c40 | R | 15,817 | 181 | #' Plot target conservation
#'
#' Plots the cross-species conservation of target genes within a conserved/diverged module and marks the targets that are particularly responsible for the conservation/divergence.
#'
#' To determine whether a module as whole is conserved, diverged overall or diverged on a specific lineage... |
cb3a800ea77e62b47c45455f3cadd94d091fa7571043c0b1b1aba2a8bfc29dfc | R | 15,828 | 382 | # ==============================================================================
# ICLE Project Configuration
# ==============================================================================
# This file centralizes project paths and analysis parameters for reproducibility
# Author: Osama Shiraz Shah
# Last Updated: 202... |
07adce9f5db0780f1444bd45c9a1fc423d1161d53f546e3876f876e63013204e | R | 15,850 | 458 | ---
title: "tumor_preprocessing_6_manual_annotation_refined"
output: html_document
date: "2025-12-15"
---
```{r}
library(Seurat)
library(readr)
library(tibble)
library(dplyr)
library(viridis)
library(presto) # used to greatly improve FindAllMarkers efficiency
```
# define funcitons
```{r}
# Define a function to run U... |
e01c723f81c2a4f6876ee853b532000864da5d42b8f2aaa5aea9a18457a6c51d | R | 15,853 | 150 | ---
output:
github_document:
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
<!-- github markdown built using
rmarkdown::render("README.Rmd",output_format = "md_document")
-->
# multinichenetr
<!-- badges: start -->
[
invisible(lapply(load_libraries, function(x){suppressMessages(library(x, character.only = TRUE, quietly = TRUE))}))
#############################################################################... |
9591f574edd6923f5ba9209adb3fa54b325813422e275f5971fc8a5692f5763d | R | 15,860 | 570 | library(tidyverse)
library(reticulate)
#Getting significant markers of each population
# Specify the path to the .h5ad file
h5ad_file <- "./ppgl_pbulk.h5ad"
# Read the .h5ad file using reticulate
anndata <- import("anndata")
py_index <- import("pandas")$Index
adata <- anndata$read_h5ad(h5ad_file)
counts <- t(ada... |
094a09603f6051bbc08148e87e8725d5e4b380ea721eae8e33463594e57fbc73 | R | 15,895 | 363 | # TUE008 Phenotyping Study
# Corinna Schulz
# 16.06.2023
######################################################################
# Read in Ghrelin Blood data from Lab Files
# Make first Plots to inspect acyl and des-acyl data
# save final csv with all blood data and preprocessed ghrelin values
#####################... |
2b123bbfbf40c0a8e24bc6132efca8eac204b03cc7218adf628ac1878113f067 | R | 15,914 | 239 | # Longitudinal development of ITS - Tau values ---------------------------------
library(readr)
library(readxl)
library(tidyverse)
library(dplyr)
library(sjPlot)
library(multcomp)
library(AICcmodavg)
library(flextable)
library(rempsyc)
library(lme4)
library(lmerTest)
set.seed(42) #Set seed for reproducibility
table_... |
a8892a197b388028dcc02b1d5eff67f7846d4950b3c77e3d3acb1ea47efa51ee | R | 15,952 | 345 | ##################################
# Assign malignant cells to CARE IDHmut metaprograms based on p-value calculation for the first round
# Author: Kevin Johnson
# Date Updated: 2026.04.01
##################################
library(tidyverse)
library(RColorBrewer)
library(viridis)
library(Seurat)
library(harmony)
libra... |
749a9cea8c3d3663eaa69fcde1cf8602321a4596ae5bad473f890eb1a54c75dd | R | 15,962 | 449 | #' Simulation-Based Calibration
#'
#' Runs SBC for an EMC2 model and associated design. Returns
#' normalized rank (between 0 and 1) and prior samples. For hierarchical models the group-level mean and
#' the (implied) group-level (co-)variance are returned.
#' For non-hierarchical models only the subject-level paramete... |
2bd9035366126e1be4f6ed48efeb1326c19890c355b42bb6bcfdafb9edae93e7 | R | 15,999 | 370 | make_missing <- function(data,LT=0,UT=Inf,LC=0,UC=Inf,
LCresponse=TRUE,UCresponse=TRUE,LCdirection=TRUE,UCdirection=TRUE)
{
censor <- function(data,L=0,U=Inf,Ld=TRUE,Ud=TRUE,Lr=TRUE,Ur=TRUE)
{
if (Ld) Ld <- -Inf else Ld <- NA
if (Ud) Ud <- Inf else Ud <- NA
snams <- levels(data... |
74d08cd94373f73df561660ee65e30057678f52be0aff9f9906826c4968d3895 | R | 16,009 | 501 | # deal with duplicated rows in banc_meta
source("banc/curation/banc_curation_init.R")
banc_meta <- banctable_query()
banc_meta <- banc_updateids(banc_meta) %>%
distinct(`_id`, .keep_all = TRUE)
# get franken meta
franken_meta <- franken_meta()
# replace semi-colon separated list with commas
franken_meta <- franke... |
99bf45fa08762173cb74ee0427412c08df94d192613ae77837265790ff914f3c | R | 16,011 | 258 | neuprint_get_adjacency_matrix_memo <- memoise::memoise(neuprintr::neuprint_get_adjacency_matrix, ~memoise::timeout(168*60*60))
combine_matrix_rows_cols_by_group_memo <- memoise::memoise(function(adj, groups=NA, row_groups=NA, col_groups=NA, sparse = FALSE) {
if (all(is.na(groups)) & (all(is.na(row_groups))|all(is.na(... |
be1ac1307b355e00fed9e8d44558bd1b8ed9bd5d041ec234c21771e50dbd6e10 | R | 16,074 | 375 | ---
title: "Video evaluation via SoSci"
author: "Irene Sophia Plank"
date: "2022-10-05"
output: html_document
---
```{r setup, include = FALSE, warning = FALSE, message = FALSE}
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = '/home/emba/Documents/EMBA/stim_evaluation')
library(knitr) # ... |
b51b511736c007b392f9f2e6a9db374eb060585ec0163649af28c1ae51a86e27 | R | 16,135 | 353 | # load packages
library(patchwork)
library(Seurat)
library(BPCells)
library(rhdf5)
library(DropletUtils)
library(DropletQC)
library(dplyr)
library(Matrix)
library(ggplot2)
library(plyr)
library(tidyverse)
library(tidyr)
library(ggpubr)
library(reshape2)
library(rio)
library(data.table)
library(harmony)
library(DESeq2)
... |
f230ded96600f59dfee50ecd90e71e09deedc9c7c97489563812ccd7f25d1d69 | R | 16,158 | 184 | #' Find conserved and diverged target genes within a module
#'
#' Calculates a contribution score for each target gene in a conserved/diverged module and finds genes that are particularly responsible for the conservation/divergence.
#'
#' To determine whether a module as whole is conserved, diverged overall or diverged... |
a6bf56352628665c3d4b1757a8681ea4d753b18169e98174d87bbc2d9bebf0ce | R | 16,163 | 420 | ###############################################################################
## Unified Color Configuration for DRP1 Bulk RNA-seq Analysis ##
## ##
## This file provides a SINGLE SOURCE OF TRUTH for color schemes used ##
##... |
d9fc06124eba5a766b3f3ed438330b361bd94d24fc15e8ef4d92c8507205834b | R | 16,197 | 462 | RNGkind("L'Ecuyer-CMRG")
set.seed(123)
# When working with lM it is useful to design an "average and difference"
# contrast matrix, which for binary responses has a simple canonical from:
ADmat <- matrix(c(-1/2,1/2),ncol=1,dimnames=list(NULL,"d"))
# We also define a match function for lM
matchfun=function(d)d$S==d$lR... |
f078fec176811eeff42a7c1cb370d7a5a486d838d33e299cdeabc1fc76135720 | R | 16,211 | 358 | # =============================================================================
# Supplementary Figure 4 — Models 2–5: Impact of NFB Self-Regulation on Animal
# Detection and Recognition
# =============================================================================
#
# Paper: ReFOFA (NCOMMS-2... |
eee554327fb937f52bc761a17b4341b565e1b92634639dd2c2a7b763acb53703 | R | 16,251 | 426 | #' banc-vnc-type-review-images — Generate review PNGs for VNC type changes.
#'
#' For each row in `vnc_type_changes_reveiwed.csv` with `accept_new == NA`,
#' render a three-mesh comparison PNG: BANC neuron (blue), best MANC NBLAST
#' match for the old SeaTable type (red), best MANC NBLAST match for the
#' new effective... |
3135f1cdcf75880e3df641ace3464f0abfaab7e7af671b30ec79ea9b16136deb | R | 16,275 | 340 | #####################################################################################
###############--------------- TEST RETEST RELIABILITY ---------------###############
#####################################################################################
### In this script:
# (1) Intra-class correlations
# (2) Cor... |
8ff37391d74ea0f32be74ee3d5800163ee8896eb3559ed9d4ddf8abcab221f06 | R | 16,296 | 354 | library(maSigPro)
library(ComplexHeatmap)
library(circlize)
library(ggalluvial)
library(viridis)
# generate dataframe for GC_HP and GC_DG separately
df.GC_HP <- df.F%>%
dplyr::select("Protein.IDs", contains("P1_HP"),
contains("P3_HP"), contains("P5_HP"))
df.GC_DG <- df.F%>%
dplyr::sele... |
ad1cebd4ba0d832b75241561327a10acc8277e4dcff0bd87baaa7aed5ecec9d5 | R | 16,299 | 457 | #!/usr/bin/Rscript
#' Test Association Between Predicted Expression and Phenotype
#'
#' This script tests for associations between predicted gene expression (GREX)
#' and a phenotype of interest. Supports both case/control (logistic regression)
#' and quantitative traits (linear regression).
#'
#' Uses parts system ... |
aa658bc9226a35719d54b3feb5df5c0216b90a208ae10e3052179ce58d6ee046 | R | 16,327 | 302 | ##########################
### GET FAFB META DATA ###
##########################
source("banc/banc-startup.R")
# Run locally
drosophila_neurotransmitters <- "/home/ab714/drosophila_neurotransmitters/"
banc.meta.save.path <- "/Volumes/neurobio/wilsonlab/banc/meta"
#banc.connectivity.save.path <- "/Volumes/neurobio/wils... |
1c179572ce6af1f2d40e24d1583fe80947328168e4350fb0610aa76594aeca23 | R | 16,332 | 508 | #!/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", "--RData", required=TRUE, help="load pmat RData")
parser$add_argument("--mat", defau... |
b11bf5131ff8219cdd2df5be6884c51c5afbdb1dfd6faa0aac4236e2895fe273 | R | 16,349 | 419 | ---
title: "Fig4"
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE)
```
## Fig. 4: statistics and panel figures
Panel A) number of FDR significant cortical regions (out of 34) per CNV/NPD for cortical thickness (up, red) and surface area (down, blue). B) Reg... |
031219363cf599ed1800b77fe6e39d0b1bddd7bb94fb3ff54118c6b4b5d6df15 | R | 16,351 | 480 |
setup <- function(dat,at) {
if (at == 2){
dat$`_last_vname` <- tail(sort(data$record_id), 1)
dat <- set_attr(dat, "active", rep(1,pop))
dat <- set_attr(dat, "age", data$age)
dat <- set_attr(dat, "status", status_vec)
dat <- set_attr(dat, "HIV", get.node.attr(dat$nw[[1]], "HIV"))
infTime_... |
0c12df75e69e75504b1fec5e5ec6df124e24e8f43a7bac40928ec8e87c8b5e64 | R | 16,375 | 212 | rm(list = ls())
setwd('/Users/wangz21/Library/CloudStorage/OneDrive-TheMountSinaiHospital/Huang_lab/manuscripts/ADASE')
tmp <- lapply(c('ggplot2','gridExtra','writexl','readxl','gg.layers','ggrepel','reshape2'), library, character.only=T)
#### Load in related information
### AD GWAS gene from kuan
tmp <- as.data.frame... |
1a603e13fabe7ec6e3292fe5e072ffeba141d3d8afa868e2afcc1d0754f75b54 | R | 16,378 | 390 |
# Age_vs_Chose_Comparison.R
# ============================================================================
# Purpose: Read per-tissue CSV files, compute all 17 Spearman comparisons
# (12 Factors + 4 single genes + 2 gene averages) vs AGE, write CSVs.
#
# Inputs:
# - Per-tissue CSVs from tissue_expression_da... |
951b1b93f4ec090d109e509cf6fc21302fb6c94aad55bf88aae85191f004820f | R | 16,383 | 365 | ---
title: "MultiNicheNet analysis aPD1 Breast Cancer: Cohort 1 - EvsNE - qsub demonstration"
author: "Robin Browaeys"
date: "2024-05-13"
---
```{r}
library(tidyverse)
library(qsub)
```
```{r}
sce_path = "/group/irc/personal/robinb/BreastCancer/output/sce_cohort1_updated.rds"
output_path = "/group/irc/personal/robinb/... |
6fb06a34a708ae19a001b34bdaf6cb7bf3f676d2be91b5b0ccf9e225a4656624 | R | 16,392 | 280 | here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS11.R")
library(tidyverse)
library(here)
library(ape)
library(ggbeeswarm)
library(patchwork)
fig_dir <- here("data/paper_figures_and_tables/")
## Sequence divergence VS network divergence ----------------------------
# load module conservation ranking
modu... |
705fe66084aa6a3148b8154ae1b2b4308e2147e8159ab927d672ab571042dc96 | R | 16,419 | 309 | ##################################
# Analyze infercnv metadata to revise uncertain malignant classification for CARE oligodendroglioma samples
# Author: Kevin Johnson
# Date: 2026.03.20
##################################
library(tidyverse)
library(purrr)
library(ggdist)
library(viridis)
library(Seurat)
library(harmony... |
f994a0f2f9835ab85914d3f89f646af616429bbb369cce13729dcc4c8cda6fd0 | R | 16,428 | 519 |
# Control F and then replace "Factor1" with Factor_
#Control F and replace the chosen gene name but make sure that the gene list csv stays with GDF15 or it wont run
rm(list = ls())
# BiocManager::install("edgeR")
# install.packages("readxl")
library(tidyverse)
library(edgeR)
library(corrr)
library(dplyr)
library(ti... |
4bd9bf78e45f197d03442990da621623df8d24d8ae1c44defa90cebc360e7a15 | R | 16,440 | 487 | ---
title: "02 — snRNA-seq Meta-integration: Three-dataset RPCA, Neuronal Subtypes, and DE"
---
This script integrates the Basak snRNA-seq data with the published Weber et al.
(2024) and Siletti et al. (2023) LC/pons datasets, annotates the integrated
object, performs neuron-level subtype analysis, and runs differenti... |
a7acb25cf3a02e7e4d3fdfd1e035e1941fe5c335d29d23ee0bad3d655712b4fe | R | 16,512 | 329 | # Load required libraries
library(ggplot2)
library(ggrepel)
library(dplyr)
library(tibble) # To use rownames_to_column
########## Human gene count ##########
# Define Target Comparison
Target_comparison <- 'FILTERED_1_MTLEALL_NL'
Target_group_name <- '1'
Target_comparison <- 'FILTERED_2_MTLEHS_NL'
Target_group_name ... |
3fa6f6d77bcb6f9318de1fbeafa3c83ff847e08529de3721e8016cb580376bbb | R | 16,521 | 326 | # Check the 1-1 orthologs and orthogroup overlaps
# Get the DEGs
model_results <- list.files(pattern="*.csv",
path = "~/2023-species_comparisons/2024_results/deseq2_degs/")
files_full <- paste(
"~/2023-species_comparisons/2024_results/deseq2_degs/",
model_results, sep = ""
)
for (fil... |
96adf186aabae3b626eccc9a88ce9ca8dc00a9e901fa4b9e1b0cd9093523ec9c | R | 16,523 | 464 | # flytable disk caching with delta sync based on _mtime column
#' Fetch current server time from flytable
#'
#' @param table Table name to query (used to verify connectivity)
#' @return Character timestamp from server
#' @keywords internal
flytable_now <- function(table='info') {
res=flytable_query(paste('select now... |
b80d2654df67a43b7555323976569a11feae7350055ceee6f4ed92d279330e4e | R | 16,530 | 401 | #' banc-update-seatable — Master SeaTable integration orchestrator.
#'
#' Top-level driver: (1) update root_ids in SeaTable, (2) save a snapshot,
#' (3) merge identity data from `banc_ids.csv`, (4) update
#' region/cell_class/nerve/nucleus from `banc_meta.csv`, (5) source
#' update-matches / update-celltypes / update-s... |
49ceb33e976101fbf4c1353f8b0c7cdb5058d030e13f85c36ce52b066581b5c6 | R | 16,556 | 398 | #############################################################
###### File Name: ACT_Harmonization_Script_20230123.R
###### DATE: 2023-01-23
###### Authors: Jeremy Pasteris (Gary Beecham, PI)
###### Purpose: This script is intended to transform data received from ACT and delineate the exact ways
###### that its var... |
b2965ff26ee7bd20f477ee10bf2c3913aa4da76eaa630b36ba30beb24629f68c | R | 16,598 | 409 | # =============================================================================
# InterProScan TSV → Gene-level GO Term Table
# Non-model organism / custom genome annotation parser
# =============================================================================
# Input : InterProScan TSV output (15-column default format... |
d36af79a2c6cee3aae05f8502b17e97f5ed0b907b0193cd5fcb41ee251d7d74e | R | 16,636 | 560 | ---
title: "Proteomics"
author: "Izabela Mamede"
date: "2025-11-12"
output: html_document
---
```{r}
library(tidyomics)
library(ggplot2)
library(fgsea)
```
load all
```{r}
infile <- "data-raw/amica_protein_groups_all.xlsx" # ajuste o caminho se preciso
raw_prot<-read_xlsx(infile) %>% clean_names()
# --- Pacotes
su... |
09795e851720a06bc34ee86ba2ce85c4042c055694dd23d25a53f8fd94ba3f8f | R | 16,669 | 531 | ---
title: "dMRI_GAM_Analysis"
author: "Neslihan Yildiz Ozhan"
date: "2024-12-10"
output: html_document
---
```{r, COI Overall ~ dMRI}
library(mgcv)
library(dplyr)
library(openxlsx)
data <- read.csv("~/Desktop/abcd_coi.csv")
data <- data %>%
mutate(
across(ends_with("_Ten1_FA"), scale),
across(starts_with(... |
c9dc6c09f6fa7d362e13e3ea2896999f381c1756cf64af4e0376385036cf1086 | R | 16,687 | 465 | # script to update metadata based only off cell_type entry, when the cell_type
# matches one in franken_meta
# do for all cell_class contains central_complex
# do for all neurons with cell_type_source contains lee_lab
# cell_info_id tag is cell_type
source("banc/curation/banc_curation_init.R")
# get banc_meta
banc_m... |
f19a1a3e3fce0853b70125a29c24fcfe8cf5934598c28b27cabecdf28bc2d407 | R | 16,714 | 561 | library(tidyverse)
library(glue)
library(qs)
library(ggplot2)
library(patchwork)
library(ggpubr)
library(survival)
library(survminer)
library(clusterProfiler)
library(org.Hs.eg.db)
library(BSgenome.Hsapiens.UCSC.hg19)
library(ReactomePA)
library(viridis)
library(glmnet)
library(ggvenn)
library(ComplexHeatmap)
library(r... |
991a1284d99b8bcb9c70988658ce76ebcebec48d05eed06efa101480018b4615 | R | 16,748 | 390 | ---
title: "Towards unraveling fatigue"
author: "Jantine Röttgering"
date: "10-5-2022"
output: html_document
---
##### Email: j.rottgering@amsterdamumc.nl
##### Purpose of script:
Analyses of the 2022 manuscript on fatigue in glioma patients.
##### Status:
Finished
##### Review History
Reviewed by: Vera Belgers
Da... |
eee2df2d88790aef9b10d0744e4d613309c33e726cc9fb1555b570b709154223 | R | 16,768 | 400 | #' banc-nblast-plot — NBLAST score distribution + per-region matching inventory plots.
#'
#' @section Reads:
#' - `banc_meta.csv`, per-dataset compiled NBLAST feathers
#'
#' @section Writes:
#' - `inst/images/nblast/*.png`, `inst/images/cell_types/*.png`
#'
#' @section Invoked by:
#' `o2/production/o2_banc_update... |
38f58bbf510d3feb9b7e3ea194962a707d354c7f715a7275a3d8a8a131442c73 | R | 16,812 | 481 | 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 neurons... |
f2177b5426b2a750d403fdb7ffa209b04147982b69487e622167cdfdce6b79fc | R | 16,822 | 450 |
pacman::p_load(data.table, dplyr, biomaRt, GenomicRanges, Biostrings, BSgenome, stringr)
##--------------------------------------------------------------------------------------------------------
## Define paths
##--------------------------------------------------------------------------------------------------------... |
5438469d6e1679b4a84f42cc35fb6b4b1f92a00cac27d16a6c533d72ec81df9a | R | 16,863 | 331 | library(metacell)
# devtools::load_all('~/src/metacell.flow')
library(metacell.flow)
suppressPackageStartupMessages(library(ComplexHeatmap))
library(matrixStats)
# wd <- '/net//mraid20//export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
db_path <- file.path(wd, 'scdb')
scdb_init(db_path, force_r... |
ec8d68411c6f68ab2def617ce2f99758a2dbccaf38cbaa32a9486b35c3b717f4 | R | 16,881 | 301 | library(ggplot2)
library(reshape2)
### generation of dfs
# Human (same for both versions)
file_path <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/07.DESeq/01.DESeq_files/DESeq_FILTERED_1_MTLEALL_NL.txt"
DESeq_FILTERED_1_MTLEALL_NL <- read.table(file_path, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
DESeq_FILTE... |
1407b96f9f863ed967df7823f7fe719d8e542ff9928c80229eb22d45a348ab74 | R | 16,883 | 476 | #!/usr/bin/Rscript
#' Predict Gene Expression Using BMI-Dynamic Models
#'
#' This script predicts gene expression in biobank cohorts using pre-trained
#' BMI-dynamic models. It accepts genotype data, BMI values, and outputs
#' predicted expression (GREX) for genes on a specified chromosome and part.
#'
#' The part s... |
1dc8a83dc7bc059e710892d0b6be162e38d5debe47c5cc815fc85990fd2faa10 | R | 16,942 | 400 |
sample_store_factor <- function(data, par_names, iters = 1, stage = "init", integrate = T, is_nuisance, ...) {
n_factors <- list(...)$n_factors
Lambda_mat <- list(...)$Lambda_mat
if(is.null(n_factors)){
n_factors <- ncol(Lambda_mat)
}
if(!is.null(Lambda_mat)){
f_names <- colnames(Lambda_mat)
} else... |
3c1087913f18ed1282a0bc38a4c9d1678df9015e7b62190c834c0d727bf8351d | R | 16,942 | 520 | # ===============================================================
# 🟦 Descriptive Visualization — Categorical Barplots
# ===============================================================
visualize_categorical_barplots_ui <- function(id) {
ns <- NS(id)
tagList(
with_help_tooltip(
checkboxInput(ns("... |
c62c0099a766c8d2e0c7d2cf6ca4336dcfd997db140392d302322b53cf86e4cd | R | 16,961 | 376 | ##################################
# Visualize the snATAC-derived transcription factor motif activity scores across RNA cell states
# Author: Kevin Johnson
# Date Updated: 2026.04.10
##################################
library(tidyverse)
library(ggpubr)
library(EnvStats)
library(purrr)
library(broom)
library(scales)
p... |
5d9cbee54c363fe08d6e3f3382793219f37ab2580091c326535c95d0069372ef | R | 16,970 | 336 | # Load required libraries
library(ggplot2)
library(ggrepel)
library(dplyr)
library(tibble) # To use rownames_to_column
########## Human gene count ##########
# Define Target Comparison
Target_comparison <- 'FILTERED_1_MTLEALL_NL'
Target_group_name <- '1'
Target_comparison <- 'FILTERED_2_MTLEHS_NL'
Target_group_name ... |
db3c975e8c9853b191832134d99bc59cea21fe72a380dd2dcc72845ef2d7c24b | R | 17,009 | 589 | ###############################################
## 01_cognitive_FA_analyses.R
## Data preparation, PCA, ANCOVA, regressions
###############################################
## ---------------------------
## Packages
## ---------------------------
pkgs <- c(
"qdapRegex",
"readxl",
"readr",
"dplyr",
"ggplot2",
... |
61f1e8ef3f4e4878e0606732dbf64afda1eeaba8490532c88f457a9eee7ae5df | R | 17,012 | 448 | #' Seeding PANDA Interactions to Derive Epigenetic Regulation
#'
#' This function runs the SPIDER algorithm
#'
#' @param motif A motif dataset, a data.frame, matrix or exprSet containing 3 columns.
#' Each row describes an motif associated with a transcription factor (column 1) a
#' gene (column 2) and a score (column ... |
81c78907337b462b8f82e60def09e831d13fb440ee8b361f73ec95776d970e4b | R | 17,018 | 372 | # ------------------------------------------------------------------------------
# NeuroConnectivity - Morphological analysis
#
# Author: Marlies Verschuuren
# Modified by: Marlies Verschuuren
# Creation date: 2022-01-13
# Last Modified: 2023-12-20
# ---------------------------------------------------------------------... |
850e8fbaf302d58ace250d4e670103c60dbb63af522cfc5a2f0717ad705c5abb | R | 17,056 | 566 | ---
title: "Neurocognitive_GAM_Analysis"
author: "Neslihan Yildiz Ozhan"
date: "2024-12-10"
output: html_document
---
```{r, COI Overall ~ Cognition}
library(mgcv)
library(dplyr)
library(openxlsx)
data <- read.csv("~/Desktop/ABCD/abcd_coi.csv")
# Z-score scaling
data <- data %>%
mutate(
across(ends_with("_Ten... |
d643024c993097ac66c6b98e3a6998ac72b7ff5b5dddd1d4c68cc930b10c63e7 | R | 17,067 | 509 | # ===============================================================
# 🧾 Table Analyzer — Descriptive Statistics Modules
# ===============================================================
descriptive_ui <- function(id) {
ns <- NS(id)
list(
config = tagList(
uiOutput(ns("inputs")),
tags$details(
... |
ff5aadf73e534b4228f62ab7a38eacf54b2a5ffdfb3bc81fee078793b3189248 | R | 17,101 | 524 | ---
title: "adherence"
author: "Dr Emily Stanyer"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE)
# Load libraries
library(tidyverse)
library(lubridate)
library(ggprism)
library(writexl)
library(ggpubr)
library(rstatix)
... |
b5c6fdad532131de3e8dae038c8b765b61a990bf4e8cbf4965d865afe82f7e07 | R | 17,139 | 266 | #' Calculate module eigengenes
#'
#' Calculates the module eigengene for each input module.
#'
#' A concept adapted from WGCNA, the eigengene summarizes the expression profile of an entire module, and it is calculated as the first principal component of the module expression data. Effectively, it is a weighted mean of ... |
aa3172b9e45547fa42eab0453579f8093551bd64c97da1807e4bcab5edb5a6ea | R | 17,223 | 421 | #############################################################
###### File Name: ROSMAPMARS_Harmonization_Script_20220826.R
###### DATE: 2022-08-26
###### Authors: Jeremy Pasteris (Gary Beecham, PI)
###### Purpose: This script is intended to transform data received from ROSMAPMARS and delineate the exact ways
#####... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.