sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
23e2024bc025c371cb185f6d3e8f00003039798b6c4c3ce0ab9c67e85360262e | R | 8,668 | 188 | library(tidyverse)
library(psych)
library(performance)
library(lme4)
library(lmerTest)
library(MuMIn)
library(partR2)
subj <- c('sub-101','sub-103','sub-104','sub-105')
l1stats <- read.delim('C:/Users/mmatt/Desktop/Projects/NightOwls/night-owls/derivatives/extractions/extractions_L1stats-revised_smoothed.tsv')
l1_mid... |
5062e5a1d1e1689102b7b10ae2e6967400057c30abdc697f9c2a888411044e3d | R | 8,678 | 170 | library(ggplot2)
file_path <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/08.Enrichment/GSEA_03.Output/gsea_report_for_MTLEALL_GOBP_1000_new_revision.tsv"
name <- "_1000_new_revision"
df <- read.delim(file_path, header = TRUE, stringsAsFactors = FALSE)
# df$NOM.p.val[df$NOM.p.val == 0] <- 0.01
df$log_pval <- -log10(df$... |
ae30ef2ee9048bab94da2de57ab00404de29291b1d99f018e6a9e4bf979feef7 | R | 8,688 | 276 | # library(latex2exp)
library(HDInterval)
library(scales)
# functions to plot results of BDC model (Silvestro, Warnock et al. 2018 Nature Comm.)
### SKYLINE PLOTS
# PLOT SPECIATION MODE PREVALENCE
plot_polygon <- function(x,t1,t2,color="#3dab3c"){
for (lev in seq(0.95,0.10, length.out =30)){
hpd = hdi(x,lev)
polyg... |
e34523e5b0fb5ffbaf8dea881f7939e6cdbc51085a5c671a3f95d90fc79cb819 | R | 8,726 | 233 | ###############################################################################
## Calcium genes visualization script ##
## - Loads checkpoints from main Analysis_pipeline.R ##
## - Generates calcium-specific heatmaps, boxplots, and volcano plots ##
... |
7f8f45f8f502c6c2c9e25b231517ff7741129f1ad81573942959d3381ea80b47 | R | 8,727 | 228 | here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS2.R")
library(tidyverse)
library(foreach)
library(igraph)
library(SingleCellExperiment)
library(scran)
library(patchwork)
library(SCORPIUS)
library(here)
wd <- here("data/neural_differentiation_dataset/CroCoNet_analysis/")
fig_dir <- here("data/paper_figures... |
3ee5d0d83448d83e44fe827f1f1b80db9b8d6286813279adc49a1335332ad34b | R | 8,730 | 288 | # ===============================================================
# 🧩 Visualization Coordinator (Lazy + Reactive)
# ===============================================================
visualize_ui <- function(id) {
ns <- NS(id)
tagList(
conditionalPanel(
condition = sprintf("output['%s']", ns("show_visual")... |
04b02c97243850abed82752e8a43b77ad9d2e554ca40f343d8dfa020529cd093 | R | 8,731 | 264 | # # Step.00 ----------------------------------------------------------------------
rm(list = ls())
gc(reset = T)
source('script/Functions/Functions.R')
# unload packages
pkgs[which(load.packages == F)]
rpid = Sys.getpid()
options(future.globals.maxSize = 1000 * 1024^3)
##################################################... |
66c49a008c6965c4a87d99dfd4021f5a745010707b9ccfa0b7667589f309978e | R | 8,742 | 235 | library(ggplot2)
library(rstatix)
library(ggpubr)
library(stringr)
x2=read.delim(file='measurements.txt')
##############
regions=unique(x2$Region)
ages=unique(x2$Age)
gen=c('Pkhd1del3-67/del3-67','wt/wt')
for (reg in regions) {
for (ag in ages) {
y=subset(x2,!is.na(SlideRegion) & SlideRegion != 2 & Age ==ag ... |
6a51118836687fa6c8f279640d72ede9f702033788c31d4c5113f964e1b02aad | R | 8,760 | 286 | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("argparse"))
# create parser object
parser <- ArgumentParser()
# specify our desired options
# by default ArgumentParser will add an help option
parser$add_argument("-i", "--input", required=TRUE, help="input RData")
parser$add_argument("-m", "--meta", re... |
40d716f6d3e66f1d220f72d6b49c9ca8c9a250556f61bf686a87433e878b43b8 | R | 8,792 | 171 | #' Create consensus network
#'
#' Integrates networks across different replicates and different species into a single consensus network in a phylogeny-aware manner.
#'
#' The input networks should all contain the same nodes (genes). The output consensus network contains the same nodes and all edges that were detected i... |
99790cb721b9781194980f2ed6547dc2b0a5791a2f7ec4b08ee3c1eb77e03a8a | R | 8,793 | 131 | rm(list = ls());tmp <- lapply(c('ggplot2','reshape2','gridExtra'), library, character.only=T)
setwd('/Users/wangz21/Library/CloudStorage/OneDrive-TheMountSinaiHospital/Huang_lab/manuscripts/ADASE/analysis/ASE_individual_analysis/ASE_Var_RegionVsClinical')
#### Load in related information
# Statistics of Sig/Sug
tmp <-... |
5f483f4508446e9978466929bc9625f964d4c8b82527325ffd8704665f9b21a5 | R | 8,795 | 245 | #' Create Experiment
#'
#' Creates an MLflow experiment and returns its id.
#'
#' @param name The name of the experiment to create.
#' @param artifact_location Location where all artifacts for this experiment are stored. If
#' not provided, the remote server will select an appropriate default.
#' @param tags Experime... |
705b95cbe72e26f5435ebce45f8bf0258a77eb27fff62f1f34af156cec9b30ce | R | 8,801 | 218 | #' banc-hemilineages — Build the hemilineage mapping worksheet.
#'
#' One-off generator for the hemilineage mapping table used in the BANC
#' annotation cascade. Pulls `franken_meta()` and assembles per-hemilineage
#' summary tables (Ito-Lee + Hartenstein); most blocks are currently
#' commented out — uncomment to rege... |
cd98403835fbd86491d50683398035da27a0368ba79c0519d2baeb75b3b4d853 | R | 8,809 | 264 | #!/usr/bin/env Rscript
# Unit and end-to-end tests for the independent base-R clumping oracle.
#
# The fixtures and expected result are authored directly from ALGORITHM.md.
# They import neither MeRIT code, MeRIT tests nor the independent Python oracle.
# Return the directory containing the currently executing R scri... |
04ef89e42462cd757a52b2b293b5b5381313ee5ac3486a66b79605488a78e8a6 | R | 8,819 | 193 | library(ArchR)
projdir <- "projrmSubset_subPeak"
proj <-loadArchRProject(projdir)
dropSubCs <- c("undefined","ast.C6","mg.C8","mg.C10","mg.C15",
"mg.C1", "mg.C5", "neu.C3", "neu.C4", "odc.C2", "neu.C2", "mg.C2")
proj$subClusters[proj$subClusters %like% "neuron"] <- gsub("neuron","neu",
... |
c9edc6ba296cd852e649a79a911f44349f0034543da9a23d6ce44a0cf9e3d1ee | R | 8,823 | 382 | ---
title: "Read in ROSMAP DNA methylation data, and pre-filter to overlap with RNAseq Data"
subtitle: "Read and pre-filter ROSMAP data"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: b... |
f25651959df722c574bdfa4b6d728fff4dea8efea8412c86af946a6007068c26 | R | 8,824 | 191 | suppressPackageStartupMessages({
library(dplyr)
library(tidyr)
library(ggplot2)
library(purrr)
library(boot)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Training")) && dir.exists(file.pat... |
98a0f82e383d0a7b04c614cc7595cbb8ddae4bbdfc5811ed853d97b29f819fda | R | 8,829 | 184 | suppressMessages(suppressWarnings({
library(Seurat)
library(ggplot2)
library(dplyr)
library(cowplot)
library(plyr)
}))
suppressMessages(suppressWarnings(library(dplyr)))
suppressMessages(suppressWarnings(library(cowplot)))
suppressMessages(suppressWarnings(library(plyr)))
r... |
911eb62a706bd9d48b56a9f834f5759a246523b17591723caafdf1fba14b7bc5 | R | 8,838 | 223 | ###############################################################################
## MitoCarta GSEA Analysis – Separate Module ##
###############################################################################
## Purpose: Run MitoCarta pathway enrichment analysis on differential
## ... |
5317c61895b72502669283c107fb593d9de7c39103574b47dc22779997d0b8c2 | R | 8,840 | 253 | ################## ComBat Harmonization and Analysis #########################
# Working directory
#setwd("~/FC-Network-Replicability-Effects")
# Packages
library(neuroCombat)
library(stringr)
library(lme4)
library(lmerTest)
library(tidyverse)
library(readxl)
library(reshape2)
library(umap)
############### ComBat Ha... |
e3157dec7a977c4f84abcba478c17f1db0bf666ac9c53bf34e38873177345d96 | R | 8,851 | 224 | ### -------------------------------------------------------------------------------
rm(list=ls())
library(tidyverse)
library(ggpubr)
library(ggthemes)
library(RColorBrewer)
library(ggrepel)
library(stringi)
## ------------------------------------------------------------------------------------------------------------... |
bb67a31f3302d7e222d2f6f70431b563086c48865f98297b0f325739a141f933 | R | 8,856 | 318 | runKNN <- function(obj, eigs.dims, weight.by.lambda, k, nn.eps, save.knn,
filename, snn, snn.prune, method) {
UseMethod("runKNN", obj);
}
#' @export
runKNN.default <- function(
obj,
eigs.dims,
weight.by.lambda = FALSE,
k = 15,
nn.eps = 0,
save.knn = FALSE,
filename = NULL,
sn... |
5b2d3de0c7857acfdffdfa636ac0c83c50f6739b4189de6cbb6d5b1db0810cef | R | 8,884 | 135 | #!/usr/bin/env Rscript
library(Matrix)
library(Seurat)
library(tidyverse)
library(readxl)
library(Augur)
source("scRNAseq_funs.R")
#####################################################################################################################################################################################
###... |
5a23c0b2ac360a638f4da075ef396154994bb9a9f368c01e8105da00662902fc | R | 8,890 | 185 | ---
title: "Comparing LIONESS Regulatory Networks using limma"
author: Camila Lopes-Ramos
date: 2020-10-19
output:
rmarkdown::html_vignette:
toc: yes
vignette: >
%\VignetteIndexEntry{Comparing LIONESS Regulatory Networks using limma}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, i... |
8d80946d9b83257bfd62a254dd524c3abcc24812896e9df4decabc0a4ad4b8b9 | R | 8,903 | 192 | library(readxl)
library(dplyr)
library(ComplexHeatmap)
library(circlize)
library(tidyr)
library(ggplot2)
library(cowplot)
library(lmtest)
library(broom)
library(outliers)
library(stringi)
library(plotrix)
library(ggforce)
library(FSA)
library(writexl)
#
#Load File
#
rawdf <- read_excel("ChaT_Spi... |
58aaf71315457662bc4178779747d50281fe2f42bdfa5c1a7c92aa1d3afcd13d | R | 8,909 | 185 | ---
title: "Code of runSCENIC_1_coexNetwork2modules()"
subtitle: Workflow run by runSCENIC_1_coexNetwork2modules()
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... |
c121d794b5c34391d91cdefa3f16fd6417aee0f42a75084b171c8effffd06fb0 | R | 8,912 | 201 | here::i_am("scripts/4.paper_figures_and_tables/suppl.figureS10.R")
library(CroCoNet)
library(tidyverse)
library(ape)
library(ggtree)
library(patchwork)
library(RColorBrewer)
library(cowplot)
library(here)
wd <- here("data/neural_differentiation_dataset/CroCoNet_analysis/")
source(here("scripts/4.paper_figures_and_tab... |
0af7b232804217904a2cd20276e7c90e01ccf1212f308d964df681037fc4e6af | R | 8,917 | 279 | library(dplyr)
library(plyr)
library(Seurat)
library(ggpubr)
library(reshape2)
library(tidyr)
library(tidyverse)
library(DropletQC)
source('~/SCRIPTS/utility_functions.R')
#####
## LOAD COUNT MATRIX
#####
# Set the samples and read them with QC
samps = paste0('SRR1192', 1005:1012)
allSeurL = list()
for(i in 1:length... |
6a84857706bd9731374e574ca3978c385763a53d8d34ccffe650391573b752fb | R | 8,920 | 195 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# Wandro, Stephen, et al. "The microbiome and metabolome of
# preterm infant stool are personalized and not driven by health
# outcomes, including necrotizing enterocolitis and late-onset
# ... |
841394a1c5864d87c0087b04c6859c26af1288d06607fec61b82531311c27d0c | R | 8,921 | 198 | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("argparse"))
# create parser object
parser <- ArgumentParser()
# specify our desired options
# by default ArgumentParser will add an help option
parser$add_argument("-i", "--input", required=TRUE, help="load snap RData")
parser$add_argument("-o", "--outpu... |
0215557080f3e33de03bdafec7997a4d40ca176f5ef72d1f0356ec4ac21f752e | R | 8,922 | 257 | # Code for generation GxE target variables yHatGE and yHatGGE presented in the following manuscript:
# "Tailoring AI and ML Models for Genotype-by-Environment Prediction Leveraging Environmental Covariates: A European Rye Example"
# Code written by:
# Wera Eckhoff, University of Hohenheim, PhD student, wera.eckhoff@gma... |
78a4ae4ef2b1db34aba1aed46fa43a2ed4cc98b54d38b9e7b0afff26b02b6f76 | R | 8,924 | 285 | ################################################################################
# Cluster-vs-rest DEG analysis (Seurat FindMarkers) + volcano plots
# and cluster composition across 4 experimental groups (100% stacked bar plot)
#
# - No hard-coded absolute/local paths
# - Input/output are provided via command-line argu... |
2d585f25fa6fa59add8bbfd52b36714a0e084adc04774f729ddd50b3384cc21b | R | 8,928 | 273 | ---
title: 'Epilepsy 10x samples v2 - gene set enrichment with variance inflation factor'
author: "Jon Thompson, Pers lab"
date: "`r Sys.time()`"
params:
date: !r Sys.time()
randomSeed: !r 12345
pValThreshold: !r 0.05
output:
html_notebook:
df_print: paged
number_sections: yes
toc: yes
toc_depth: 3
toc_flo... |
cafa78cb8b606ac63f2e8c3bfe0100be03c18ee3b4420cfb89855ca387127d6d | R | 8,932 | 210 | #input data in tab-delimited text files
#chromosome files: no column headers, in order they are -> chromomosmo name, chromosome start (usually 1), chromosome end, centromere start (optional)
#annotation files no column headers -> element name (id or symbol), Chromosome name, element start, element end, data (optional... |
0c30968ec9db6638f494d9006ed07a7405b2455ac8380c3415062e247e389baf | R | 8,941 | 166 | #' banc-sort-folders — Bidirectional rsync between O2 working and fileserve mirrors.
#'
#' `/n/data1/.../banc/` ↔ `/n/files/Neurobio/.../banc/` (csv / sqlite / png / obj / swc).
#'
#' @section Invoked by:
#' `o2/production/o2_banc_images.sh`.
##############################
### ORGANISE BANC MATCHING ###
############... |
98080e7b06fa6852466cc5eb9dc61f1429b5f2bad78e2bdeb12f4c18dd701d25 | R | 8,948 | 148 | ########################################################################################################
#### Trial dataset for this R script can be downloaded from ####
#### https://data.mendeley.com/datasets/454s2vw255/1/files/41150316-400d-48ad-ad12-01f89256c1d6 ####
##... |
2d62beea18f5fa66623e436ff0a265af1c5044eb559b40c66352f9a5a1fd997f | R | 8,951 | 304 | # ==============================================================================
# ICLE Project - Required R Packages
# ==============================================================================
# This script lists all required R packages and provides installation functions
# Author: Osama Shiraz Shah
# Last Update... |
5d8d9ff5355931334464029541aa2418f2cf62772d10d139f32ca6644d780c2c | R | 8,961 | 162 | library(tidyverse)
library(ggpubr)
library(chngpt)
library(RColorBrewer)
library(circlize)
library(ComplexHeatmap)
age <- read_delim("./input/inspire/var_calc.csv")[,c("identAno","ageP1M0")] %>% set_names("identAno","age")
sex <- read_delim("./input/inspire/sex_dateNaissP.csv")[,c("identAno","sexeP")] %>% set_names("i... |
e605ced96699db07a72a983cf911f7d6065aacf574f64e266112da69fa34c12f | R | 9,007 | 185 | # Load required libraries
library(ggplot2)
library(dplyr)
# Define GO terms and colors
GO_to_analyze <- c("NT_GO0008328_44", "NT_GO0032281_29", "NT_GO0032983_6", "NT_GO0017146_9",
"NT_GO0051932_73", "NT_GO0035249_131",
"IC_GO0005248_24", "IC_GO0005245_43", "IC_GO0005249_98")
GO_c... |
fe99d73af8c5da3eba8a2dcb879508c2fd926c9dc1dab6a317432f8a31c419ff | R | 9,018 | 226 | library(stringr)
library(data.table)
library(ggplot2)
library(ggpubr)
outp <- "/geschwindlabshares/RexachGroup/Xia_Data/ldsc/data/plot"
nbSNP <- read.csv("/geschwindlabshares/RexachGroup/Xia_Data/ldsc/MS_more_dx/SNPnb_from_LDSC.txt",
header = T, sep = "\t")
GWASs <- c("ADHD_Demontis_ng2023","ASD_Grov... |
cad3fdd6c19f88f8563c34427816e17e1c1237592ed9c3291f885833a87306a4 | R | 9,021 | 191 | library(readxl)
library(dplyr)
library(ComplexHeatmap)
library(circlize)
library(tidyr)
library(ggplot2)
library(cowplot)
library(lmtest)
library(broom)
library(outliers)
library(stringi)
library(plotrix)
library(ggforce)
library(FSA)
#
#Load File
#
rawdf <- read_excel("ChaT_SpinalTraq/ChATGFP_At... |
3f71c5240aeb29678dea67655d7c3283d4e22f998ce39313a9211a8d68c22d94 | R | 9,027 | 276 | ---
title: "Dataset statistics"
output:
html_document:
df_print: paged
code_folding: hide
---
## Load data
```{r message=FALSE, warning=FALSE}
library(ggplot2)
library(dplyr)
library(gt)
source("data_organization/utils.R")
options(scipen = 999)
```
```{r}
all.data <- load.all.datasets()
for(i in 1:length(a... |
65c09e57e204517e1e7f432562612c477c6087dafdaa3c8b976b549e6b87af51 | R | 9,044 | 264 | #####################################################################
# Create SNP Annotation Lookup Table
# This script processes all SNPs once to create a lookup table
# that maps SNPs to their annotations and prior weights
# OPTIMIZATION: Processes SNPs in batches to avoid memory issues
#######################... |
479c00b4fe266d4e72e3e2f7cb83f2fd8fd7e8529448530f3fc4189eee93525b | R | 9,050 | 219 | # Calculate RareEffect PRS for each individual
## Load packages and sources
library(SAIGE)
library(data.table)
library(Matrix)
library(optparse)
option_list <- list(
make_option(c("--effectFile"), type="character", default="",
help="Path to effect file from RareEffect main function"),
make_option(c("... |
97f35c20c00986905a177f0a23631bd4592e4c131585119e972bd12e9df0600b | R | 9,050 | 216 | #' banc-tracing-matches — Cross-dataset match updates + Hampel-lab integration (curation).
#'
#' Pulls match decisions from the Princeton gsheet (key
#' `gsheet_princeton_matches`) and integrates the Hampel-lab tracing sheet.
#' Originally part of `banc/utilities/banc-tracing.R`; split out 2026-05-21
#' into per-task s... |
48350070fd729723984bfc340be3d45f15ce4853f1f03e6a8f9a84d98af0e377 | R | 9,052 | 169 | # ==============================================================================
# Script 14: Supplementary Figure 8 - TMB vs SV Preparation
# ==============================================================================
# Description: Prepares chrom_sizes, sv_tmb_summary, alt_count_chr, tmb_per_chr,
# an... |
45fbb0985f6d2c3a4612c0006cd1facd9078ee9f676a793d8c01e0beaa83594e | R | 9,072 | 198 |
#Rscript /media/StorageOne/HTS/VirusMeta/SAM_BAM/positivity_OR.R /media/StorageOne/HTS/VirusMeta /media/StorageOne/HTS/Projects/Project_2014_G_Hultin_MS/old/NR/nr_by_index.csv /media/StorageOne/HTS/Projects/Project_2014_G_Hultin_MS/old/aggregated_dir/self_blast_tmp/90.CLUSTER_BLAST.txt /media/StorageOne/HTS/Projects/... |
79fb50da31caa377124a1c26409f56ad99419fc4c4b98d12aee9da0e2d238d30 | R | 9,083 | 189 | # Load required libraries
library(ggplot2)
library(dplyr)
# Define GO terms and colors
GO_to_analyze <- c("NG_GO0002052_44", "NG_GO0007406_16", "GG_GO0014015_94", "GG_GO0014014_59",
"GG_GO0048708_94", "GG_GO0014004_16",
"NG_GO0050772_85", "NG_GO0050771_56", "SP_GO0048169_39", "SP_... |
524e6c033c123f672e536dff94cfb609e3cb17021a76be68767cda58dfac048b | R | 9,101 | 263 | library(shiny)
library(ggplot2)
library(purrr)
library(shinythemes)
library(shinyWidgets)
library(MHCbinding)
library(DT)
library(dplyr)
library(shinyFeedback)
library(waiter)
library(slickR)
library(shinymaterial)
library(Biostrings)
library(ggmsa)
library(seqinr)
neodb_all <- readxl::read_xlsx("data/filter_db.xlsx",s... |
b453809177eb3674bdfc6b1a664fcc89b9aec1905cdfb4666be7b9417fa65324 | R | 9,113 | 207 | #' banc-update-metrics — Join per-metric feathers and push metric columns to SeaTable.
#'
#' Reads per-metric feather files (`banc_root_positions`, `banc_regions`,
#' `banc_detections`, `banc_l2_metrics`, `banc_volumes`), joins by
#' `root_id`, writes combined `banc_metrics.feather`, then pushes metric
#' columns to Se... |
63de23da5582d8e95c62b610a401292932a2209394e0cf619b8640b2ff6bb170 | R | 9,142 | 385 | test_that("Test runLimmaDE", {
coords <- readRDS(system.file("extdata", "MouseBrainCoords.rds",
package = "SpNeigh"
))
logNorm_expr <- readRDS(system.file("extdata", "LogNormExpr.rds",
package = "SpNeigh"
))
cells_ref <- subset(coords, cluster == 0)$cell
cells_tar <- subset(co... |
68764c1801455bfaf55179ce315dc92c89db8f86d0650a7c1d012b64137fdd35 | R | 9,143 | 230 | check_cloudvolume_reticulate <- memoise::memoise(function(min_version=NULL) {
check_reticulate()
tryCatch(
cv <- reticulate::import("cloudvolume"),
error = function(e) {
message(as.character(e))
stop(
call. = F,
"Please install the python cloudvolume package:\n",
"This sh... |
0d569cbd3ee250514c809373bf2ef43fbe4271140f1d211687ec2fec19708ce6 | R | 9,146 | 279 | # ===============================================================
# 🧪 Table Analyzer — Two-way ANOVA Module (Validated Version)
# ===============================================================
two_way_anova_ui <- function(id) {
ns <- NS(id)
list(
config = tagList(
uiOutput(ns("inputs")),
uiOutput... |
ff416c0a4cab62b3d53d6d2214cd67a861ca3d839aa6ce9d4673d393881d6b7f | R | 9,147 | 173 | ################################################################################
# Step 3. Analyzing the network activity in each individual cell
################################################################################
#' @title runSCENIC_3_scoreCells
#' @description Step 3: AUCell (scoring the regulons on the ... |
212dc8b9ff836f2b02ec58a8594a5ee46f9322c68170fcdf638b28da617c6461 | R | 9,164 | 200 | suppressPackageStartupMessages({
library(readxl)
library(dplyr)
library(purrr)
library(stringr)
library(tidyr)
library(readr)
})
find_repo_root <- function(start = getwd()) {
current <- normalizePath(start, winslash = "/", mustWork = TRUE)
repeat {
if (dir.exists(file.path(current, "Validation")) &... |
02f680eec8c7f3814b818f0458615ab61c624e11f2736ba6eba2b52638be3aac | R | 9,168 | 183 |
#install.packages
library(Seurat)
library(ggplot2)
library(DoubletFinder)
library(dplyr)
library(cowplot)
library(reshape2)
library(MAST)
#load in data from Cell Ranger or other counts data ====
#for loading Cell Ranger counts:
setwd("/athena/ganlab/scratch/lif4001/LG815C/DF_2ndRound_mt5")
LG815_C_164 <- readRDS(fi... |
87bf221470322a957852ff123952839817a1ef6969c5c2ebaa570056a93ac485 | R | 9,168 | 242 | #packages
library(knitr)
library(dplyr)
library(kableExtra)
#Load data
chr.frq.data <- read.csv("D:/Stats.stuff/chr.freq.csv")
#Get frequency tables for both variables
table1 <- table(chr.frq.data$Sig.con.vs.ad)
table2 <- table(chr.frq.data$sig.ad.vs.add10)
#Combine into a data frame (makes it more read-... |
7b13a0bb1fb69d4b4dcede63390b14a81c5b80425f436d09f0775b3c1c108ca9 | R | 9,171 | 193 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# load packages
library(bancr)
# Direct tools ar... |
7aac5636c6d81d73386114685b93c602edc7a0f9b3d489b1180f62c9b08fb4a8 | R | 9,179 | 186 | library(clusterProfiler)
library(org.Mm.eg.db)
# ensure that you have generated the lists of exclusive proteins (s. part2 line 170 and following)
#### GO term analysis for exclusive protein lists #####
# results for enrichGO are thresholded on the given cutoff values. Only terms that pass both cutoffs are inclu... |
2c1e143840209c8c7256a3f3ae64a0dd7080efe15a5c5541bca9eb0960d121cd | R | 9,181 | 229 | #' banc-sensory-jo-orn — Find missing Johnston's-organ sensory neurons and fix ORN typing.
#'
#' Per-task curation: scans for missing JO sensory neurons via the tracing
#' sheet and applies ORN cell-type corrections via the proofreading-notes
#' table.
#'
#' @section Reads:
#' - SeaTable `banc_meta`
#' - `banc_proo... |
d66290582c98810f8278efb6a9886dd349117d0925af0d987e6919d610de4553 | R | 9,190 | 260 | #' get_mt_nn
#'
#' @description
#' Get indicator matrix of nearest neighbors
#'
#' @param mt_dist distance matrix of cells. mt_dist needs to be a symmetric matrix or an object of stats::dist.
#' @param k number of nearest neighbors. The default is 20.
#'
#' @details
#' Given a distance matrix of cells, get_mt_nn extra... |
619dbb01271c355ea7e0ff8821a7a1ed64e2b5c2b5d7f78b5d8cd8bacd71d113 | R | 9,198 | 185 | # bare minimum extraction of largeVis routines for fast graph embedding
#' @importFrom stats runif
NULL
#' Rescale the weights in an edge matrix to match a given perplexity.
#'
#' @param x A sparse matrix
#' @param threads numeric The maximum number of threads to spawn. Determined automatically if \code{NULL} (defaul... |
cc3c0f757f93c0be6e474e4b9529d4abb5210ba5a50ac8d6ee70277c5901a6c5 | R | 9,219 | 189 | #' @title runSCENIC_4_aucell_binarize
#' @description Step 4: Binarize the AUC (and, optional: re-cluster)
#' @param scenicOptions Fields used: TODO
#' @param skipBoxplot Whether to plot the boxplots
#' @param skipHeatmaps Whether to plot the Binary heatmaps
#' @param skipTsne Whether to calculate the binary t-SNE (and... |
be102085c40c619821dbfbdeae052a7c97ec0f195bedfcb609bcc068b3127c48 | R | 9,228 | 292 |
#Figure 1c
#raw data from Supplementary Table S3G and S3H
library(ComplexHeatmap)
library(ggplot2)
#input raw data as df
mat <- matrix(-log10(df$P.value), ncol = 1)
colnames(mat) <- "Motif Name"
ht <- Heatmap(
mat,
name = "-log10(p)",
col = colorRamp2(c(2,5,10), c("white","pink","red")),
cluster_rows = FA... |
e06664377502768c7ed85da00a33e2bb183f5f28a62bb7f905b498a681c7f05b | R | 9,239 | 279 | #!/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("-e", "--exp", required=TRUE, help="rna exp")
parser$add_argument("-p", "--pmat", required... |
54dae3d6ae7a7a11663820fea2713a1511d80c1c488a85bbecddc672e468a823 | R | 9,245 | 218 | # Creates and initializes a sample storage object based on the specified type
# Parameters:
# data: Input data
# par_names: Names of parameters
# type: Type of sampler ("standard", "single", "blocked", etc.)
# iters: Number of iterations
# stage: Sampling stage ("init" or other)
# is_nuisance: Boolean vecto... |
ed48db37398dfd21e9d411d948150fdcf2c1c36ecf2a3d0ce87b0927ed8ac306 | R | 9,246 | 195 | ####神经元活化------------------
target <- read.table("/home/data/t120425/epilepsy/neuron/temp_hippo_node.txt",sep = "\t",header = T)
unique(target$Group)
load(file = "/home/data/t120425/epilepsy/function_genelist.RData")
for(i in 1:11){
genelist[[i]] <- intersect(genelist[[i]],target$TF)
}
genelist[["Neuronal_activation"... |
5fc3bdec353bde508ecea23272e85eb2abc331f48a57f1843cd158f2e66a26e6 | R | 9,256 | 232 | # https://bioinformatics.ucalgary.ca/publications/MM-in-PVIN/Xenium/
# Xenium Data Preprocessing/Analysis
baseDir <- getwd()
setwd(baseDir)
outDir <- file.path(baseDir, "Results")
library(arrow)
library(dplyr)
library(ggplot2)
library(ggrepel)
library(ggridges)
library(HDF5Array)
library(outliers)
library(presto)
lib... |
e8458b19e26b68bf6fc8ad1f26999510b6f5745db8b5901ed1d42fc815f4179d | R | 9,261 | 271 | # see https://gargle.r-lib.org/articles/gargle-auth-in-client-package.html
.auth <- gargle::init_AuthState(
package = "malevnc",
auth_active = TRUE
)
.authinfo <- new.env()
#' Clio authorisation infrastructure using Google via the gargle package + JWT
#'
#' @details Clio store authorisation is a multi step p... |
f2f009f0cc5d9851fcc2c32a88b11e39380eacf14d741a40f5aa25b1bf777bb8 | R | 9,274 | 218 | # Hai Wang
# Test the association between importance scores and CNS
library(GenomicRanges)
library(GenomicFeatures)
library(BSgenome.Zmays.ENSEMBLPLANT.4.41.1)
library(data.table)
library(reshape2)
library(ggplot2)
library(dplyr)
#############################################################################... |
5283367701e19637316666c361ca217b7bfeb8ac533838e4a65d357f9789a5c6 | R | 9,308 | 220 | #Setting up environment ===================================================
#Clean environment
rm(list = ls(all.names = TRUE)) # will clear all objects including hidden objects
gc() # free up memory and report the memory usage
options(max.print = .Machine$integer.max, scipen = 999, stringsAsFactors = F, dplyr.summa... |
1549d05f743ab5aad7d286443623b6b8e940a1e2847b7d4cb37c6f0f8b61b90a | R | 9,316 | 137 | ---
title: "Constructing genotype-specific gene regulatory networks with EGRET"
author: "Deborah Weighill"
date: '2020-11-24'
output:
rmarkdown::html_vignette:
toc: yes
vignette: >
%\VignetteIndexEntry{Constructing genotype-specific gene regulatory networks with EGRET}
%\VignetteEngine{knitr::rmarkdown}
%\V... |
e39089431be2de220a3c66470e90d1e420de83cd26e610d25f6067fdd31580e1 | R | 9,328 | 237 |
#This code reads in the different sample attributes and subject phenotypes, and adds in cause of death column to the merged attributes and phenotpes.
# BiocManager::install("edgeR")
library(tidyverse)
library(edgeR)
library(corrr)
library(dplyr)
library(tibble)
library(ggpubr)
library(readr)
library(ggplot2)
lib... |
b347102319dc4657e8f55130639056562962c9c950622216fb06ee7ec2d12c77 | R | 9,329 | 154 | library(MetaNeighbor) #for heatmap code
library(stringr)
library(reshape2)
library(tidyr)
library(dplyr)
library(ggplot2)
library(readr)
library(here)
library(magrittr)
library(conflicted)
conflict_prefer("first", "dplyr")
conflict_prefer("rename", "dplyr")
conflict_prefer("select", "dplyr")
conflict_prefer("filter", "... |
bf162507568a33a91c279b0655ef7a6b26b338e48553040841a4f0536d123971 | R | 9,330 | 247 | #' CIS Genotype Matching Script
#'
#' This script performs genotype matching for CIS analysis by:
#' 1. Loading and processing genotype data from bim files
#' 2. Matching SNPs with CIS reference database
#' 3. Handling allele flipping and complementing
#' 4. Converting matched genotypes to VCF format
#'
#' Re... |
e46f605646215ab53e98df44ff5bf5a6e68e3152942b12daf5743dd1b6062882 | R | 9,341 | 219 | library(bancr)
library(malevnc)
library(nat.jrcbrains)
nat.jrcbrains::register_saalfeldlab_registrations()
# Deformetrica folder
deform.folder <- "/Users/abates/projects/flyconnectome/bancpipeline/deformetrica/manc"
deform.folder.points <- file.path(deform.folder,"Points")
deform.folder.meshes <- file.path(deform.fold... |
b6af2785ad6deccf4b76db787e2d9746af71cd0c54026a7c9773151f20eeff17 | R | 9,363 | 230 | #!/usr/bin/env Rscript
source("banc/banc-startup.R")
# File paths
split.master.folder <- banc.nblast.manc.split.save.path
split.folder <- file.path(split.master.folder,"swc")
synapses.folder <- file.path(split.master.folder,"synapses")
metrics.folder <- file.path(split.master.folder,"metrics")
save.path <- '/n/data1/h... |
8e164f85578aa5693e5668eb07439c72bda1f674d4d12ebfb51acf961ff4a1af | R | 9,373 | 398 | ---
title: "Run pathway analysis"
subtitle: "Get significant KEGG, Reactome, and GO pathways based on linear analysis results"
author:
- David lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: pygments
theme: lumen
... |
b7eb68226a35f3a4191b3e52480df8740efe641b546181f904933df9731c28d8 | R | 9,381 | 216 | library(metacell)
# devtools::load_all('~/src/metacell.flow')
library(metacell.flow)
suppressPackageStartupMessages(library(ComplexHeatmap))
wd <- '.'
# setwd(wd)
db_path = file.path(wd, 'scdb')
scdb_init(db_path, force_reinit = T)
scdb_flow_init()
SEED = 1337
K = 16
set.seed(SEED)
scfigs_init("figs/")
d... |
fe7a746f015c063f3a837b7f3db4ed3f44231ec345f1254a0fbb833c5d53fa49 | R | 9,388 | 249 | #' CIS Genotype Matching Script --> Output will be used in INGENE training --> imputed coexpression partners values
#'
#' This script performs genotype matching for CIS analysis by:
#' 1. Loading and processing genotype data from bim files
#' 2. Matching SNPs with CIS reference database
#' 3. Handling allele flip... |
31222e2c1874f3f085951870c9f003067872e6e27a5a5657f560b42bbe0638a5 | R | 9,393 | 247 | #' CIS Genotype Matching Script
#'
#' This script performs genotype matching for EpiXcan analysis by:
#' 1. Loading and processing genotype data from bim files
#' 2. Matching SNPs with EpiXcan reference database
#' 3. Handling allele flipping and complementing
#' 4. Converting matched genotypes to VCF format
#'... |
3adf0781cb72ddac41c09c1f24ad836bf650157a753f188f154d490866999e1b | R | 9,406 | 199 | # ----------------------------------------------------------------
# The following script loads and processes data from:
#
# He, Xuan, et al. "Fecal microbiome and metabolome of infants
# fed bovine MFGM supplemented formula or standard formula with
# breast-fed infants as reference: a randomized controlled trial.... |
609e2a2de06aa0e4288feef8b0bd8d65985d185cf1880e804ccdac7e61e7661b | R | 9,411 | 240 |
################################################################################
# Step 1. Part 2: Creating TF modules (potential TF-targets)
################################################################################
#' @title runSCENIC_1_coexNetwork2modules
#' @description Step 1: Convert the output from GENI... |
03793c4d6da38f94247c39d0f4e03104e079efd037341e5733be018a45361384 | R | 9,418 | 249 | # Iterate 5 samples of Bombus terrestris (clot exposed):
bter_meta <- read.csv("~/2023-species_comparisons/tables/metadata/bter_meta.csv")
bter_matrix <- read.csv("~/2023-species_comparisons/tables/star_counts/bter_star_featureCounts_052024.csv")
rownames(bter_matrix) <- bter_matrix[, 1]
bter_matrix <- bter_matrix[,... |
24c8ab5c15b34e13893a69b8cfaeb9c09a5acd89720388233335941c652b254a | R | 9,428 | 237 | # =============================================================================
# Supplementary Figure 5 — Behavioral Performance: Detection and Recognition
# Response Latencies
# =============================================================================
#
# Paper: ReFOFA (NCOMMS-24-11279)
... |
ce89d9055fb2af788eee3e9ea85843343f487ae3c64a64891e4b99e895bc2a34 | R | 9,431 | 191 | #!/usr/bin/Rscript --slave
# annotated_LSR_example_code.R
# 5th May 2026
# Modified: 5th May 2026
# Author: Richard G. Carson (richard.carson@tcd.ie)
#################
# Read the data file
data <- read.csv("example_data.csv", header=TRUE, stringsAsFactors=FALSE)
# Ensure data are numeric
data["mep_amplitude"] <- ... |
36d68a496eae9cd8739f35d67c6b82d81d0cf44e2be55f4c5d38e903dfa6d723 | R | 9,435 | 223 | # ======================= CHCHD10 ~ Braak / CERAD (Excitatory neurons, ROSMAP) =======================
# Aggregates per-donor expression, merges pathology,
# and saves headless PNG/TIFF plots (no on-screen drawing).
suppressPackageStartupMessages({
library(Seurat); library(dplyr); library(tibble); library(readr)
l... |
8178b5424702b8a6b0fa66f1abe598a0d6eb3f5f589c0ccc4da11ba21930d24e | R | 9,439 | 309 | #!/usr/bin/env Rscript
## =========================================================
##Integrative cross-omics analysis identifies DNA methylation signatures associated with bilateral hippocampal volume, asymmetry and atrophy rate in the general population
##
## Usage:
## Rscript run_ewas_per_study.R <MODEL> <PHENOTYP... |
7d549d0408b5068d000e46ef2a99d2ca85883715f1c4d986bdf09160e419d329 | R | 9,441 | 188 | ##################################
# Test for enrichment of published gene sets among the 50 MP malignant genes
# Author: Kevin Johnson
##################################
library(tidyverse)
library(openxlsx)
library(msigdbr)
library(scales)
library(viridis)
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
... |
8145ad4a3af2ef4af132449d6eb43875c8b232a76b6ee62cccced25d6da9b214 | R | 9,441 | 280 | # Environment ------------------------------------------------------------------
library(here)
library(tidyverse)
library(lme4)
library(ggplot2)
library(ggthemes)
library(gghighlight)
library(ggrepel)
library(progress)
source(here("src", "R", "is_binary_column.R"))
# Data I/O -----------------------------------------... |
b3b0741bf7f1842f2a102e23fd07cfa4e6e8446d91906f38e032e75406c714a0 | R | 9,443 | 323 | # ===============================================================
# ?? Regression module entrypoints
# ===============================================================
# Helper implementations live in regression_shared_*.R files.
regression_ui <- function(id, engine = c("lm", "lmm"), allow_multi_response = FALSE) {
n... |
16ffa76b96b347aecacf45c4aa7f4df189306e3a1397f49dcaeb310041ce32e5 | R | 9,447 | 249 | #' EpiXcan Genotype Matching Script --> Output will be used in INGENE training --> imputed coexpression partners values
#'
#' This script performs genotype matching for CIS analysis by:
#' 1. Loading and processing genotype data from bim files
#' 2. Matching SNPs with CIS reference database
#' 3. Handling allele ... |
a3949748c29f83fc3bf7186830d16aebd4cdcc22c2953b22fe3f8282d0984e64 | R | 9,449 | 177 | #!/usr/bin/env Rscript
# ============================================================================ #
## package_manager.R
## MGNG-TUS study: Load packages and set scipen, contrasts, and seed.
## Also see sessionInfo() and loadedNamespaces() at the bottom.
## Copyright (C) Johannes Algermissen, University of Oxford, ... |
dd4aa49e0552f054b6cf3deebcc4bf77df60cab0aee6a5cd1090c21b1912c193 | R | 9,455 | 170 | library(zoo)
library(tidyr)
library(dplyr)
library(ggplot2)
library(readr)
library(readxl)
library(here)
library(magrittr)
library(MetaNeighbor)
library(reshape2)
library(gplots)
library(conflicted)
conflict_prefer("first", "dplyr")
conflict_prefer("rename", "dplyr")
conflict_prefer("filter", "dplyr")
conflict_prefer("... |
93b54e4f9fd81f53964c63d993dadbf801ab82a6ce3277eff08286018e1fa571 | R | 9,475 | 409 | ---
title: "Run meta analysis comparing Rosmap and BDR DNA methylation data"
author:
- David Lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r format(Sys.time(), '%d %B %Y')`"
output:
rmarkdown::html_document:
highlight: breezedark
theme: lumen
toc: true
number_sections... |
f611e319d7aae3593fb5ae773e6d37895f7d8730e27b1fd10c2e08a4a1cc6603 | R | 9,478 | 223 | # ============================================================================
# Septralu — definitive Weibull AFT model
# Includes: MI model, nomogram, calibration plots, bootstrap C-index
# ============================================================================
library(readxl)
library(rms)
library(Hmis... |
0bbd41e70e13d68a932aafeb0c3414f2dc4aa518627c5fc9130bd5618484d630 | R | 9,493 | 357 | ---
title: 'WGCNA modules - filter on enrichment with post-mortem interval (PMI) or surgery injury DE genes'
author: "Jon Thompson, Pers lab"
date: "`r Sys.time()`"
params:
date: !r substr(gsub("-","",as.character(Sys.Date())),3,1000)
randomSeed: !r 12345
pValThreshold: !r 0.05
nrepBootstrap: !r 1e4
padjMet... |
b8bd2aa948afadc9fe3f2e54f444acde2ea2f5dd3c95b57987168c6a0eac397c | R | 9,493 | 147 | #' Load networks as a list of igraph objects
#'
#' Loads the TSV files containing the gene-gene edge weights and summarizes them as a list of \code{\link{igraph}} objects per replicate (i.e. cell line or biological replicate within a species).
#'
#' The functions reads and formats the TSV files in the directory specifi... |
4655217bd1222f2ee601dfc737a8d405bd1f8039b8f178dc3b11b5a32bbc8704 | R | 9,504 | 283 | # Transcriptomic Analysis for Ferret Brain samples
# Jordan Wight, PhD
# jordan.wight@phac-aspc.gc.ca / jordan.wight@mun.ca
# Public Health Agency of Canada, National Microbiology Lab, Special Pathogens
###############################################################################
# Load required packages
library... |
7c2f38c7ccb3454d48df4092609ed6371a2f43017e24ceda72bc4190053eb4b2 | R | 9,504 | 294 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
######################
### load libraries ###
###... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.