sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
8d8629b5c6659701edad392680bba8f6df4b37d08e1feadd6f5eea707dcf51a6 | R | 2,169 | 75 | asd_sfari <- utils::read.csv(
system.file(
"extdata",
"SFARI-Gene_genes_01-03-2020release_02-04-2020export.csv",
package = "spatialLIBD"
),
as.is = TRUE
)
## Format them appropriately
asd_sfari_geneList <- list(
Gene_SFARI_all = asd_sfari$ensembl.id,
Gene_SFARI_high = asd_sf... |
9bb21954caecc1ba2156df754a4c46c8a490715736b053aebab07357a7ec983c | R | 2,172 | 52 | # -----------------------------------------------------------------
# Transpose feature tables, from row-per-feature to row-per-sample.
# Override relevant files (tsv + RData) with the updated versions.
# -----------------------------------------------------------------
require(tibble)
require(dplyr)
source("data_orga... |
21e2f657bd2aeca6ade4c655107a2cb0f6d339264fb7530ee47f1dfb6d8ff024 | R | 2,173 | 50 | #' SAHA2Seurat
#'
#' Adds annotations from a specified annotation database to a Seurat object. The function renames identities in the Seurat object based on cluster annotations and can add the annotations to the object's metadata if specified.
#'
#' @param obj A Seurat object in which identities will be renamed accordi... |
9ebfdc7284102c1f82107b90098b84a68c4701973c08b2d778ca06de1cee72b2 | R | 2,184 | 74 | ---
title: "NeuN- dataset"
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(pheatmap)
them... |
8ba3720b9389dafde3bee67a84cfba9acae1f63aca2a67822e7ffb029cec4a31 | R | 2,185 | 37 | #!/usr/bin/env Rscript
devtools::load_all(quiet = TRUE)
args <- list(
optparse::make_option("--seed", type = "integer", default = 20241210, help = "ModelSeed [default %default]"),
optparse::make_option("--inner", type = "integer", default = 3, help = "Inner folds [default %default]"),
optparse::make_option("--o... |
fb00024c6dd1ba2e61012b8e60cc59d2257ccc2cbe6153be2dfc7ea982e34ab1 | R | 2,185 | 58 | #' Convert CATMAID things (eg neurons) into Neuroglancer equivalents
#' @export
#' @param x An object to convert (see Descriptions for each method)
#' @param ... Additional arguments passed to methods
catmaid2ngl <- function(x, ...) UseMethod('catmaid2ngl')
#' @export
#' @rdname catmaid2ngl
#' @inheritParams brainmaps... |
ea45b4075d4088eab273a820549b66440682efc5286424871d9b88f21334db1f | R | 2,191 | 50 | ##################################
# Purpose: Analyze publicly available longitudinal snRNAseq malignant data for IDH-mutant glioma
# Author: Kevin Johnson
##################################
library(tidyverse) # v1.3.1
library(ggpubr) # v0.4.0
library(EnvStats) # v2.7.0
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/c... |
75694744e491faee7e1d3333d67242a6589f8b938fd8a5d0488b6e9f74cb1339 | R | 2,201 | 52 | ### In vitro effect size calculation on lipids and double bond composition
setwd(rstudioapi::getActiveProject())
rm(list=ls())
source("./Scripts/Function_scripts/Effect_size_functions.R")
library(tidyverse)
#########################################################################################
load("Output_Data/Invi... |
a4eed9b76e806b12e41d4306da9819af29582dcd2fde889e183d2ff30ad271ea | R | 2,203 | 87 | get_alignment_stats <- function(aligned_seqs, match = 1, mismatch = -1, gap_open = -5, gap_extend = -1) {
if (length(aligned_seqs) != 2) {
stop("Input must be a character vector of length 2: aligned reference and query sequences.")
}
ref <- aligned_seqs[1]
qry <- aligned_seqs[2]
if (nchar(ref) != nc... |
c72e133a774f61555ad8f592b9a65735b7f5d5d67e3578f421a2409de781bd42 | R | 2,204 | 61 | ### Class sum In vitro Experiment #2
setwd(rstudioapi::getActiveProject())
library(tidyverse)
rm(list=ls())
load("./Output_Data/Exp2_MsD.Norm_Impt_log2_conc_278_lipids.Rdata")
Exp2.class.sum <- 2^Exp2.log2.impt.norm.conc.MsD %>%
rownames_to_column(var = "LipidIon") %>%
pivot_longer(-LipidIon, names_to = "Sampl... |
68a5b1a632f04591780e24f80193908e01ac3a7a988276e1664f7e4ee88658c9 | R | 2,209 | 56 | #' Fetch change log information for one or more neurons
#'
#' @details As of August 2021 this is a simple wrapper of
#' \code{fabseg::\link{flywire_change_log}}. For now the old (and less
#' convenient format) available from the zetta API can be obtained with the
#' private \code{fancr:::fanc_change_log_zetta} fu... |
d016362594d6ccf02ed68f0234492ace6a6ad8150d5c51c088ad910a580f6d69 | R | 2,210 | 78 | #!/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 preprocessed RData")
parser$add_argument("-p", ... |
0ee40608835a378c5ad81edb7a82671b7a1bb4ba264efcbcbeb2731549732893 | R | 2,211 | 49 | ##################################
# Genetic and genomic longitudinal features across EDF1d, EDF1e, and EDF1f
# Author: Kevin Johnson
# Date Updated: 2026.03.30
##################################
library(tidyverse)
library(ggpubr)
library(EnvStats)
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir ... |
ca1b53ca85e11c66ed273a5395e092a6082f5a12b37efdca708f0e29453cc587 | R | 2,213 | 78 | #Applying MOFA+ to the Chronic Lymphocytic Leukemia cohort
library(MOFA2)
library(MOFAdata)
library(data.table)
library(ggplot2)
library(tidyverse)
rna <- read.csv("cbmc8k_rna_scaled.csv", header=TRUE, row.names=1)
protein <- read.csv("cbmc8k_adt_scaled.csv", header=TRUE, row.names=1)
rna <- data.matrix(rna... |
83a8118016e05953e6ed6488597eb4eba0dfe7bf76c562eeb375190a50645204 | R | 2,215 | 64 | # Packages
library(dplyr)
# Working directory
#setwd("~/FC-Network-Replicability-Effects")
# Load hierarchical clustering assignments
load("Analysis/Exploratory Analysis/hclust_cuts.RData")
# Reduce to 28 cluster options since filtering does not have pronounced effect
clust <- cut_avg[!grepl("nofilt",cut_avg$combina... |
70a03911e9372c4e711785df3094ba92f338a5b5f1f2c54c8fa917364a6d87cc | R | 2,218 | 63 | ### Class sum GPMV
setwd(rstudioapi::getActiveProject())
library(tidyverse)
rm(list=ls())
load("./Output_Data/GPMV_MsD.Raw.conc.Norm_Impt_291_lipids.Rdata")
GPMV.class.sum <- GPMV.impt.norm.raw.conc.lpd.MsD %>%
rownames_to_column(var = "LipidIon") %>%
pivot_longer(-LipidIon, names_to = "Sample", values_to = "Co... |
93bfc30c71921ced64c2dd4857e218961ba6cf2b487374426e91a804d26f0a0f | R | 2,228 | 57 | ## In vivo sorted cells effect size calculation
setwd(rstudioapi::getActiveProject())
rm(list=ls())
source("./Scripts/Function_scripts/Effect_size_functions.R")
library(tidyverse)
#########################################################################################
## ====calculate effect size on GPMV, all lipids... |
0291340ff664c646c909bae5fc3b4b14ca3462c4ba721f6aace48f43b55cf5fc | R | 2,230 | 63 | #######################################################
# Enumerate cumulative coverage per aliquot for WGS/WXS
# Date: 2022.07.07
# Author: Kevin Johnson
#######################################################
options(scipen=999)
# Necessary packages:
library(parallel)
library(tidyverse)
library(data.table)
library... |
48ce07ef5b9887821843e543a140812cbc7049efd070ce0d284cf232e81deba5 | R | 2,230 | 49 | library(dplyr)
### use already defined adjusted_df_1 (raw)
### use already defined coldata_df_1
##
coldata_df_1_MTLE_NL <- coldata_df_1_MTLE_NL %>% mutate(ip_group = case_when(
Diagnosis != "NL" & IP %in% c('HT(Head Trauma)', 'TCPC(Tonic-Clonic Postictal Confusion)',
'CVA(Stroke)... |
99a1d8678ef8de99eee795399de47dd48446bee6d6e8c399e7c6565aeb9e6a71 | R | 2,233 | 48 | # Moderate effect size genes project
# Author: Madison Caballero
# Desription: Collapses cases where one family has more than one A* or B* in the same gene
args = commandArgs(trailingOnly=TRUE)
geneA = args[1]
ELSE <- read.delim(file = paste0("intermediates/", geneA, ".elsewhere.txt"), header = FALSE)
skip = vector()... |
244681129b3f83c02a979de6187568709258cca763c33d7bce81a81d82a455da | R | 2,234 | 64 | # Load libraries
packages <- c("ggplot2", "readxl", "dplyr", "tidyr", "svglite")
for (pkg in packages) {
if (!requireNamespace(pkg, quietly = TRUE)) {
install.packages(pkg)
}
library(pkg, character.only = TRUE)
}
# Clear environment
rm(list = ls())
# Set working directory to the project folder
setwd("./pro... |
5bf59cb153a1d1151d7fefde0522f6daaf985225ae4f6159b571ce4449bac90a | R | 2,236 | 72 | library(clusterProfiler)
library(ReactomePA)
library(msigdbr)
library(ggplot2)
library(org.Mm.eg.db)
library(org.Hs.eg.db)
d = read.csv("Cgashet_DV_MG_Overlap_DEG.csv", header=T)
d <- subset(d, d$color==c('blue'))
d <- d %>% mutate(rank = rank(-(d$avg_log2FC),ties.method = "random")) %>%
arrange(desc(rank))
## assum... |
41dd613fc8c64fd2a2f4b2beff4c63d42ac9667156b8e946f86fa06d7b96b4d3 | R | 2,240 | 51 | #' Computes correlations between query and database expression profiles
#'
#' This function calculates correlation coefficients and p-values between all query and
#' database cell type expression profiles. Results are stored in `corr` and `pvalue` slots.
#'
#' @param ann An object containing normalized gene expression ... |
da41f4c3c2deda3eab7fb021b10da6d7c57e1afc9e0779fab89a5f2795c39d53 | R | 2,240 | 78 | #Applying MOFA+ to the Chronic Lymphocytic Leukemia cohort
library(MOFA2)
library(MOFAdata)
library(data.table)
library(ggplot2)
library(tidyverse)
rna <- read.csv("bmcite30k_rna_scaled.csv", header=TRUE, row.names=1)
protein <- read.csv("bmcite30k_adt_scaled.csv", header=TRUE, row.names=1)
rna <- data.matr... |
61c244c585001ce2696bbc2fb1aa5a547b2e40941706cc433ab3ac7c0d938ea4 | R | 2,248 | 59 | #' Set a standard viewpoint for MANC data
#'
#' @param viewpoint A string specifying an anatomical viewpoint (defaults to
#' ventral)
#' @param template The template object implied by the \code{viewpoint}
#' specification. Currently only the symmetric MANC template is supported.
#' @param returnparams When \code{FA... |
7bc0abe010fc39d71b41d5db912bc84c99ffb5e1bbb6df326dd18fdd39973d73 | R | 2,250 | 78 | ---
title: "Fig_4J"
output: html_document
date: "2025-12-24"
---
Looking at change in NK cell phenotype in tumor cells after CAR T infusion. Importing seurat object of expanded cohort tumor samples with full annotations including NK cell state (processing script 7) and miller annotations (processing script 8, not used.... |
e15a36959b68dc4cefad2f51f6932a346f261a726104ee122cb9ee226e0c5b59 | R | 2,250 | 85 | # library(rclipboard)
library(shiny)
library(fafbseg)
library(memoise)
is.url <- function(x) {
res <- try(httr::parse_url(x), silent = TRUE)
if(inherits(res, 'try-error')) return(FALSE)
isTRUE(grepl("http", res$scheme))
}
is.location <- function(x) {
if(is.null(x)) return(FALSE)
grepl("[0-9.]+,[0-9.]+,[0-9.... |
7b130f516cbd87bbc90baf2debd55df1158ff5d6be0219a99d4df8eaf818e69a | R | 2,254 | 37 | #!/usr/bin/env Rscript
devtools::load_all(quiet = TRUE)
args <- list(
optparse::make_option("--seed", type = "integer", default = 20241210, help = "ModelSeed [default %default]"),
optparse::make_option("--inner", type = "integer", default = 3, help = "Inner folds [default %default]"),
optparse::make_option("--o... |
eec338b3f76b5130c318f76edede928d00dfc05db761216fa1911476f6d6faeb | R | 2,254 | 54 | ## code to prepare `BANC` dataset goes here
banc.mesh.nl=fafbseg::read_cloudvolume_meshes(1,
cloudvolume.url = 'precomputed://gs://lee-lab_brain-and-nerve-cord-fly-connectome/volume_meshes')
banc.mesh.nl.orig=banc.mesh.nl
banc.mesh.nl[[1]]=Rvcg::vcgUpdateNormals(banc.mesh.nl[[1]])
nat::write.neurons(banc.mesh.nl, for... |
c652b018ac5cd48844a08f6d9a45be12e01721a113cea2054e8b38df61ced582 | R | 2,255 | 64 | library(lmerTest)
library(emmeans)
library(tidyr)
setwd("/Users/hyx/Downloads/hyx/Network-based_Brain_Ageing_ADNI/")
data <- read.csv('./cluster/bl_4group_6yr.csv', header = TRUE)
features <- c('VIS', 'SM', 'DAN', 'VAN', 'LIM', 'FP', 'DMN')
anova_results <- data.frame()
pairwise_results <- list()
emmean_matrix <- dat... |
63251da8d3809a8b431d85fbffcd764986c6f5c62ccebbc1dcbf474afa902890 | R | 2,256 | 74 | ---
title: "Treg_analysis"
output: html_document
date: "2026-01-04"
---
```{r}
library(Seurat)
library(tidyr)
library(ggplot2)
library(ggpubr)
library(dplyr)
library(harmony)
library(purrr)
library(cowplot)
library(rstatix)
library(ggbeeswarm)
library(ggbreak)
```
```{r}
srt_merge <- readRDS("~/processed_data/tumors... |
58da10aa163a54c8923f0199f4822f84a980e2ffa0623fc2047aca4fac91cd1a | R | 2,257 | 44 | # Standard stripped down plotting theme.
plot_theme <- theme(text = element_text(size = 8),
axis.text = element_text(size = 8),
axis.title = element_text(size = 8),
strip.text = element_text(size = 8),
panel.background = ele... |
4d271a803ca43d95086940191d96cb9eb6d739196b92b8c479cb9c4d33f39716 | R | 2,258 | 69 | rm(list=ls())
#Use for extracting the files from a specific directory
myDir1 <- "/projects/verhaak-lab/USERS/johnsk/glass4/results/mutect2/geno2db/"
myinf1 <- dir(myDir1)
myinf1 <- myinf1[grep("info.tsv",myinf1)]
myinf1 <- myinf1[grep("CARE",myinf1)]
myoutf1 <- myinf1
myoutf1 <- gsub(".tsv","",myoutf1)
myinf1 <- paste... |
987a8f37d2167c7da1354f65335132c866832e83e1cdb83c5024bbda70afb1b9 | R | 2,259 | 86 | #!/usr/bin/Rscript
fig_label <- function(text, region="figure", pos="topleft", cex=NULL, ...) {
region <- match.arg(region, c("figure", "plot", "device"))
pos <- match.arg(pos, c("topleft", "top", "topright",
"left", "center", "right",
"bottomleft", "bottom", "b... |
b1fb5f7393e2c36ff93d11f9a26f966550855c7e152b6e6194c5377ff13c62c2 | R | 2,259 | 70 | #Split the data into 6 cell types (EX, IN subtypes);
#perform differential accessibility (DA) analysis for each cell type, stratified by brain region.
library(ArchR)
library(parallel)
addArchRThreads(threads = 10)
addArchRGenome("hg38")
library(ComplexHeatmap)
library(ggsignif)
library("RColorBrewer")
projdir <- "pr... |
56b6f4c3469f286d28f3e80337befa17a21b1da076ed08aecd1812699f41e9a9 | R | 2,260 | 78 | #!/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 preprocessed RData")
parser$add_argument("-p", ... |
71f74657cb6f025a4ea45f256250d145594d5780214e4f5da37faa32df07a19b | R | 2,262 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### TT columns & weights ####
load("Data Preprocessing/Metadata/tt.Rdata")
meta_lst = meta_tt
subfolders = names(meta_tt)
rm(meta_tt)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Download/Raw_Data")... |
83fccfe8b9f56c5969aa6aee3ac78b651f801f030fa309ca7f38dfddc9a9ffb6 | R | 2,262 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### EZ columns & weights ####
load("Data Preprocessing/Metadata/ez.Rdata")
meta_lst = meta_ez
subfolders = names(meta_ez)
rm(meta_ez)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Download/Raw_Data")... |
dfe5b311b0baa6b796b4d04f1f5218b31b22151720dd4aed27ed3cb942d9ba3a | R | 2,262 | 51 | #Get barcodes of subclusters
library(ArchR)
outp <- "bam"
# load proj
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 %... |
f17cbb084b42075626b735891df715ada549a79b646261417102cbc3517d9a5f | R | 2,262 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### HO columns & weights ####
load("Data Preprocessing/Metadata/ho.Rdata")
meta_lst = meta_ho
subfolders = names(meta_ho)
rm(meta_ho)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Download/Raw_Data")... |
81a8bad44b509a51445841f9ba8a562782b21e74299a3e2b1af44070492ee860 | R | 2,264 | 54 | #' banc-nuclei — CAVE nuclei → nm coords + L/R side + containing neuropil.
#'
#' Feeds `root_position` fallbacks in `banc-calculate-root-positions.R`.
#'
#' @section Reads:
#' - CAVE `banc_nuclei()` (both tables)
#'
#' @section Writes:
#' - `banc_nuclei.csv` / `.feather`
######################
### Process nuclei #... |
bd650a3614168d3a42769873c3f8e3b1001d4095fd0cfba812e7e57fce8807c3 | R | 2,267 | 68 | #!/usr/bin/env Rscript
#-------------------------------------------------
# Title: Check success of hisat scripts
# Author: Amanda Zacharias
# Date: 2023-01-01
# Email: 16amz1@queensu.ca
#-------------------------------------------------
# Notes -------------------------------------------
# module load nixpkgs/16.09 gc... |
bfcf1a873ad6c46a7d8450c6f0efdef9017c49c572362d6f0fe5c69b796cedba | R | 2,268 | 81 | #!/usr/bin/env Rscript
# Generate harmony2 reference data for harmonypy tests.
#
# Prerequisites:
# Install harmony from the harmony2 branch:
# remotes::install_github("immunogenomics/harmony@harmony2")
#
# Usage:
# cd harmonypy
# Rscript scripts/generate_harmony2_reference.R
library(harmony)
library(data.ta... |
2e9840159747e3d34ffbc0fa2b24f75d73b79f26bfdc21c3bab72d30590e3a80 | R | 2,270 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### DOS columns & weights ####
load("Data Preprocessing/Metadata/dos.Rdata")
meta_lst = meta_dos
subfolders = names(meta_dos)
rm(meta_dos)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Download/Raw_D... |
aac858125d2935f033211d9ff8f1b95acd9a5c27bbd38837ac1cc0e155164709 | R | 2,270 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### AAL columns & weights ####
load("Data Preprocessing/Metadata/aal.Rdata")
meta_lst = meta_aal
subfolders = names(meta_aal)
rm(meta_aal)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Download/Raw_D... |
1d43a4f7c87dd480fd298ed714fce1feccdcee3ee8dce98ec09c72ad1d9e0caa | R | 2,272 | 66 | #' banc-spectral-clustering-run — Dispatcher: invoke `banc-spectral-clustering.py` from R.
#'
#' Helper that auto-locates the BANC data directory (O2 versioned tree or
#' local GCS mirror) and shells out to the Python spectral-clustering
#' script with the right `--data-dir` / `--banc-version` flags.
#'
#' @section Rea... |
bbdec640036ec25bfb50a61848b0fcd86b105ee22d4d8c8c76a3ff9d5f0b909f | R | 2,272 | 90 | ---
title: "E15.5"
author: "ChaiLab"
date: "12/11/2024"
output: html_document
---
```{r}
library(Seurat)
library(magrittr)
library(dplyr)
library(stringr)
library(ggplot2)
library(cowplot)
library(patchwork)
```
```{r}
#load data library
E15.5.data <- Read10X_h5(file = ".../E15.5_1/filtered_feature_bc_matrix.h5")
#c... |
95801e7b64d20a54b6569376501b33b37ca1be98b2d6965e3df37876a5a60d65 | R | 2,275 | 75 | #!/usr/bin/env Rscript
#-------------------------------------------------
# Title: Prepare candidates
# Author: Amanda Zacharias
# Date: 2023-08-10
# Email: 16amz1@queensu.ca
#-------------------------------------------------
# Notes -------------------------------------------
# module load nixpkgs/16.09 gcc/7.3.0 r/3.... |
ca0bc35faf83a35e2ad847ac2e59a9dc616b59489cc3cc55c8637842f28f745b | R | 2,280 | 75 | library("Matrix")
library("anndata")
library(spacexr)
set.seed(1)
#memory.limit(size = 400*1024) # in Megabytes (edited)
## Read command line arguments
args<-commandArgs(trailingOnly = TRUE)
sc_path <-args[1]
st_path <- args[2]
celltype_key <- args[3]
output_path <- args[4]
st<-read_h5ad(st_path)
st$var_names <- ma... |
ca08cb214167f11f8ec8d5cd9d3db23f9a81d3b38281dce261705b06d8b40065 | R | 2,281 | 48 | test_that("EGRET function works", {
skip_if_offline()
skip_on_cran()
# Use package bundled test data
toy_qbic_path <- system.file("extdata", "toy_qbic.txt", package = "netZooR", mustWork = TRUE)
toy_genotype_path <- system.file("extdata", "toy_genotype.vcf", package = "netZooR", mustWork = TRUE)
toy_moti... |
1d2d34e029a03b3a7550bd97e7a1254995a2e41f03af87c3b4d7e0f4f53922d2 | R | 2,284 | 77 |
# This script separates the alignments by protein domains and calculates nucleotide diversity (pi) for each domain.
# The structure-domain information is taken from Interpro website (See Methods in the manuscript).
# To avoid redundant information, the alignments by domain are not included in the repository.
# They c... |
b4f1ce68cf15ab96f4510d82fd64135cd27b70b5828e68d32e7f885625c02b73 | R | 2,284 | 61 |
## Figure S8 ####
tell_user('done.\nCreating Figure S8...')
resx=300
png('display_items/figure-s8.png',width=6.5*resx,height=3*resx,res=resx)
layout_matrix = matrix(1:4, byrow=T, nrow=1)
layout(layout_matrix)
par(mar = c(6,4,2,1))
panel = 1
ffi_all %>%
filter(protein=='PRNP' & peptide %in% use_peptides) %>%
mu... |
8d42a37331360f244588a0e62dd989cf36df6b41933e9c101f869639dc4c1256 | R | 2,285 | 74 | rm(list=ls())
#Use for extracting the files from a specific directory
myDir1 <- "/projects/verhaak-lab/USERS/johnsk/glass4/results/mutect2/geno2db/"
myinf1 <- dir(myDir1)
myinf1 <- myinf1[grep("info.tsv",myinf1)]
myinf1 <- myinf1[grep("GLSS-LX",myinf1)]
myoutf1 <- myinf1
myoutf1 <- gsub(".tsv","",myoutf1)
myinf1 <- p... |
b0db29633c749d7bc2f690c9cfe3389f6152d849d1dbdbc0b689c87a87549517 | R | 2,286 | 72 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### CC400 columns & weights ####
load("Data Preprocessing/Metadata/cc400.Rdata")
meta_lst = meta_cc400
subfolders = names(meta_cc400)
rm(meta_cc400)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Down... |
ed4ac12a3df901f7227ed4b0200179a4464a1f2493ea34a1ba4cb4afa83d6466 | R | 2,287 | 73 | remove(list = ls())
# Set wd to be general repo folder
#setwd("~/FC-Network-Replicability-Effects")
#### CC200 columns & weights ####
load("Data Preprocessing/Metadata/cc200.Rdata")
meta_lst = meta_cc200
subfolders = names(meta_cc200)
rm(meta_cc200)
# Change paths as needed
base_path = paste0(getwd(),"/Raw Data Dow... |
feee563fca2ad3efe71421c8122b74621b480687f2070bcc752006f9e2eb24f3 | R | 2,292 | 33 | # ==============================================================================
# Script 14 (orchestrator): Figure 3 + SupFig 8–10 – run all Fig 3 / SV scripts in order
# ==============================================================================
# Description: Sources 14 (TMB/SV prep, SupFig8), 15 (Fig3A), 16 (Fig... |
1c0a0b1c86e736820005a8b3c4b0af125f58284307de84d404376b4ef5049df2 | R | 2,296 | 54 | ###########################
# Ploting Samples oveview #
###########################
library(MOFA2)
library(ggplot2)
library(dplyr)
library(ggsci)
# Retrieving MOFA
load("C:/Users/User/Documents/Drive_PC/Lucas/GitHub/ROSMAP-MOFA/MOFA_real/Raw_data/mofas/standart_50f.RDATA")
# Retrieving participants phenoty... |
bc8b8ddd1ca7b40ee3efeacbbe327dc231ac201366383cba4fec99dfe76eb542 | R | 2,296 | 65 | library(irr)
library(mgc)
library(foreach)
library(doParallel)
## Calculate edge-wise ICC and Discr for visualization
setwd('/home/huyang/Projects/HuYang/HY_20251111')
## Set parallel cluster to speed up
n.cores <- 20
my.cluster <- parallel::makeCluster(n.cores, type = "FORK")
doParallel::registerDoParallel(cl = my.clu... |
0524053114175a93b9732afff1e455256d1f1f9b48e9d893c69505247f533216 | R | 2,299 | 76 | ##############################################
### ORGANISE DEFORMETRICA RESULTS MATCHING ###
##############################################
old <- getwd()
setwd("/home/ab714/bancpipeline/")
source("banc/banc-startup.R")
library(fs)
library(purrr)
library(dplyr)
library(processx)
#################
### Functions ###
##... |
9d7fe7a7d729438450a401a2f9be1b8b93820fb1a263c8662166f4e8466b7fad | R | 2,299 | 34 | # ==============================================================================
# Script 08 (orchestrator): Figure 2 (CDH1) – run all Fig 2 scripts in order
# ==============================================================================
# Description: Sources 08_Fig2C through 13_Fig2H in order so the Rmd can call
# ... |
ccbe9a6da58326cf381ae5b75123272b387b81e96f825784c0c3438d0aff1c5f | R | 2,300 | 51 | ## Calculate the Mean ICC difference between methods
setwd('/home/huyang/Projects/HuYang/HY_20251111')
## Loop each dataset
for (curr_set in c('BNU1', 'HNU1')){
out_dir <- paste('./PROCDATA/STATS/TRT/', curr_set, sep = '')
## Loop each atlas
for (curr_atlas in c('DK308', 'Schaefer300')){
## Load Mean ICC dat... |
84ba222f5b59838370a21298c09c3d55bf6f5fff508cf0cc403384a0a358aa99 | R | 2,301 | 58 | #####################################
## Write GATK segments to database for GLSS-LX cohort
## Author: Kevin Johnson
## Updated: 2022.08.26
#####################################
library(DBI)
library(tidyverse)
## Current project
projdir <- "/projects/verhaak-lab/USERS/johnsk/glass4"
setwd(projdir)
## Connect to the ... |
283b51a93f898a29f0dfdf82430508e5deb391acc67f7e9c7c8967a9345eb3e2 | R | 2,302 | 55 | # Set the output directory
output_directory <- "/home/joonho345/1_Epilepsy_RNA/RNA_Human/09.Deconvolution/02.IMPORT_GO/"
file_directory <- "/home/joonho345/resources/GeneSet/BioMart_GO/"
file_list <- list.files(file_directory, pattern = "\\.txt$", full.names = TRUE)
####### Create individual GO terms txt files######... |
35e3e9a08e9d4b02c53bc92a56c4b048f23737c17f7fe4ba060aa5233b7c4a22 | R | 2,302 | 60 | #!/usr/bin/env Rscript
## 5b.extract_maturation_DEGs.R
##
## Extracts the union of Time_G32A and Time_R403C maturation DEGs at
## FDR < 0.05, labels each gene as shared / G32A_only / R403C_only, and
## emits per-contrast logFC + FDR for both mutations on every row.
##
## Output: 03_Results/02_Analysis/Tables/maturation... |
4082a948bd90ed9371d71c16ad0d7825a65b9f39013a883a9c16ae93477eaea0 | R | 2,302 | 75 | #' Find the bodyid for an XYZ location
#'
#' @param xyz location in raw MANC pixels
#' @inheritParams manc_dvid_annotations
#' @return A character vector of body ids (0 is missing somas / missing locations)
#' @export
#'
#' @examples
#' ids=manc_xyz2bodyid(mancneckseeds)
#' tids=table(ids)
#' # are there many duplicate... |
4af2fa4a05cffbfb546b56e34e24ee230674e15127187771594c98a900ca6e28 | R | 2,308 | 61 | library(ggplot2)
library(reshape2)
library(viridis)
library(forcats)
# Create the data for light attenuation sensitivity analysis
data_exp2 <- data.frame(
Zone1 = c(6, 7, 6, 5, 7),
Zone2 = c(0, 0, 0, 0, 0),
Zone3 = c(5, 4, 2, 14, 19),
Zone4 = c(0, 5, 26, 15, 13),
Zone5 = c(1, 79, 266, 266, 261),
Zone6 = c(... |
29c5603f1a7fb9e3c056614504b39ed11aed1a30e069e88ce73f69c611cc051c | R | 2,310 | 76 | #R script of cross-validated regression (ridge linear regression) for Predicting Future MRI-based Brain Atrophy Based on Longitudinal Data
#Author: Maryam Hadji, University of Easatern Finland, Kuopio ,Finland (maryamh@uef.fi)
#last updated 13.Feb.2025
#
#Requirements:
#R version 4.3.1 or later
#install.packages("glmn... |
bbce2c5432061086cd47872f88bc7d4d4dce4364dc2570f20d9f1c24ab3fe0d2 | R | 2,310 | 51 | ## Calculate the Cohen's D difference between methods
setwd('/home/huyang/Projects/HuYang/HY_20251111')
## Loop each dataset
for (curr_set in c('eNKI')){
out_dir <- paste('./PROCDATA/STATS/AGE/', curr_set, sep = '')
## Loop each atlas
for (curr_atlas in c('DK308', 'Schaefer300')){
## Load CohenD data
in_... |
378fad3ddd8264826e69fe559f73ac96da387cbcba9c64048e25f4270d017198 | R | 2,312 | 51 | ## Calculate the Mean Discr difference between methods
setwd('/home/huyang/Projects/HuYang/HY_20251111')
## Loop each dataset
for (curr_set in c('BNU1')){
out_dir <- paste('./PROCDATA/STATS/TRT/', curr_set, sep = '')
## Loop each atlas
for (curr_atlas in c('DK308', 'Schaefer300')){
## Load Mean ICC data
... |
f0b4fd16fc0c37a5285a1a458010baaab105792b18154e56d610c290121ef057 | R | 2,314 | 71 | #!/usr/bin/env Rscript
#-------------------------------------------------
# Title: combine all the single celldata frames
# Author: Christina Meier
# Date: 2025-05-27
# Email: 19cm51@queensu.ca
#-------------------------------------------------
# Notes ------------------------------------------
# module load StdEnv/202... |
199694812e5e6d45d5803ad0f2dcbe50351f4cbe620fed3859a98e1658a6aa39 | R | 2,315 | 91 | ---
title: "E17_dimreduction_script2"
output: html_document
date: "2024-12-25"
---
Perform dim reduction on myelin depleted and control GBMs from script 1. Input is processed/filtered seurat objects from script 1. Output is dimensional reduction plots and corresponding seurat objects for cell state scoring and plottin... |
69c2f0425766de65f6ce00c72cf5bc95336cb256ef6465a024bf17a878e22423 | R | 2,316 | 73 | library(dplyr)
library(readr)
library(ggplot2)
library(ggpubr)
library(rstatix)
library(wesanderson)
raw <- read_csv("data/TREC_KREC_combine_Baby_4.csv")
data <- raw %>%
mutate(
age_bin_B = case_when(
baby_age == 0 ~ "CB",
baby_age >= 1 & baby_age <= 3 ~ "0-3 Days",
baby... |
01faabc4b1b97bf675cc31ae2bb10c2a5fed99b653b28c21313bda39f289143b | R | 2,318 | 67 | #' Identify cells located within spatial boundaries or ring regions
#'
#' Returns the subset of cells from the input data that fall spatially
#' within a given boundary or ring.
#' The boundary can be provided either as raw boundary points
#' (from `getBoundary()`), as polygons (from `buildBoundaryPoly()`),
#' or as ri... |
9ab5531a0f52ea1a9d099d0dcd6c1d95faba2ec84b2c2070b9f0397615fb6490 | R | 2,318 | 62 | library(devtools)
library(lisi)
library(kBET)
library(cluster)
library(factoextra)
library(dplyr)
library(ggplot2)
library(ggpubr)#
###数据准备###
set.seed(123) # 确保可重复性
#颞叶皮层----------------
load(file = "./Epilepsy19_scRNA_anno_cluster.RData")
umap_emb <- Embeddings(Epilepsy19,"umap")
### 批次混合评估 ####
#kBET评估 #
kbet_result... |
c70fd32069f70da39314d7e5636b6421784c6e09a277e18264eda329fa52bedf | R | 2,318 | 56 | #Written by Yapei Xie and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
# Load required libraries (assumes already installed)
suppressMessages({
library(longCombat) # https://github.com/jcbeer/longCombat
library(invgamma)
library(lme4)
})
CBIG_LBC_longCombat_motion <- func... |
ccc0553b94e8ddc7a02775f7b71950e8b364258f744e1ea0cd661aa0445fe526 | R | 2,319 | 67 | plot_DE_rates <- function(f,A1,A2,n_lines=100,binsize=0.5,Alpha = 0.5,YlimD = 0.25,YlimE = 0.5,random_sample=F){
library(scales)
t = read.table(f,h=T)
cn = colnames(t)
ind = grep("d12",cn)
times = c()
for (i in ind){
times = c(times,strsplit(cn[i],"_")[[1]][2])
}
times = -as.numeric(times)*binsize
plot_va... |
f4edf9d01cf74bde4e47ac995b764408c4c7ae6c1d4317bf66aafc57b2c846db | R | 2,319 | 63 | require(magrittr)
my.find.hvg <- function(object, method, avail.features, nfeatures=3000) {
if (method == "SCT") {
hvg.df <- object[[DefaultAssay(object)]]@SCTModel.list[[1]]@feature.attributes
avail.features <- intersect(avail.features, rownames(hvg.df))
hvg.df <- hvg.df[avail.features, , ... |
3e694a8c0b79438e0ec8e362a758b1b09d9ffff8008fbecadb501328aa554103 | R | 2,320 | 79 | ############
# RUN MOFA #
############
library(matsbyname)
library(basilisk)
library(MOFA2)
# Retriving omics and cell type data
rna_AC = readRDS("C:/Users/User/Documents/Drive_PC/Lucas/GitHub/ROSMAP-MOFA/MOFA_real/Raw_data/rnaseq_bulk_AC.rds")
rna_DLPF = readRDS("C:/Users/User/Documents/Drive_PC/Lucas/GitHub... |
9d58f83caa31e123a39221119cf2644d9609bab2be12fc5540cf1df38fffddc2 | R | 2,324 | 51 | ## Calculate the significance proportion difference between methods
setwd('/home/huyang/Projects/HuYang/HY_20251111')
## Loop each dataset
for (curr_set in c('eNKI', 'Cam-CAN')){
out_dir <- paste('./PROCDATA/STATS/AGE/', curr_set, sep = '')
## Loop each atlas
for (curr_atlas in c('DK308', 'Schaefer300')){
##... |
b13893193cd70f1f41f9114b68dc2ce5f0cc14aff35ea3eeea4eb75bcc8f821c | R | 2,324 | 63 |
#' Merge multiple SingleCellExperiment objects.
#'
#' @param sce_list A *named* list, where values are SingleCellExperiment objects
#' and names are SingleCellExperiment objects.
#'
#' @return A SingleCellExperiment object containing the input datasets with the
#' following limitations: (i) only genes common to all da... |
0a3a005687f3af7437ec1178c0360ebc2b464e0aac9cd1bfbf6ef44b3adec3fc | R | 2,325 | 69 |
###
#######
foverlaps3 <- function(DTx, DTy,
by=c('seqnames', 'strand', 'start', 'end'),
by.x=by, by.y=by,
#type='any',
#minoverlap=20,
#maxgap=0,
prime5.win.start = 10, ## distance of prime5s of reference.TR and read.TR
prime5.win.... |
c5808a8944d745e4cc33071786a2b17f9ca3108243ecd01b82bfa1fa45661c3f | R | 2,325 | 66 | createMs = function(preds) {
# create all combinations models
if (length(preds) == 4) {
variables = c(preds[1], preds[2], preds[3], preds[4],
sprintf("%s:%s", preds[1], preds[2]),
sprintf("%s:%s", preds[1], preds[3]),
sprintf("%s:%s", preds[1], preds[4... |
3d8379e834b5e03072f1db08da8c92d80ef1bb95920e5383b6cea83a0102f224 | R | 2,327 | 69 | library(data.table)
library(dplyr)
library(parallel)
library(limma)
library(purrr)
# Set working directory to project root
# setwd("path/to/project/root")
### Params
target_file_path = c("./genotype/")
site = "your_geno_bim" # LIBD_TopMed.geno.maf.EUR.chr1_22.noindels.overlap.GTEX.bim
na... |
6d72d4c1b56a3b81edf8f82b992f7582daccf5e91434871edad08141a18858b4 | R | 2,329 | 56 |
setwd(rstudioapi::getActiveProject())
rm(list = ls())
library(tidyverse)
library(ggpubr)
load("./Output_Data/Invitro.SC.analysis.Rdata")
Invitro.SC <- Invitro.SumSC %>%
mutate(Cla_SC = paste0(Class, "(", Sep.SC, ")")) %>%
mutate(Age = ifelse(grepl("^O", Samples), "Old", "Young")) %>%
group_by(Cla_SC, Age) ... |
a6cd8e645ca923d2d1c9a8d70312e1969f50067de7d18e724c1ea71a5076009d | R | 2,329 | 49 | ################################################################################
###############----------- PARAMETER ESTIMATES FUNCTION ------------###############
################################################################################
## Extracts undividual and group-level parameter estimates --------------... |
2083280911d036a792fd02e0511c33d18d039ac2cf9e07a7dcdc6ad8fd18158a | R | 2,330 | 58 | #####################################
## Write GATK segments to database
## Author: Kevin Johnson
## Updated: 2022.07.06
#####################################
library(DBI)
library(tidyverse)
## Current project
projdir <- "/projects/verhaak-lab/USERS/johnsk/glass4"
setwd(projdir)
## Connect to the correct* internal d... |
2c1cc6e1fa556f5f5aa3ae01dcaaba87ecf273ea83f86202169b42b5a5b4bb52 | R | 2,330 | 87 | # ============================================================
# environment.R
#
# This file initializes the simulation environment.
# It loads all required packages and defines core numerical
# utilities used throughout the KPCA and inference pipeline.
#
# NOTE:
# - This file must be sourced before running any... |
ecdaeae73c66d6ae00cc8633b3f5e8c8e15535a91f7504a55113232630709107 | R | 2,331 | 78 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# Plot full NBLAST-based dendrogram and neurons c... |
bad2c2ba7e32384045f8e056c55784d856032131241ac0792846747f175552f1 | R | 2,333 | 71 | ##### DE Genes Calculation for Individual Cells (No pseudobulk) #####
tany <-tany_integrated
tany$label.Age.Diet <- paste(tany$label,tany$Age,tany$Diet, sep="_")
unique(tany$label.Age.Diet)
# Set identity
Idents(tany) <- "label.Age.Diet"
# List of unique identity groups
groups <- unique(Idents(tany))
# In... |
6cf197198ec9aed556f9f1fb9aae443ac3a51a16ec87b58430d1018501f08c09 | R | 2,338 | 64 | #####################################
## Write TITAN parameters to database
## Author: Kevin Johnson
## Updated: 2022.02.25
#####################################
library(tidyverse)
library(DBI)
library(odbc)
## Current project.
projdir <- "/projects/verhaak-lab/USERS/johnsk/glass4"
setwd(projdir)
## Connect to the ... |
dbc8507d5cdff8db0f235740124c407cead29221b161295306979fb319589929 | R | 2,338 | 67 | # create SummarizedExperiment object (se) from bcbio output
# usage:
# Rscript bcbio2se.R work_dir out_file
# output: out_file a RDS file with the SE object in it
# needs work/metadata.csv provided by qcsummary._merge_metadata()
library(tidyverse)
library(tximport)
library(SummarizedExperiment)
library(janitor)
librar... |
c4fb7361c6f7dca96b480c984b8d7fd8f68c73b66d046e7208d1aece00e61843 | R | 2,340 | 81 | #Applying MOFA+ to the Chronic Lymphocytic Leukemia cohort
library(MOFA2)
library(MOFAdata)
library(data.table)
library(ggplot2)
library(tidyverse)
DNA <- read.csv("LIHC_preprocessed_DNAMeth.csv", header=TRUE)
CNA <- read.csv("LIHC_preprocessed_CNA.csv", header=TRUE)
RNA <- read.csv("LIHC_preprocessed_RNASe... |
a329ad89bacdb521181f4c60250b6739a8b3c4cfe26751ccbbafff719f10f54c | R | 2,341 | 62 | library(data.table)
library(ggplot2)
## SETUP
setwd("G:/original/AD/Neuropath/GWAS_Results/METAL_sig/GWS_loci_MainTable/Forest")
files <- dir()
colheader <- read.table("colheaders", header=FALSE)[-1]
colheader <- as.character(c("PHENO", "BATCH",colheader))
colheader
## RELABEL BATCHES
### NO UM in this gro... |
3c9c2f08cfb97c67a94d57ba8de560dcde72b26aa23791d17b6ef7361e0f1ff5 | R | 2,344 | 85 | library(anndata)
library(SONAR)
library(DescTools)
library(scater)
library(Matrix)
library(data.table)
library(Seurat)
library(matlabr)
library(R.matlab)
code_path <- "./core-code/"
#scrna data
SC <- read_h5ad("/data/ajita/Spatial/Datasets/Spatial_Deconvolution/DLPFC/SC.h5ad")
ref <- t(SC$X)
#annotations
cell_type <... |
080516ac371ab9eb20c6686768b37e35dacf34a4b88eeb5b672e131d3379f4ac | R | 2,346 | 66 | ### Class sum In vivo
setwd(rstudioapi::getActiveProject())
library(tidyverse)
rm(list=ls())
load("./Output_Data/Invivo_MsD.Norm_Impt_log2_conc_29.lipids.Rdata")
Invivo.raw.conc.29.good.peak <- 2^Invivo.log2.impt.norm.conc.MsD.good.peak %>%
rownames_to_column(var = "LipidIon")
save(Invivo.raw.conc.29.good.peak, f... |
35e5d259f2d21db3f68d4809f70f0adc962bfd2d167a6983f61a0561b7e95dc6 | R | 2,357 | 61 | #######################################################
# Enumerate cumulative coverage per aliquot for WGS/WXS
# Date: 2019.12.20
# Author: Frederick Varn
#######################################################
options(scipen=999)
## Parse snakemake
if(exists("snakemake")) {
files = snakemake@input[["metrics"]]
... |
d5f58ea071b59e1cafc5f2be46df419fcfff4382ff4e1d18ae00be55fd9c9526 | R | 2,361 | 86 | # Step.00 ----------------------------------------------------------------------
# 配置函数
rm(list = ls())
gc(reset = T)
source('script/Functions/Functions.R')
# unload packages
pkgs[which(load.packages == F)]
library(parallel)
library(qs)
rpid = Sys.getpid()
options(scipen = 100)
options(future.globals.maxSize = 2000 * 1... |
4cf6e459205f64062a9a8e8092428834f37d791871edebd9417156ef6c74f272 | R | 2,362 | 60 | #!/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 loom matrix")
parser$add_argument("-o", "--outp... |
4fc67195bd379df1a6462291008bd6f83d24cb5745e8413c065ead048bd945dd | R | 2,362 | 63 | # ----------------------------------------------------------------
# Unify species names in species-feature-tables.
# Override relevant files (tsv + RData) with the unified version.
# ----------------------------------------------------------------
require(vegan)
require(dplyr)
require(cgwtools)
source("data_organizat... |
31ea65a8cd1c8435da17c5372a3b9020e009519a91b382a8b2629caa93d902db | R | 2,363 | 61 | score.nodewiselasso<-function (x, wantTheta = FALSE, verbose = FALSE, lambdaseq = "quantile",
parallel = FALSE, ncores = 8, oldschool = FALSE, lambdatuningfactor = 1,
cv.verbose = FALSE, do.ZnZ = TRUE)
{
lambdas <- switch(lambdaseq, quantile = nodewise.getlambdasequence(x),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.