sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
69ee9ebd6c7a6ce770ab5af8a89be7655174ed38bf204751f5ae6b8a6330357d | R | 19,458 | 686 | ---
title: "Getting Started with SpNeigh"
author:
- name: Jinming Cheng
affiliation:
- &duk_nus Centre for Biomedical Data Science,
Duke-NUS Medical School,
Singapore, 169857,
Singapore
# email: jinming.cheng@outlook.com
date: "`r format(Sys.time(), '%d ... |
8c8e468b3576110c11d24221e968cc586f6aa0bb98e583f420ad6419f9932583 | R | 19,472 | 456 | #' Native R Implementation of Connectome Influence Calculator
#'
#' Create an InfluenceCalculator object using native R implementations.
#' This provides a fast, pure R alternative to the Python implementation.
#'
#' @param edgelist_simple Data frame with edge list containing columns 'pre', 'post',
#' 'count', and '... |
2c1aa5059f05bc0bd8d75300ede8989846715b7584387b2682c4299f4ea7bf61 | R | 19,487 | 380 | ---
title: "SAHA"
author: "Dom Acri, Richard Mustaklem, Liam Horan-Portelance"
date: "2024-08-21"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{SAHA Vignette}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
## Table of Contents
- [Installation](#installation)
-... |
2197fa3cb532babb56460452cb973bf456762ab0dd0f9faea9716ac430fed296 | R | 19,497 | 361 | ###*GSE160189-----
###**读取数据------------
library(data.table)
Hippo_snRNA<-fread(input="./GSE160189_Hippo_Counts.csv", stringsAsFactors = T,header = T)
dim(Hippo_snRNA) #17180 131326
class(Hippo_snRNA)
head(Hippo_snRNA[1:4,1:4])
sample_1 <- str_split(colnames(Hippo_snRNA),'_',simplify = T)[,1]
sample_1 <- unique(sample... |
753d907f6d1e17c40fc420baa85322e5047fce0db4071dcee05687a8e7991e03 | R | 19,545 | 467 | # source ~/load_modules.sh
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(DESeq2)
library(SingleCellExperiment)
library(apeglm)... |
ee3cdf090f54eac2739d6f7c4ede8508a652d4ab30b0962745c6eceb259fa463 | R | 19,547 | 462 | ---
title: "Overview of all datasets"
output: html_notebook
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
```{r, message=FALSE, warning=FALSE}
# library(Epilepsy19)
library(ggplot2)
library(magrittr)
library(Matrix)
library(pbapply)
library(conos)
library(CellAnnotatoR)
library(readr)
library(tidyverse)
library(phea... |
8cb88debbf48b15e097e2c5b76b5af1ed2ee3b079ccb123809e5afa82250dd7f | R | 19,609 | 711 | require(readxl)
require("changepoint")
root="//eu.boehringer.com/users/bib/users1/duhoffma/Desktop/AA_pipeline/aa_test/"
freeze_rule=1 #length in seconds for a bout of immobility to trigger freezing
itilength=45 #in seconds
max_shock_time=15
tdir=paste(root,"rtrack",sep="")
tfiles=list.files(tdir)
csvd... |
4648b39d3119fbc1dcd6aa96d5ee8adaf034342c96b1911d22e791d797434796 | R | 19,665 | 510 | #' @title Object to store SCENIC settings
#' @aliases loadInt show
#' @rdname ScenicOptions-class
#' @description
#' This class contains the options/settings for a run of SCENIC.
#' Most SCENIC functions use this object as input instead of traditional arguments that need to be set individually.
#'
#' The object has... |
fbe5808a66a84bfca8ece34de11fdecf0dd5f843bb1367e85073cfee2752c62e | R | 19,682 | 526 | #' banc-vnc-retyping — Cluster + retype female-specific efferent VNC neurons.
#'
#' Clusters ALL female-specific efferent VNC neurons (typed + untyped)
#' using NBLAST + upstream connectivity. Already-typed neurons act as
#' anchors that define cluster boundaries; clusters with a dominant
#' existing type inherit that ... |
b1a82b961179985334b8fea06166e55296ef09e1d439365c84a63ffdfacbc68b | R | 19,709 | 535 | # MotifbreakR AD risk variants annotation
# 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 activate r4.4.1_env
#conda de... |
d8d6e13044dfb482f4b5f02fffc51ccbed68c8aa4f295980081785044df6de29 | R | 19,754 | 520 | ###############################################################################
## Cross-Database Pooled Dotplots – Integrated Pathway View ##
## Loads checkpoints, NO re-running of GSEA ##
###############################################################################
#... |
f4466bf8a6ac526f084b45a9a054b94557a836f04fa0cc30ec9e37d1afe4363d | R | 19,759 | 483 | test_that("query works", {
ac=try(flytable_login())
skip_if(inherits(ac, 'try-error'),
"skipping flytable tests as unable to login!")
# sometimes the server seems to give up when requesting a token from each base
fat <- try(flytable_alltables())
skip_if(inherits(fat, 'try-error'),
"skipp... |
52f919707c72ea0cb91934b733e8651674eeeb73f31de4cc691d0ec5eb114206 | R | 19,805 | 559 | ### R SetUp
cat("=== R Setup ===\n")
options(expressions = 5e5)
cran_mirror <- Sys.getenv("R_CRAN_MIRROR", "http://cran.rstudio.com/")
options(repos = cran_mirror)
if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("methylKit")
BiocManager::install("Met... |
a34115d4d328bc09feeeb90831a56f232ef468630340289ce1780833b26bac8e | R | 19,832 | 406 | #load libraires
library(ggrepel)
library(ggplot2)
library(dplyr)
library(clusterProfiler)
library(org.Hs.eg.db)
library(GenomicRanges)
library(GenomicFeatures)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
library(randomForest)
library(e1071)
library(glmnet)
library(lme4)
library(rstanarm)
library(class)
li... |
a9e67ee4be2efd7c344bcf94c0e73e4473e10f4e662b9dd8a85951475a133b2e | R | 19,835 | 504 | #!/usr/bin/env Rscript
source("banc/banc-startup.R")
# File paths
malecns.path <- '/n/data1/hms/neurobio/wilson/malecns'
save.path <- '/n/data1/hms/neurobio/wilson/connectomes/malecns'
dir.create(malecns.path)
dir.create(save.path)
# Direct Google Cloud Storage URLs (decoded from the Proofpoint links)
urls <- c(
"h... |
b9b260b5e19a30a5e61a55c5092b7ed309103265a4065b28fa58d9cd70e27822 | R | 19,901 | 433 | #' banc-update-matches — Push NBLAST + PNG match columns to SeaTable.
#'
#' Reads PNG review CSVs (mirror, FAFB, MANC, hemibrain, FANC, maleCNS) and
#' NBLAST feather files, combines matches, detects conflicts, and pushes
#' the per-dataset `*_match` / `*_png_match` / `*_nblast_match` / `*_nblast`
#' columns to SeaTabl... |
f1750a6c36dfbdce8a2d64d00bb00623136331a452442f96cbfb6965a1366e9b | R | 19,909 | 430 | ################################################################################
###############----------------- PLOT FUNCTIONS -----------------###############
################################################################################
### Plotting functions to visualize data
## Acceptance rate per effort and ... |
bee63d5b0aff9b4934227dc25a0a2d1db6f3207bebba0c5ba123ef7196c826d6 | R | 19,932 | 562 | library(dplyr)
library(ggplot2)
library(ggprism)
neodb <- readxl::read_xlsx("data/neodb_data.xlsx")
unique(neodb$pmid) %>% length()
neodb$`aa change` <- gsub("p[.]","",neodb$`aa change`)
neodb$`HLA allele` <- gsub("HLA-","",neodb$`HLA allele`)
neodb$`HLA allele` <- gsub("[*]","",neodb$`HLA allele`)
neodb$`HLA allele` <... |
9f6abf7b2d78338cf5f3071aa1da5751c620860a760bf40764a09cd0ce959fb4 | R | 19,960 | 432 | #' alignment-data-sources — Shared CLI / path resolution for alignment prep.
#'
#' Sourced by `alignment/presets/<region>/prep.R` to decide where the BANC
#' edgelist, target (FAFB / MANC / hemibrain / maleCNS) edgelist and
#' BANC-target NBLAST feather come from: the current BANC version's data
#' tree (on O2 or a loc... |
c89f1800646fe3220c012c004b63b7189322fe1d6cc4567708fdf982d6a845ce | R | 20,010 | 719 | # The Broad Institute
# SOFTWARE COPYRIGHT NOTICE AGREEMENT
# This software and its documentation are copyright (2003-2006) by the
# Broad Institute/Massachusetts Institute of Technology. All rights are
# reserved.
# This software is supplied without any warranty or guaranteed support
# whatsoever. Neither the Broad I... |
4ba37f2b517df5bb2e7a0435cc7187cd52729b684001e86dee817c92f971c890 | R | 20,046 | 654 | #### Section: Barplot Construction ####
plot_anova_barplot_meanse <- function(data,
info,
layout_values = list(),
line_colors = NULL,
base_size = 14,
... |
7ce68eae3c499b1e36b32fc250c65d2ff1ebae8ebb48f2e4101db24239fdf1f1 | R | 20,060 | 509 | source("R/starr_ml.R")
library(seqinr)
library(data.table)
library(gplots)
library(RColorBrewer)
library(openxlsx)
#This assumes you've already made the model with starr_ml
#aa_subs is a vector of variants, each entry is a string with mutations separated by a space
#binding: inpath = "ml_bind_keras_full_layer.sizes_c(... |
81b89be4d9a12ef75c894a454b7bf7079a3088eaeb98fb8624b3efa31abe0110 | R | 20,069 | 433 | #' author: Gavin Ha
#' Dana-Farber Cancer Institute
#' Broad Institute
#' contact: <gavinha@gmail.com> or <gavinha@broadinstitute.org>
#' date: January 11, 2018
#' @import data.table
#' @import GenomicRanges
loadBXcountsFromBEDDir <- function(bxDir, chrs = c(1:22, "X", "Y"), minReads = 2){
files <- list.files(... |
8a555e80ce57e84815f8484132b6ea4a9e18104cfafec00ef334e07d692bbcb4 | R | 20,176 | 436 | # Script: LM_models_helper_functions.R
# Purpose: Contains helper functions for linear modeling analysis of gene expression predictions.
# This file provides functions for:
# 1. Data preparation and manipulation
# 2. Expression data processing
# 3. Model prediction handling
# 4. Statistical analy... |
383619e1c3cf2b1c2e5a9d916829e2a7ab7e30f23ba43e5743c65d9362249aae | R | 20,178 | 512 | ---
title: "Figure 5"
output: html_document
date: "2025-10-16"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
Load
```{r}
library(rstatix)
library(dplyr)
library(car)
library(GO.db)
library(Seurat)
library(readr)
library(stringr)
library(clusterProfiler)
library(scCustomize)
library(ggplot2)
... |
0c8526f338433dd42735f3b26c301006110b3c2bf1688fcad581a98443477d12 | R | 20,191 | 295 | suppressPackageStartupMessages({
require(igraph)
library(dplyr)
library(ggvenn)
library(tidyr)
library(ggpubr)
library(rstatix)
})
species <- c('Hsap','Mmus','Pvit','Pmar')
duplicate_pairs <- readRDS("../2.paralog_switching/Combined.S... |
5620abfe92933dd045f00b40385c455520b6eb6bef7654cb1291eb4609520030 | R | 20,231 | 463 | #' prep (optic-lobe preset) — Build BANC + target meta / edgelist / NBLAST / seeds for optic-lobe alignment.
#'
#' Loaded by `alignment/banc-alignment-prep.R --region optic-lobe`. Prepares
#' BANC and target optic-lobe neuron sets, edgelists, NBLAST scores, and
#' seed labels for the iterative connectivity alignment al... |
07e77509b97464dd4a40219672c32cf07c961ecb2e269640c64c07a73a74a193 | R | 20,280 | 426 | here::i_am("scripts/4.paper_figures_and_tables/figure3.R")
library(tidyverse)
library(cowplot)
library(patchwork)
library(foreach)
library(ggtree)
library(ggraph)
library(igraph)
library(ape)
library(CroCoNet)
library(ggbeeswarm)
library(ggrepel)
library(ggsignif)
library(RColorBrewer)
library(here)
wd <- here("data/... |
43e22b901540249b36e22bf44571d42b2cd31f0c7f76156f98e02dc0ab3970e4 | R | 20,334 | 550 | #
# sleuth: inspect your RNA-Seq with a pack of kallistos
#
# Copyright (C) 2015 Harold Pimentel, Nicolas Bray, Pall Melsted, Lior Pachter
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software F... |
1a5f4abdeb23c1abd5bc25d6862c59044674d6f607b10597b064481b9c798844 | R | 20,353 | 324 | ####################################################################
####### paper data import #############################################
####################################################################
Paper_data = read.delim('Paper_data.csv', sep=';', header = TRUE) # data import
head(Paper_data, n = 8) ... |
a5758fc0016c421bb0fa13ad0ed24fd3c679c9ff342ff0af8d997ad2f1154f18 | R | 20,362 | 453 | ---
title: "Fig4C,4D"
output: html_document
date: "2026-01-13"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(Seurat)
library(ggplot2)
```
Run both the interneurons and motor neurons rmd and the regeneration_subclusters rmd to format, unless you have the rds files
```{r}
ne... |
de80a7aa4a5a737906a2a1bc8b4bc2f5868a6eff453fcab8252ecdd11a0fd711 | R | 20,398 | 432 | # Upload data:
bter_wald_clot <- read.csv("~/2023-species_comparisons/2024_results/deseq2_degs/bter_clot_singleModel_052024.csv")
vcar_wald_clot <- read.csv("~/2023-species_comparisons/2024_results/deseq2_degs/vcar_clot_singleModel_052024.csv")
lser_wald_clot <- read.csv("~/2023-species_comparisons/2024_results/deseq2_... |
56184ecf7b9bc2bfe8d14c4513da1e08c5d4829b62d158e67e8306d044e3b75d | R | 20,403 | 523 | ###############################################################################
## 5a.filtered_volcano_supplement.R
##
## Concern: "apply an expression filter (e.g. avg. expression > 0) to further
## highlight the significance of NNAT and other well-expressed genes in Fig. 4a."
##
## This script is ADDITIVE. It produce... |
b47e040e4a473e0f30d288590a2a46835e6f6312fa5b671106a817d7941c7272 | R | 20,413 | 503 | # ============================================================================
# Figure 3D: Journal-Compliant Plots with Individual Data Points
# Journal requirement: show individual data points behind summary values
# ============================================================================
# GTEx version:
# Summ... |
e4d0732ec6fa179fa9c983d2c0e46491a4c41517e46739e3c6f765ffabdbd5e2 | R | 20,465 | 674 | #' @title PheWAS plot
#'
#' @description `fig_phewas` creates a plot visualising results from
#' phenome-wide association studies (PheWAS).
#'
#' @details This plotting function visualises results from phenome-wide
#' association studies (PheWAS) in the form of a Manhattan style plot.
#' Associations are grouped ... |
bef1b3ae823b10db777c409832fe22c9c1fd39d25143781a64ca81c2eb442168 | R | 20,537 | 517 |
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)
source('~/SCRIPTS/utility_functions.R')
set.seed(1234)
####
## PREPARE DATASETS
####
# Load broadly annotated objects
hum... |
cdc2b2e729026bd5defbda3b9f8b5b00cec20a21bd71f4866b23e88299338f54 | R | 20,602 | 619 | library(Seurat)
library(ggplot2)
library(scCustomize)
library(patchwork)
library(RColorBrewer)
library(viridis)
data<-readRDS("/home/rstudio/2023_April_Integration/nodose_integrated_PC30-60_res0.6-2/nodose-integrated-pcs-50-resolution-1.4.RDS")
DefaultAssay(data) = "originalexp"
data <- SetIdent(data, value = "integra... |
19d8efae52597c790ef0ac0c43c464500196314356a0999df7f69615991e314b | R | 20,618 | 534 | #' banc-calculate-neuropil-inclusion — Assign neuropil / region / side to each synapse.
#'
#' Join by stable synapse `id` against `synapse_neuropil_lookup.parquet`
#' first; classify residuals via alpha shapes (pre-computed, fork-parallel).
#'
#' @section Reads:
#' - `banc_<ver>_synapses_<src>.parquet`, `synapse_neur... |
01f84e8b6e9031b5e4ef47b9a1d916e0d1040b5a7ea7bf447647f213ace00546 | R | 20,671 | 586 | ---
title: "Trends"
description: "A guide to trends in EMC2"
author: "Niek Stevenson & Steven Miletić"
output: rmarkdown::html_document
bibliography: refs.bib
vignette: >
%\VignetteIndexEntry{"Trends"}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, echo = FALSE}
rm(list = ls())
library(E... |
fa4dc0acb458b49b749cd9c74753ab621ef6115870bc6352044b2f3409768c0b | R | 20,696 | 545 | # =============================================================================
# Figure 6 — Models 6 & 7: Impact of NFB Self-Regulation on Behavioural
# Detection and Recognition Performance
# =============================================================================
#
# Paper: ReFOFA (N... |
eb4fd64a9f46f1751498a24004e08e8c998627efd5d10e1a9770f1cd656e1f7e | R | 20,879 | 530 | filter_obj <- function(obj, idx){
dims <- dim(obj)
dim_names <- dimnames(obj)
if(is.null(dims)) return(obj)
if(length(dims) == 2){
if(nrow(obj) == ncol(obj)){
if(nrow(obj) == 1) return(obj)
if(nrow(obj) > 1){
if(mean(abs(abs(rowSums(obj/max(obj))) - abs(colSums(obj/max(obj))))) < .01) re... |
058721abe451a0b300e2ce2229dee24c7a248b1475fe3dc553f65d891910f56a | R | 20,932 | 568 | suppressPackageStartupMessages({
library(Seurat)
library(SeuratDisk)
library(scCustomize)
library(SCP)
library(ggplot2)
library(dplyr)
library(knitr)
library(readr)
library(ggsci)
library(scater)
library(DoubletFinder)
library(Trex)
library(SCpubr)
library(b... |
20df458a218ca03d7f0e5d6fc50b578a9fe51bf42196b019b3e9b90a286e9a1d | R | 20,976 | 336 | #############################################
### Calculate MANC flow centrality splits ###
#############################################
source("banc/banc-startup.R")
redo <- FALSE
# Choose MANC skeleton source
skeleton.folder <- file.path(banc.nblast.manc.swc.save.path, banc.nblast.version)
split.master.folder <- ba... |
809231cbd0db8d2e0db51e0fec654d1690a211bf7435135c54f37629a184f882 | R | 20,977 | 395 | ---
title: "Code of runSCENIC_2_createRegulons()"
subtitle: Workflow run by runSCENIC_2_createRegulons()
output:
BiocStyle::html_document:
number_sections: no
toc: yes
toc_float: false
css: corrected.css
html_notebook:
toc: yes
pdf_document:
toc: yes
package: '`r pkg_ver("SCENIC")`'
bibli... |
171495e001bdec2d24b894b7f42abd8973ebbefdd6105f6fb3b5ac97940dd4a7 | R | 20,982 | 461 | #################################################################################
###############--------------- MDD - HC COMPARISON ---------------###############
#################################################################################
### In this script:
# (1) Prep data
# (2) Match HCs
# (3) Confirm effor... |
4a07fbe1797c00b3de2ec1283205f02bcb88d72d56309bd136e0031815b24fdd | R | 20,985 | 616 | #################################################
# IMPORTANT NOTE
# The code used here is the same as that used in Sicorello et al. (2021)
# To make it easier applicable, the novel vulnerability pattern is called "PINES",
# making less code changes necessary
wd <- dirname(rstudioapi::getActiveDocumentContext()$path)... |
16afb44f12dadb444ebd4562fd87e97da3a513b5def01a46729c76d078164971 | R | 21,000 | 568 | ---
title: "N-back Preprocessing"
date:"22/03/2024"
output: html_document
---
### N-back behavioural data analysis scripts for the PEACE Study ('Pitolisant Effects on Affect and Cognition Exploratory Study') (NCT05849675).
This an R Markdown file was created by Michael Colwell (michael.colwell@psych.ox.ac.uk / ORCID ... |
820827426708f049bf2e3500b8fe4f66fbe41025ac5537b7ee663555b8bbcd2e | R | 21,004 | 350 | #############################################
### Calculate BANC flow centrality splits ###
#############################################
source("banc/banc-startup.R")
# Choose BANC skeleton source
skeleton.folder <- banc.l2swc.save.path
split.master.folder <- banc.l2split.save.path
# png.split.folder <- paste0(banc.l... |
3c3703f89973d0f8468e7b6c0b8dfb5636bd234b2279888cbdbc33edff22c14d | R | 21,009 | 696 | library(dplyr)
library(tidyr)
library(ggplot2)
library(ggrepel)
library(stringr)
# ============================================================================
# FUNCTION 1: Process cross-sectional data (PT vs FT)
# ============================================================================
process_crosssectional_da... |
b3f53d2391816e3faf6f1381beaa9ca50d68e50d0e7bd029a4c8c1c130ce5657 | R | 21,070 | 420 | # Load libraries
library(fafbseg)
library(tidyverse)
library(readr)
library(catmaid)
# Use repo-root paths so the script runs anywhere the repo is cloned.
repo_root <- tryCatch(
rprojroot::find_rstudio_root_file(),
error = function(e) here::here())
gt_path <- file.path(repo_root, "gt_np_data.csv")
extra_path <-... |
39a5e66028184cfe785a9821e282cc9f69ddfbc23c9dc0555aad3fcf557ebe00 | R | 21,079 | 492 | library(glmmTMB)
library(dplyr)
library(readr)
library(janitor)
library(ggplot2)
library(DHARMa)
library(scales)
library(svglite)
library(performance)
library(sjPlot)
library(broom)
library(broom.mixed)
library(tidyr)
library(dplyr)
library(JWileymisc)
library(fitdistrplus)
library(insight)
analyze_model <- function... |
0bd1a80dd3a68fad427925f33e2d68eaf235149eaea6bd0c70be375428f4072f | R | 21,138 | 343 | ####################################################################
####### paper data import #############################################
####################################################################
Paper_data = read.delim('Paper_data.csv', sep=';', header = TRUE) # data import
head(Paper_data, n = 8) ... |
61170b0d674977a79e58951d25e6f703863178d8d65515d7a7bb6651403d76b9 | R | 21,230 | 439 | ################################################################################
# Step 2. Identifying regulons (direct TF targets) based on DNA motif enrichment
################################################################################
#' @title runSCENIC_2_createRegulons
#' @description Step 2: RcisTarget (pr... |
2c5abac585be818db8fb24bad5589d13fb0184212c5595d6249ac571b8e38dae | R | 21,234 | 461 | # =================================================================================================
# qc_plots_by_sample()
# -------------------------------------------------------------------------------------------------
# Purpose:
# Automated QC thresholding and visualization for single-cell datasets on a per-samp... |
8e89edddfe19bf45dd588bee524feabf74613a50fdf1cc3f99e0f84303cda9f2 | R | 21,239 | 531 | # script to update banc_meta annotation metadata, based on matching and franken_meta
source("banc/curation/banc_curation_init.R")
# position that separates brain from VNC in y-axis (~middle of neck)
brain_vnc_div_y <- 107000
# get banc_meta
banc_meta <- banctable_query()
# get franken meta
franken_meta <- franken_... |
9a0fc5715198d11a804b4d3ccac36e465bf261d8f9f3d2a0f78df9b36daeafd0 | R | 21,255 | 501 | #!/usr/bin/env Rscript
# -----------------------------------------------------------------------------
# Normalised SynGO running-sum plots for Fig. 5D
#
# Builds four GSEA running-sum figures (G32A/R403C × D35/D65) that share:
# * the same six SynGO synaptic-localized pathways (Tol/Wong colorblind-safe
# palette... |
2f8802c6faa949c6f6c4a7621c14756ec251bbaa5f023c943224f2ddc80b2b49 | R | 21,300 | 591 | library(ggplot2)
library(tidyr)
library(dplyr)
library(stringr)
library(readxl)
library(reshape2)
library(tidyverse)
setwd("")
process_brain_data <- function(metric_name,
results_file,
subjects_file,
bar_color = "#c21e56",... |
189450ff4a5d29d020206b1a254105e57857dd206e5cbe720d7465d8eccd1b39 | R | 21,369 | 588 | #!/usr/bin/Rscript
#' Build BMI-Dynamic Gene Expression Prediction Models
#'
#' This script trains glinternet models to predict gene expression from genotype
#' data, incorporating BMI as a dynamic variable that modulates genetic effects.
#'
#' The script processes genes in parts for memory management and uses 4-fol... |
28916a8474643da0a90a3da36554844910bf7f7c4e87284e3ef532d97dccf0d2 | R | 21,392 | 753 | # legend.position = "top", # match dual-axis THIS IS WHAT WAS CHANGED IN THIS CODE
rm(list = ls())
# BiocManager::install("edgeR")
# install.packages("readxl")
library(tidyverse)
library(edgeR)
library(corrr)
library(dplyr)
library(tibble)
library(ggpubr)
library(readr)
library(ggplot2)
library(ComplexHeatm... |
4eaa47ae1a17a8ef59720d520a127b530f21bad2c4e6b76c41b1d19303bc0ba2 | R | 21,394 | 683 | ---
title: "Ambra Villani's microglia RNA-seq, custom plots"
author: "Izaskun Mallona, Mark D. Robinson's lab, UZH"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
code_download: true
number_sections: true
df_print: kable
them... |
7baa988e0c3665fc6f6a262d9faa3756ef1ae254250be88902f473fc04f48a6c | R | 21,430 | 590 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
######################
### load libraries ###
###... |
019990c9b473b4ac3205d4f7d3dddd933391d45dd9142a8f3fa16dae0c92815b | R | 21,455 | 520 | # Not %in% function
"%ni%" <- Negate("%in%")
# t-test
DiffTTest <- function (object, cells.1, cells.2, genes.use = NULL, print.bar = TRUE,
assay.type = "RNA")
{
data.test <- GetAssayData(object = object, assay.type = assay.type,
slot = "data")
genes.use <- SetIfNull(x = gen... |
6b98ae2543be64e6f764ab46fd0bae03a22186f8d8ceafd2c76725425ca4046b | R | 21,478 | 343 | ####################################################################
####### paper data import #############################################
####################################################################
Paper_data = read.delim('Paper_data.csv', sep=';', header = TRUE) # data import
head(Paper_data, n = 8) ... |
deed7b4ebebddbac9ad80fa515035619471de4c8e4334f7238f3ba3309824b3a | R | 21,498 | 683 | # ===============================================================
# 🟦 Descriptive Visualization — Numeric Boxplots
# ===============================================================
visualize_numeric_boxplots_ui <- function(id) {
ns <- NS(id)
tagList(
with_help_tooltip(
checkboxInput(ns("show_poi... |
6089cdccf0c5b5647e9da1753aab316e1c5c630d613636dc04921db30237f316 | R | 21,539 | 553 | # =============================================================================
# Supplementary Figure 9 — STS Control: Models 6 & 7 with STS
# Detection and Recognition Performance
# =============================================================================
#
# Paper: ReFOFA (NCOMMS-24-11... |
024e93a597a38e03aa21a6f17e5c0f9126afe55eb4eaf33431045e89e9bba6f3 | R | 21,592 | 588 | tell_user('done.\nCreating Figure 2...')
crl_prot = read_tsv('data/crl_proteomics.tsv', col_types=cols()) %>%
mutate(heavy = replace_na(heavy, bql)) %>%
mutate(total = light + heavy) %>%
mutate(proportion_heavy = heavy / total) %>%
inner_join(tissue_meta, by ='tissue')
pivot_tab %>%
inner_join(iqp_meta, b... |
9b37944a3edf6a49570e74fc2f3f14104272ddbbd628a32ee84591212952c052 | R | 21,594 | 496 | ##########################################################################################
# Embedding Methods
##########################################################################################
#' Add a UMAP embedding of a reduced dimensions object to an ArchRProject
#'
#' This function will compute a UMAP em... |
f6c1a2849bbd89dcdedf723961daab874a6f06b9df7ec54578278c69411b6a93 | R | 21,604 | 312 | #' @title lr_target_prior_cor_inference
#'
#' @description \code{lr_target_prior_cor_inference} Calculate the pearson and spearman expression correlation between ligand-receptor pair pseudobulk expression products and DE gene expression product. Add the NicheNet ligand-target regulatory potential score as well as prior... |
6ac3c33a6f10a96126e6b818bc5e8f1f6fd6864f8f630bd163429c2f75ce1501 | R | 21,616 | 459 | ---
title: "Eye datasets"
output:
html_document:
code_folding: hide
# keep_md: yes
date: "`r Sys.Date()`"
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE) #, dev = 'tiff', dpi = 300)
```
## Datasets
The following datasets were used in this analysis:
[G... |
4334f1d5e8deb5610876e1fa8d0b48bd6358db8526d046528a213be749157a19 | R | 21,665 | 693 | ---
title: "Ambra Villani's microglia RNA-seq, custom plots"
author: "Izaskun Mallona, Mark D. Robinson's lab, UZH"
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
toc: true
toc_float: true
code_folding: hide
code_download: true
number_sections: true
df_print: kable
them... |
e4b7ba4de944c131cf910e69ad0914ed9670474c3f57a8c0247b4a66562d9eb1 | R | 21,679 | 534 | #compute effect size [es] based on Hedge's g effect size.
#old vs young comparison
#(pos ES -> higher in old)
#(neg ES -> higher in young)
#adapted from MetaIntegrator (CRAN)
## Effect size between old and young ####
es.g.func <- function(df, variable, Grp, value, smpl){
smpl.size <- df %>%
group_by({{Grp}}) %>... |
93fae531540cd5677f50d0d94f4d5c09e4f51ac4e2a6e63d3a730950726fa7ed | R | 21,799 | 355 | #!/usr/bin/env Rscript
library(Matrix)
library(Seurat)
library(symphony)
library(irlba)
library(tidyverse)
library(readxl)
library(sctransform)
library(glmGamPoi)
library(future)
#######################################################################################################################################
##... |
bbdf4a52a0fbb18005ca9e6f5afd7c797ea5a9056949c5c3bb5523ba87915a6b | R | 21,837 | 546 | # author: Gavin Ha
# Dana-Farber Cancer Institute
# Broad Institute
# contact: <gavinha@gmail.com> or <gavinha@broadinstitute.org>
# date: November 13, 2014
## wrapper that makes subroutine calls to
## updateParameters based on the normal estimate
## method chosen
estimateClonalCNParamsMap <- function(x, N, ... |
106c09956e639502f5e3d5f0c563957a41bc05df46deb3ecef0facd233ae2893 | R | 21,893 | 908 | ---
title: "snapATAC.mba"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
suppressPackageStartupMessages(library("SnapATAC"))
suppressPackageStartupMessages(library("GenomicRanges"));
suppressPackageStartupMessages(library("data.table"))
suppressPackageStartupMessa... |
df76ba8b5b1d247f8347b7b4e7dc443928a92397c56000291fec15636c27d581 | R | 21,909 | 450 | library(patchwork)
library(data.table)
library(ggplot2)
library(stringr)
library(SeuratObject, lib.loc = "/data3/software/R/4.4.1/lib64/R/library")
library(Seurat, lib.loc = "/data3/software/R/4.4.1/lib64/R/library")
library(Matrix)
library(dplyr)
library(tidyr)
library(stats)
library(readr)
GSE160189_celltype_color <-... |
7b237dcf25357f3a8da0b5e4a3ced2044dec511b53edc618616dabc3fcb4cace | R | 21,943 | 715 | context("Tracking")
teardown({
mlflow_clear_test_dir("mlruns")
options(MLflowObservers = NULL)
})
test_that("mlflow_start_run()/mlflow_get_run() work properly", {
mlflow_clear_test_dir("mlruns")
client <- mlflow_client()
run <- mlflow_start_run(
client = client,
experiment_id = "0",
tags = list(... |
8fb76d422377302b1e1c1f07f49aaf0f1c4d7ba9f504b69bd46a0857232b46d2 | R | 21,949 | 381 | #!/usr/bin/env Rscript
library(Matrix)
library(Seurat)
library(symphony)
library(irlba)
library(tidyverse)
library(readxl)
library(sctransform)
library(glmGamPoi)
library(future)
#######################################################################################################################################
... |
65a761d8a2f7817613189552737e45941d712430fe4290fe650243a9a20cd092 | R | 21,950 | 378 | #!/usr/bin/env -S pixi run --manifest-path /app/pixi.toml Rscript
options(stringsAsFactors=F)
## load R libraries
library(SAIGE)
require(optparse) #install.packages("optparse")
print(sessionInfo())
## set list of cmd line arguments
option_list <- list(
make_option("--plinkFile", type="character",default="",
h... |
68237ecffd5664c3fb7eada1c920eaaa1f5487d77d7972715d73ff7a947de62f | R | 21,951 | 538 | #' banc-startup — Project startup: load libraries, set options, define save paths.
#'
#' Sourced by every BANC pipeline script as `source("banc/banc-startup.R")`.
#' Detects the host machine, loads the natverse + tidyverse + arrow + parallel
#' stack, sets gargle / fafbseg / pillar options, sources `banc-functions.R`,
... |
a814aef128179e4d479b14598ad7ed1d9cc5d6cdfbd997930398742d61daf9ad | R | 22,150 | 508 | here::i_am("scripts/3.brain_dataset/3.3.CroCoNet_analysis/3.3.1.CroCoNet_analysis.R")
library(CroCoNet)
library(tidyverse)
library(ape)
library(SingleCellExperiment)
library(foreach)
library(here)
library(ggbeeswarm)
library(ggrepel)
wd <- here("data/brain_dataset/CroCoNet_analysis/")
dir.create(wd)
fig_dir <- here(w... |
0cdd7a0d637e7398c60303b0a67cd0095db470d26f737a407ed2d56f7ec99f58 | R | 22,183 | 460 | ## Chioino et al. 2026, DESeq2 and GSEA
## In case of issues/suggestions, please contact: dogukan.ulgen@epfl.ch
# For the differential expression analysis
require(DESeq2)
require(pheatmap)
require(RColorBrewer)
require(ggplot2)
require(reshape2)
require(ggrepel)
# For the GSEA
require(clusterProfiler)
require(org.Mm.... |
4fb860309db15fb259f150f4134ecfa66cb1bed18b4f72630c3f065200b75c97 | R | 22,200 | 557 | # © 2012 Broad Institute, Inc. All rights reserved.
#
# Projects gene expression data or ATARiS consistency scores (in either
# case, encoded in GCT input files) to gene set enrichment scores.
# (note: for clarity comments will mostly refer to expression data)
#
# Authors: Pablo Tamayo, Chet Birger
#
ssGSEA.project.... |
ec15a2ebd418e0ced48128a55ddd130983f9f33aa70c420d961ce619549888c4 | R | 22,246 | 467 | # srun --pty -p interactive -t 0-6:00 --mem 25G -c 1 bash
# # Load modules
# module purge
# module load gcc/14.2.0
# module load R/4.4.2
# module load cmake/3.31.2
# module load java/jdk-23.0.1
# # Export udunits variables
# export UDUNITS2_INCLUDE=/n/app/udunits/2.2.28-gcc-9.2.0/include
# export UDUNITS2_LIBS=/n/app/... |
fba4bc87ca17996675e6f9f4c500ee9543dedf72f1933c54dc2cdc811b3dcf51 | R | 22,343 | 386 | ---
output: github_document
---
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# CroCoNet analyses
This repository contains the code to reproduce all analyses in the following manuscript:
#### [**CroCoNet: a framework for the quantitative comparison of ... |
4769657601a65b43db8205938d77bd75cbf98bc801c34bc698a55b4862476eb8 | R | 22,356 | 642 | # ==============================================================================
# Script 04: Figure 1D - Multiomics Overview Heatmap
# ==============================================================================
# Description: Creates a comprehensive heatmap showing multi-omic profiling of
# ICLE cell l... |
78786f0188b3021bf38b20827568ad6295721e425825303641edf2c79dcde70f | R | 22,367 | 713 | #' @include GgplotUtils.R
########################################################
# On Load / Attach
########################################################
ArchRDefaults <- list(
ArchR.threads = 1,
ArchR.locking = FALSE,
ArchR.logging = TRUE,
ArchR.h5level = 0,
ArchR.genome = NA,
ArchR.chrPrefix = TRUE,... |
5c0f3d7e67a75b157084221ed412b4bcc9b7318571a0de3a620f00aacce96bfb | R | 22,399 | 226 | ---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# spatialLIBD <img src="man/figures/logo.png" align="right"... |
0ec549e7d98bef19b94ecacbfc5bd1a8f6515c35533121944c128f12fdb21d9c | R | 22,433 | 592 | #' GET/POST from brainmaps API with optional retry / cache
#'
#' @description \code{brainmaps_fetch} calls the brainmaps API with optional
#' request cache and retries.
#'
#' @param url Full URL for brainmaps API endpoint
#' @param body an R list with parameters that will be converted with
#' \code{\link[jsonlite]{... |
c2dfc4a00eb505c0f879d811e32e6acea9cad89aa8220503c5ce33118f078790 | R | 22,443 | 519 | # ============================================================================
# Figures 4D & 4E: Journal-Compliant Dot Plots with Individual Donor Points
# Journal requirement: show individual data points behind tissue-level summaries
# ============================================================================
# Gen... |
01b4c9a91228d7c644e305b5ace1f4b66eda23007b9f67b5adc60ce2901fb994 | R | 22,457 | 612 | ## Chioino et al. 2026, Pathway-pathway network inference
# Calculates pathway-pathway networks via partial correlations
#
## In case of issues/suggestions, please contact: dogukan.ulgen@epfl.ch
require(matrixStats)
require(tidyverse)
require(huge)
require(igraph)
require(ggraph)
require(moments)
require(parallel)
##... |
b4f2d16f62659e8edcedef9c2cf0a1419519eba6a2c39064fb7c6699bfbb3aad | R | 22,464 | 589 | ######################
### load libraries ###
######################
# Load packages
source("banc/banc-startup.R")
# Make sure all functions query BANC and not FAFB
choose_banc()
################
### get data ###
################
# Get meta data
bc <- banctable_query() %>%
dplyr::select(-starts_with("_"))
meta <-... |
369c7ec6f19e9b4dd8c889ac7c90dbd277c6984e86f2a1eba86aad36d52c334c | R | 22,465 | 614 | ###############################################################################
## Enrichment Verification & Documentation ##
## Loads checkpoints, NO re-running of GSEA ##
###############################################################################
#... |
c02a12bc46610d300a3c090e3d3790677eca665952a3f074c93e185b564aeb97 | R | 22,508 | 553 | # script to update banc_meta metadata from cell_info CAVE table cell type
# information, based on matching to franken_meta
source("banc/curation/banc_curation_init.R")
fcc <- banc_cave_client()
cave_versions <- fcc$materialize$get_versions()
# when joining for optic lobe annotations, take ones from these trusted s... |
cf5c095296fae2898123f6e2e23de8bd15b09e31d9fc66ee26b06b0f9e75ce6c | R | 22,528 | 453 | #Breaking_up_merged_peaks_max_2kb_bins_parallel_2021October20.R
# Author: Belle Moyers
################################################################################
#If you want to run things at the command line, run the following command:
#Rscript /path/to/this/script.R $merged_Bed_file $unmerged_Bed_file
#Rscrip... |
a7a41ebf1384cc5b9a30687e9585676d78db7220fc5fae5854612bd62c84215a | R | 22,533 | 445 | #Analyses
library(lavaan)
library(dagitty)
dag_PA1<- dagitty('dag {
bb="0,0,1,1"
ALKOHOLKONSUM_DRINKS_3 [adjusted,pos="0.373,0.540"]
hippocampi [outcome,pos="0.358,0.357"]
smoker [adjusted,pos="0.160,0.535"]
... |
e92089df002af514c070bdd0a12808a1e68795631c0bff9308d3e607bd56bd11 | R | 22,567 | 512 | #' prep (whole-brain preset) — Build BANC + target meta / edgelist / NBLAST / seeds for whole-brain alignment.
#'
#' Loaded by `alignment/banc-alignment-prep.R --region whole-brain`. Prepares
#' BANC and target (default FAFB) brain neuron sets (optic_lobe +
#' central_brain + neck_connective), edgelists, NBLAST scores,... |
4c8ed079c3d52805ec43dbf24f3462841715613ea92bcbbcff6196027f926f37 | R | 22,664 | 546 |
##Mann-Whitney U test
# install.packages("ggcorrplot")
# BiocManager::install("ComplexHeatmap")
library(gmodels)
library("data.table")
library("dplyr")
library(ggplot2)
library(ggpubr)
library(effectsize)
library("ComplexHeatmap")
# Mann-Whitney U test based on RPKM values --------------------------------... |
7d8c08e0dd9e272608888e2872d142e859a5301cd2e943e6d7192cf72e98289d | R | 22,668 | 590 | ---
title: "Figures with gene pathways"
output: html_notebook
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
```{r, message=FALSE, warning=FALSE}
library(pagoda2)
library(conos)
library(parallel)
library(magrittr)
library(ggplot2)
library(pbapply)
library(tibble)
library(dplyr)
library(ggrastr)
library(cowplot)
libra... |
c0284abe2fe304e50cff3ead494feaee9afacb8ea05f8bfaa8c4a94849b2d50d | R | 22,681 | 596 | ####
library(dplyr)
iedb <- read.csv("~/NeoTCR/data/tcell_table_export_1655876131.csv",header = T,skip = 1)
iedb <- iedb %>%
select(Description,Method.Technique,Allele.Name,Qualitative.Measure,
Number.of.Subjects.Tested,Number.of.Subjects.Responded) %>%
filter(grepl(":",Allele.Name)) %>%
filter(!grepl(... |
213cedc1634c16bbcb6a429b2994fdaf2c209ea820c566f7ccd74c4ba6e56bb4 | R | 22,745 | 362 | ####################################################################
####### paper data import #############################################
####################################################################
Paper_data = read.delim('Paper_data.csv', sep=';', header = TRUE) # data import
head(Paper_data, n = 8) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.