sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
f3ab63bbc1bd7cdda685a5583e78179399708343b8ac4d7b20677726cdf90526 | R | 5,523 | 247 | ---
title: "Evaluate gene sets identified by SDAN"
author: "Wei Sun"
date: "`r Sys.Date()`"
output:
html_document:
theme: journal
highlight: tango
toc: true
toc_depth: 3
toc_float:
collapsed: true
smooth_scroll: false
number_sections: false
df_print: paged
params:
cell_type_na... |
fb6986f2b03d1302690725bf30cbbe330f9153eaffdc48935fb66f1209f374ab | R | 5,528 | 127 | #!/usr/bin/Rscript
args <- commandArgs(trailingOnly = TRUE)
if (length(args)!=2){
stop('Insufficient parameters.\nUsage: ./create_regions_from_gencode.R <gff_file> <output_dir>')
}
suppressMessages(library(GenomicFeatures))
suppressMessages(library(dplyr))
gencode_gff <- args[1]
output_dir <- args[2]
options(scipe... |
d75dc70515ddd412482121276c468bc0c4a78fcfe9529ae6720d4311e1aa462e | R | 5,530 | 142 | # Hello, world!
#
# This is an example function named 'hello'
# which prints 'Hello, world!'.
#
# You can learn more about package authoring with RStudio at:
#
# http://r-pkgs.had.co.nz/
#
# Some useful keyboard shortcuts for package authoring:
#
# Install Package: 'Cmd + Shift + B'
# Check Package: ... |
3b10a301cff5a5e885922dfcc0886cdcb271b3216b089a796c1a946a11c804e2 | R | 5,531 | 251 | ---
title: "Calculate the characteristics distributions of samples"
author:
- David lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: pygments
theme: yeti
toc: true
number_sections: true
df_print: paged
... |
bfcdaff74fbdf7e0660c225d31c1aeb494145b699638449aba782e29248aee57 | R | 5,536 | 118 | # load the modules
source ~/load_modules.sh
module load hdf5/gcc/1.12.0
# change the dir
cd /home2/gkonop/project/02_MATRIX_FOR_CELLBENDER/KRIENEN_FERRET
# start R session
R
##########################################################
### Remove feature-cell barcode count matrix from
# count matrix (cellranger count o... |
c7d59a31527875a530fe63e4874756c7c7ebf745682c0e129b113db735c97c46 | R | 5,536 | 142 | #' @title Compute unique lesion patches
#'
#' @description
#' Compute uniqe patches of voxels with the same
#' pattern of lesions in all subjects. Useful to understand
#' the number of patterns that will be analyzed in a lesion dataset.
#' A patch is a group of voxels, not necessarily close to each
#' other, which have... |
ede8642308f35907521cd1e6ecd781c8c1644cddd0e510a3f17207303727f6a2 | R | 5,545 | 89 | #' Add directionality of interactions
#'
#' Determines the directionality of each network edge (positively correlated/coexpressed or negatively correlated/anti-coexpressed) based on a modified Spearman's correlation between the expression profiles of the 2 genes that form the edge.
#'
#' If the networks were inferred u... |
2f7481e5eb016979ac01faa8743131c382702b290eda604755b02500b26cca42 | R | 5,550 | 175 | # helper function
annotate_nanopore_transcripts <- function(np, ref, set_seqlevel_style = "UCSC", min_overlap = .6) {
seqlevelsStyle(np) <- set_seqlevel_style
seqlevelsStyle(ref) <- set_seqlevel_style
ref <- ref %>% mutate(gencode_strand = strand) %>%
group_by(gene_name,gencode_strand) %>%
reduce_ranges... |
655e328736b44dd823a519ebacab15ed403be931d0e0899567cadc3eb8c99809 | R | 5,550 | 171 | #TSMR·ÖÎö
#¶ÔÓÚ±©Â¶ºÍ½á¾ÖµÄÊý¾Ý¶¼À´×ÔOpen GWAS,¼´´æÔÚ±©Â¶IDºÅ
#ÒÔBMIºÍCHDΪÀý£ºBMIµÄID£ºieu-a-2 CHDµÄID£ºieu-a-7
#Ê×ÏÈÔÚRÀïÃæ°²×°TSMR°ü
install.packages("devtools")
devtools::install_github("MRCIEU/TwoSampleMR")
install.packages("TwoSampleMR", repos = c("https://mrcieu.r-universe.dev", "https://cloud.r-proje... |
70755f620714116d4f5367ff5c027926a444a7b19e8dd278930e532c3815c85f | R | 5,555 | 151 | context("client")
teardown({
mlflow_clear_test_dir("mlruns")
})
test_that("http(s) clients work as expected", {
mlflow_clear_test_dir("mlruns")
with_mocked_bindings(.package = "mlflow", mlflow_rest = function(..., client) {
args <- list(...)
expect_true(paste(args[1:2], collapse = "/") == "experiments/s... |
c156d16bf0e149db1f49189ade1d5d721b810eea56ddd87b825b9f3213b8c72d | R | 5,557 | 143 | # Access to the graphene server used by flywire
#' GET/POST from flywire (graphene) servers with appropriate authorisation token
#'
#' @section authorisation: Your authorisation will be based on a chunked graph
#' token normally stored at
#' \code{~/.cloudvolume/secrets/cave-secret.json}. See
#' \url{https://git... |
3e9020cdaf5da51dd03f3de1ee6760b1d2e07d58848357c79736ed5105b8c20b | R | 5,560 | 183 | # METAMODULE SPECIFICITY SCORING
# Arguments:
# 1. working directory containing CSVs of query dataset metadata and module activity scores (arguments #2 and #3)
# 2. filename of a CSV of metadata for each cell in query dataset
# 3. filename a CSV of module activity scores for each cell in query dataset (cells in rows;... |
1d074febd792ffbe7c928ca8fbf555df7f23667703d43c47e6525d0446f848dd | R | 5,562 | 173 | #' @title RSS
#' @description Calculates the regulon specificity score
#' @param AUC
#' @param cellAnnotation
#' @param cellTypes
#' @return Matrix with the regulon specificity scores
#' @seealso
#' The RSS was first used by Suo et al. in:
#' Revealing the Critical Regulators of Cell Identity in the Mouse Cell Atlas.... |
67808033e16c741ef4ec3b75ca7074c1280d570799407636dd48e9a39bb8c2c7 | R | 5,564 | 187 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# Script to explore pC1 inputs
#################... |
dadd120433b54278e929c96d8be7cd7a10e46560b227a9af713714ca87f64b64 | R | 5,568 | 141 | #' banc-export-skeletons — Package per-neuron SWCs into the versioned release tree.
#'
#' Prefers the detailed skeleton; falls back to L2 if no detailed SWC exists.
#'
#' @section Reads:
#' - `banc_<ver>_meta.feather`, detailed + L2 SWCs
#'
#' @section Writes:
#' - `banc_banc_space_swc/<root_id>_{skeleton,l2}.swc` ... |
fb9dfb577c804bc1bbfc1a4804fb9862e1a3da9be8c5378751674ed302f98d19 | R | 5,575 | 144 | #' banc-l2 — Acquire and reroot per-neuron L2 skeletons via `pcg_skel`.
#'
#' Skips neurons already on disk. Honours `banc.test.ids` if set globally.
#'
#' @section Reads:
#' - SeaTable `banc_meta`, CAVE L2 cache
#'
#' @section Writes:
#' - `<banc.l2swc.save.path>/<root_id>.swc`
#'
#' @section Invoked by:
#' prod... |
19edd37c76af80e618ba6220f55f0ba9908cabb42025f48089711afdc7d878e2 | R | 5,583 | 153 | #################################
# Here is an R script for exploring gene expression in the single cell dataset.
# It works with older Seurat (v3/v4). If you use newer versions (v5), adjust the script accordingly, e.g. in Step 4,
# replace dotPlotFigure@data with dotPlotFigure$data
################################... |
c18092be208e778b9d30d13308a3690d26b9b6dac15c84c895408fb7cb348a31 | R | 5,591 | 135 | #############################################
### Calculate BANC flow centrality splits ###
#############################################
source("banc/banc-startup.R")
redo <- FALSE
banc.size.threshold <- 5
nt.cols <- c("gaba", "acetylcholine", "glutamate", "octopamine", "serotonin", "dopamine", "neither")
# File path... |
48a66c8d52621c42620c7043ad9cc2a567ac4469b6b03ddf9425f78423183f32 | R | 5,599 | 180 | library(dplyr)
library(tidyr)
library(ggplot2)
library(factoextra)
library(ConsensusClusterPlus)
setwd("/Users/sadealme/Documents/Joana/Diffusion/SMT/New_DKI_SMT_Results/tables")
# Read data
data <- read.csv("deltas_abs_SMT_DKI.csv", header = TRUE)
data <- read.csv("deltas_abs_SMT_DKI_noBOLD.csv", header = TRUE)
dat... |
9eed8cf1a8452a59ed08acffe76c60dd509cc9ef2500a4e9e9ac3d75835b5b32 | R | 5,605 | 136 | ---
title: "fafbseg-catmaid-legacy-info"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{fafbseg-catmaid-legacy-info}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
This vignette includes information about interacting with FAFB catmaid and
Google autosegmentation services whic... |
eb8b54e428531e3a81d39853087e2ba2997b35b8be7d2abd9d3a94154acc5812 | R | 5,607 | 147 | #' banc-alignment-diff — Diff two alignment results CSVs.
#'
#' Compare two `banc_*_alignment_results.csv` runs and summarise per-neuron
#' changes in `assigned_cell_type` / `best_target_match` / `confidence` /
#' `runner_up_type`. Writes a per-row diff CSV (only changed rows) and a
#' human-readable summary on stdout.... |
ef2ae8b1fbc5c126a1c04294b9ecf747f74cf087f1b9e04f10a76dc7eb005a22 | R | 5,607 | 99 | here::i_am("scripts/2.validations/2.3.binding_site_enrichment_and_divergence/2.3.22.binding_site_enrichment_acros_module_types.R")
library(data.table)
library(plyranges)
library(tidyverse)
library(here)
library(ggsignif)
library(ggpubr)
wd <- here("data/validations/binding_site_enrichment_and_divergence/")
dir.create... |
946ae443cfcfa588c7eec636b6da26920f63e5498d6ed762953ac598e7b4f840 | R | 5,608 | 130 | #' banc-ids888 — Standalone root_888 backfill for SeaTable banc_meta.
#'
#' Lifted from `banc-ids.R` so the v888 backfill can run independently of
#' the rest (which can crash early in `banc_proofreading_notes()`). Reads
#' SeaTable, finds rows with missing / empty / zero `root_888`, resolves
#' their `supervoxel_id` a... |
673c49beb2309de59fe288c1c792f9dce3b24a447afe5f73d585c9119889b133 | R | 5,609 | 134 | # --- 1. Check and Install Required Packages ---
# This block ensures that all necessary packages are installed.
cat("Checking for required packages...\n")
required_packages <- c("readxl", "openxlsx", "tidyverse", "vroom")
new_packages <- required_packages[!required_packages %in% installed.packages()[,"Package"]]
if(le... |
7393a08d9d71c05916b6721250b11450795f630afd1c78bd2db7250b4b51ffd5 | R | 5,612 | 183 | context("test TIGER helper functions")
test_that("el2adj() converts edge list to adjacency matrix", {
el <- data.frame(
from = c("TF1", "TF1", "TF2"),
to = c("G1", "G2", "G1"),
weight = c(1, 0.5, 0.8)
)
adj <- el2adj(el)
expect_true(is.matrix(adj))
expect_equal(nrow(adj), 2) # 2 TFs
expect_e... |
4d9b64e792f4160eed4908a28d027f8dcacb73abfa225e5c17aca8a0bbf1f81f | R | 5,613 | 160 | # unit-tests for DRAGON
context("test DRAGON helper functions")
test_that("[DRAGON] scale() function yields expected results", {
x = seq(1:100)
scale_unbiased = scale(x) # default is bias=F
expect_equal(sd(scale_unbiased),1,tolerance = 1e-15)
xbar = mean(x)
xstd_bias = sqrt(1/length(x)*sum((x-xbar)^2))
... |
577629544bb8d18a0d142514bc7bfd4c0fb37380578996ad9488b03d33a0de48 | R | 5,624 | 126 | # ==============================================================================
# Script 10: Figure 2E - CDH1 Protein Paint Query
# ==============================================================================
# Description: Prepares CDH1 mutation tables for Protein Paint visualization
# (cell lines + TC... |
6643f59b3c1f9a397f64a48cef490dcdebefa28055a8afa82f26a5766ee9edc0 | R | 5,629 | 127 | ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
# Parameter settings
##### ##### ##### ##### ##### ##### ##### ##### ##### #####
setwd(file.path(getwd(), "R"))
source("00_directorySettings.R") # load baseDir <- "/WORKING_DIR"
source("00_settings.R")
dataDir <- file.path(baseDir, "data")
nmfDir <- file.path... |
1d066ba532bf58ce8c3999b2f830d71d647852437932f6a65b5fd2f5381afe13 | R | 5,631 | 247 | ---
title: "Merge coMethDMR meta-analysis and comb-p results."
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: true
df_... |
44c10c500106364ceebfc20d4a7873a45aaacf305b37e3f3c87c13480a852c1b | R | 5,641 | 139 | #' Windowed coverage over RLE runs (no per-base expansion)
#'
#' @param runs data.table with columns: by..., start, end, count (from cover_dt_weighted(return='rle'))
#' @param contigs_dt optional data.table with seqnames,start,end (and optionally strand/sample) to define spans
#' @param by grouping columns in runs (def... |
8a60eaa4af3fddbabfabbbe112157261903e6870c629469a068366f065fdd018 | R | 5,648 | 126 | ###################################
# List of metabolites for GSEA #
###################################
library(readxl)
library(dplyr)
# Retrieving the correctly formated metabolites names
names_ids <- read_excel("C:/Users/User/Documents/Drive_PC/Lucas/GitHub/ROSMAP-MOFA/MOFA_real/Raw_data/Metabolites/s1_no... |
8b69aee262d81a72aa55e81c15df19dc8733c2ff39fa6adfa4aa68bc02539cc0 | R | 5,650 | 87 | #NOTE: the Java wrapper for this script first sources CNVPlottingLibrary.R
options(error = quote({dump.frames(dumpto = "plotting_dump", to.file = TRUE); q(status = 1)})) # Useful for debugging
library(optparse)
library(data.table)
option_list = list(
make_option(c("--sample_name"), dest="sample_name", action="... |
81e7699c3f555e9d9fc80471d60d597a044fd4f07035fa1ceac10b4b59d442b7 | R | 5,651 | 187 | # ===============================================================
# 🧪 Visualization Module — Pairwise Correlation (Dispatcher)
# ===============================================================
visualize_ggpairs_ui <- function(id) {
ns <- NS(id)
sidebarLayout(
sidebarPanel(
class = "ta-sidebar",
... |
f0f5553dfbb37c2b0fd149e0460985962eb276afa97b8f8502e5085801e6ca13 | R | 5,661 | 178 | #
# 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... |
4d98a33dbca433afba137f5209f1812535dbbcb26506856ba2bff9c0b28c439b | R | 5,668 | 156 |
#' Read parameters from a set of FCS files
#'
#' This function reads information about the parameters in a set of FCS files
#' and returns the aggregate information in a table
#'
#' @param files.list A character vector containing the paths to the files
#'
#' @return Returns a data.frame with \code{row.names} correspon... |
8083ca9d753d7f83cce72b9f9674782723cb427055deabc9293ab732f76f818e | R | 5,671 | 120 |
#' @title runGenie3
#' @description Runs GENIE3 and formats the output
#' @param exprMat Expression matrix
#' @param scenicOptions Fields used: genie3wm, genie3ll (int)
#' @param nParts Number of pieces to fragment the partial results into (to check progress or in case the job gets interrupted). Default: 10
#' @param ... |
d06bd7b55315cf53c0479071c710adf730536b024a5fefad7d4b67188d44e2c4 | R | 5,671 | 135 | #' banc-alignment-false-positives-append — Append-mode refresh of alignment blacklist.
#'
#' Mirrors `banc-alignment-false-positives.R` but UNIONS the fresh SeaTable
#' pull with whatever is already on disk so rows already in the blacklist
#' survive even when they no longer carry `fafb_alignment_decision == F`
#' in S... |
50e3165460bdb68b098040439092b5788a2aeb3cf4e08d83557e5e04b477ad41 | R | 5,674 | 176 | library(WGCNA)
library(FactoMineR)
library(factoextra)
library(tidyverse)
library(data.table)
enableWGCNAThreads(nThreads = 0.75*parallel::detectCores())
tpm <- family_npc_counts_tpm #input tpm
datTraits <- datTraits_npc # input sample information
data <- log2(tpm+1)
keep_data <- data[order(apply(data,1,mad), de... |
9a6c7e684d1b7f664f0c650f755ef2fe3d1e6c6a131adc2264c11f353d4c1fd7 | R | 5,676 | 169 | #DegCre
# 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 r4.4.1_env
#conda deactivate
R
# Load required libraries
library(GenomicRan... |
1ef21b0b3d58e16fdd66e300d42b99495067407c568ba9f17b1ee505dbf93d26 | R | 5,681 | 169 | library(dplyr)
library(stringr)
library(pROC)
library(survminer)
library(survival)
library(ggplot2)
library(patchwork)
all_file_paths <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\LassoCox" %>%
list.files(path = ., pattern = ".*", full.names = TRUE, recursive = TRUE)
compIndex <- which(str_detec... |
b88f64cd7c266a6372858170b97110e3153bb43bf2ed68f0e5fcfb2a153831a9 | R | 5,682 | 139 | ################################
### CALCULATE BANC INFLUENCE ###
################################
source("banc/banc-startup.R")
library(influencer)
overwrite <- TRUE
# banc.version set in banc-startup.R
n_cores <- max(1, parallel::detectCores() - 1)
banc.influence.save.path.version <- file.path(banc.influence.save.pat... |
8db66c08446e83ff57781d5b36e2b4e69d9d3cc1fcded070ea3117d0f885e7a4 | R | 5,689 | 162 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
ffb2a08d9b123f5581ae6fad9453bae61d4299f10fab1ba2977ee905cc27f4be | R | 5,690 | 165 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
d6ce441804c4e44e882091a868cd7a0ccc61b8d5aba49b0630c0e84c02087f33 | R | 5,692 | 250 | ---
title: "Check genes associated with case-control status"
author: "Wei Sun"
date: "`r Sys.Date()`"
output:
html_document:
theme: journal
highlight: tango
toc: true
toc_depth: 3
toc_float:
collapsed: true
smooth_scroll: false
number_sections: false
df_print: paged
params:
ce... |
d62d2384c88611ce5c3f4d0c0a7ce2921a94603bf1ae607ff8bddef6c9bf7f34 | R | 5,693 | 178 | #' Sample spatial gene visualization workhorse function
#'
#' This function visualizes the gene expression stored in `assays(spe)` or any
#' continuous variable stored in `colData(spe)` for one given sample at the
#' spot-level using (by default) the histology information on the background.
#' This is the function that... |
c81f8bcc329d6a6497310d98d27872dbf2b164668012a08352b639ac18c644fb | R | 5,700 | 148 | # Caricamento delle librerie necessarie
library(readxl)
library(ggplot2)
library(dplyr)
library(tidyr)
library(ggpubr)
library(rstatix)
# Percorsi dei file
file_experiment1 <- "D:/2025 Imaging Ugent/pooled ROI/mut mouse 1-3-4 together .xlsx"
file_experiment2 <- "D:/2025 Imaging Ugent/pooled ROI/WT mouse 1-3-... |
e50157407c3be99f0c99bfe7c92a47d71f4ee664f908f8bd9ade42e74a3b8954 | R | 5,712 | 168 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
a697cd72d7b18f054a5778b2daac3bee2305dbacd06ff61210d4ae15db16945e | R | 5,714 | 117 | ##################################
# Plot the genomic data availability across the cohort
# Author: Kevin Johnson
##################################
library(tidyverse)
proj_dir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut"
fig_dir <- file.path(proj_dir, "figures/")
source(paste0(proj_dir, "/scripts/utils/plo... |
1c57d077107fb2831371ba3a0eea36c102a64b743c6e2caab1013b0c36f607c7 | R | 5,715 | 168 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
dd2b8c547887124b9f8e21bd3a47e7610a90f0770fbbbc6c52076d7c7a852a75 | R | 5,722 | 186 | ### -----------------------------------------------------------------
### Legacy exploratory analysis by a member of the Wilson Lab.
### Historical record only — not part of the bancpipeline release.
### -----------------------------------------------------------------
# AVLP JO and AN convergence
library(dplyr)
lib... |
33fcaab19edb236a6767d65220320a7c4af8addeb2cb5d95eb04f4ed3b53c281 | R | 5,737 | 162 | .chunkedgraph_token <- function(domain=NULL) {
poss_files = c(
paste0(domain, "-cave-secret.json"),
"cave-secret.json",
"chunkedgraph-secret.json"
)
chunkedgraph_credentials_paths = file.path(cv_secretdir(), poss_files)
token <- NULL
for(p in chunkedgraph_credentials_paths) {
if(file.exists(p)... |
538e1b6c0219be4095ddb02bf8facca41cf505aaf20ec041a727ab4955b72c64 | R | 5,738 | 156 | library(dplyr)
library(ggplot2)
library(shapviz)
library(ggchicklet)
library(stringr)
all_file_paths <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\lgbmNonMlr3_2ndEd" %>%
list.files(path = ., pattern = ".*", full.names = TRUE, recursive = TRUE)
aucpIndex <- which(str_detect(all_file_paths, "_aucP.rd... |
d7ef1b227b6aa5614d503864a8f017167b25ad69e19df24206515e94b4280ee5 | R | 5,738 | 150 | # ----------------------------------------------------------------
# Unify genus names in genera-feature-tables.
# Override relevant files (tsv + RData) with the unified version.
# ----------------------------------------------------------------
require(vegan)
require(dplyr)
require(readr)
source("data_organization/ut... |
fb6b7f27aa5ec0eb814856d5965e182a014d7a5fb563a796ba72861f6d40eaf6 | R | 5,744 | 141 | # Description: This script was used to analyze the risk factors for integCompAdd
# complications in patients with t2d
library(dplyr)
library(ranger)
library(survival)
library(car)
integComp2ndEd <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\integComp2ndEd\\integComp2ndEd.rds" %>%
readRDS(.)
trai... |
68f85066116b7813fff4030531c3faeacf6f4391cf123ed61e02e2ae01c69f95 | R | 5,748 | 151 | checkArgBool = function(arg0, arg0name){
if(!arg0 %in% c(TRUE, FALSE))
stop(arg0name, " should be TRUE or FALSE.")
}
checkArgNumeric = function(arg0, arg0name, minVal = NULL, maxVal = NULL, incMin = TRUE, incMax = TRUE){
if(!is.numeric(arg0)){
stop(arg0name, " should be a numeric value.")
}
if(!is.... |
867b3701e22c2018ce6979d3bcdccc3e1969360e25d96c677710436aa8672c94 | R | 5,754 | 150 | #' Generate Specific Sets of Vertical Volcano Plots
#'
#' Creates and saves predefined combinations of vertical volcano plots in both p-value and FDR modes,
#' with options to include or exclude calcium gene highlighting.
#'
#' @param contrast_tables List of data frames with DE results for each contrast.
#' @param conf... |
b75ed0596d0c5c36955b27a92d74c893c8fb2df2c26e28db57a76015733d490c | R | 5,754 | 187 |
###### Checking power spectrum of signals for filtering vs no for NIAK vs others ######
path <- "Raw Data Download/Raw_Data"
# Example of a filtered pipeline to check, we check several IDs
filt <- read.table(file = paste(path,"dparsf_filt_noglobal_rois_aal/Caltech_0051493_rois_aal.1D",sep = "/"),
c... |
f25f98054a18de371ca460f9eb183499d18041caed1bc970290ec9185941c373 | R | 5,762 | 158 |
setwd(rstudioapi::getActiveProject())
rm(list=ls())
library(tidyverse)
library(ropls)
library(data.table)
ssDT <- fread('./Output_Data/20210512_DESI_decomposition_single_sample.csv')
##====OPLS-DA between aNSCs and qNSCs from DESI====
all.DESI.Cell<- ssDT %>%
filter(!cell == "other") %>%
filter(!cell == "ki67"... |
067ff7a5ac00b615f410051a1c6de43f1b27d61d201ae9d72067f691df0c8a69 | R | 5,763 | 178 | ---
title: "Phosphopeptides (GSMLI-2vsGSveh) GO Analysis"
author: "Hannah Serio"
date: "2025-06-09"
output: html_document
---
```{r libraries, include=FALSE}
library(clusterProfiler)
library(org.Mm.eg.db)
library(ggplot2)
library(DOSE)
library(readxl)
library(openxlsx)
library(dplyr)
```
# GO Analysis - Synaptosome... |
73972858c28d61c31ff4b4454d3368ae06ef7d2ed9f3a7bd6b3bc100f64edb78 | R | 5,769 | 107 | library(dplyr)
#### coldata ####
coldata_all <- read.csv("/data/project/1_Epilepsy_RNA/RNA_Animal/Raw_Data/Animal_sheet_FTP.csv", header = TRUE) # total 349
coldata_M <- coldata_all %>% filter(Species == "Musmusculus") # M 277
coldata_R <- coldata_all %>% filter(Species == "Rattusnorvegicus") # R 72
rownames(coldata_... |
ecc2723bde4c83af42247fba8423139d4fa97a1f5224251a68d612a7ceecbad7 | R | 5,776 | 172 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
febdeb3a98a3cec49aff24de35fb171dd81b8e4403a08ef1898f7769dde2785e | R | 5,776 | 172 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
9160875086cc8e5f59ca37efa93003b61d3f5094b119e8e21af7406d6677d38b | R | 5,777 | 290 | ---
title: "Find overlap of significant CpGs and DMRs with eQTM study results"
author:
- David lukacsovich^[University of Miami]
- Lily Wang^[University of Miami]
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
highlight: pygments
theme: lumen
toc: true
number_sections: true
df_print... |
bd76c39c1a2eae8a9a1eb3eba76273aeb911132093426fc660cc59e6b7aa50df | R | 5,780 | 154 | #!/usr/bin/env Rscript
###############################################################################
## Calcium Gene Diagnostic Script
## Purpose: Investigate which calcium genes are present in the dataset
## and their statistical significance across all contrasts
############################################... |
cf797a9d600e8e363af1e766dc5847c2ff6ee5903594b62dcb2d8723cdb2c856 | R | 5,811 | 151 | library(Signac)
library(Seurat)
library(SeuratDisk)
library(dplyr)
outp <- "CellPhoneDB/output"
# sobj of dowmsampled cellset
sobj.ct <- LoadH5Seurat(file.path(outp, "tmp.Control.scATAC_clean.h5seurat"))
sobj.ad <- LoadH5Seurat(file.path(outp, "tmp.AD.scATAC_clean.h5seurat"))
sobj.ftd <- LoadH5Seurat(file.path(outp, ... |
6d31da81938e422e6ef514b88858bf7ad5d9d1d22fd2000d72ad174b96d0854a | R | 5,817 | 145 | #' @title Compute regional lesion load
#'
#' @description
#' Computes lesion loads from a series of images. A parcellation
#' image (or simple mask) is required to define the regions from
#' which to compute the lesion load.
#'
#' @param lesions.list list of antsImages or filenames.
#' Must be binary (0 and 1 values).... |
e2a91dee6b1b088a225539ead77bb00bcae496dd5e44e292858d46d0b0b2c892 | R | 5,818 | 181 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(lme4)
library(ggseg)
library(patchwork)
library(here)
library(glue)
library(ggsegJHU)
source(here("src", "R", "plot_ggseg_brain.R"))
source(here("src", "R", "run_lda_workflow.R"))
# Data I/O ------------------... |
01c6e7cba97b4c7d8ebc26040ea64663ca154fd550e3a4f4e2a138047658d6bc | R | 5,821 | 130 | #' Construct a sparse GRM for a given data set
#'
#' @param bedFile character. Path to plink file (bed) to be used for calculating the sparse GRM
#' @param bimFile character. Path to plink file (bim) to be used for calculating the sparse GRM
#' @param famFile character. Path to plink file (fam) to be used for calculat... |
7f36a6a7a68b9761ee2a34fbf458555f187a7fcb59604e23dad0b0c300765b80 | R | 5,824 | 154 |
# Tissue_Expression_Processing.R
# ============================================================================
# Purpose: For each GTEx tissue, perform TMM normalization once and save
# raw log2 TMM expression for genes needed by any downstream comparison.
#
# Inputs:
# - GTEx .gz expression files in Data/... |
11698f78f3fceea87e908d7279bc67a44387c1470ae7f28c4f9cb26afb93d2c5 | R | 5,825 | 142 | #ions from old mice
setwd("~/Library/Mobile Documents/com~apple~CloudDocs/Documents/Iliff lab /Experiments/CP circadian project/Revision experiments/Expt 8 old CSF CP ")
df_ions_old<-read.csv("expt8_ions.csv")
#remove outlier rows , 5, 14, 16
df_ions_old_use<-df_ions_old[-c(5,13,16),]
#need to test for normality
#te... |
a08b0caac7f7495971cf4cb1de692cedc6b72db6008a57bf347cc6c8c6f49e6e | R | 5,830 | 166 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
8d974f057160c0daaaa72e92466559b974657732e1a6990c3eb40d9c3ff76c81 | R | 5,833 | 185 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(lme4)
library(ggseg)
library(patchwork)
library(here)
library(glue)
library(ggsegJHU)
source(here("src", "R", "plot_ggseg_brain.R"))
source(here("src", "R", "run_lda_workflow.R"))
# Data I/O ------------------... |
3d22d53ee4df05d1415ce4bcd0cf6d2e96b297bb53704bf28f7158d03d7ba650 | R | 5,836 | 149 | # Functions related to meta-clusters (groups of highly replicable clusters).
#' Extracts groups of reciprocal top hits from a 1-vs-best AUROC matrix.
#'
#' Note that meta-clusters are *not* cliques, but connected components, e.g.,
#' if 1<->2 and 1<->3 are reciprocal top hits, {1, 2, 3} is a meta-cluster,
#' independe... |
0ce10a3441c0fdad3bdd8555b49b0b80bcea811c3375470db96f5b4f17515c5a | R | 5,837 | 127 | #' banc-fafb-skel-transform — Transform FAFB (FlyWire v783) skeletons into BANC space.
#'
#' For each FAFB-v783 root_id, picks the detailed (split + rerooted)
#' skeleton if available else the L2 skeleton, and applies the FlyWire-
#' JRC2018F-BANC registration chain. Saves the transformed SWC.
#'
#' @section Reads:
#' ... |
421d694717c7e2919870f97829febd7f63dd6f3e8bee2cb29358c2a62c0ce7b3 | R | 5,842 | 124 | library(gplots)
library(ggplot2)
library(data.table)
library(matrixStats)
library(magrittr)
library(dplyr)
library(tidyr)
library(here)
library(viridis)
library(readr)
library(conflicted)
conflicts_prefer(base::setdiff)
conflicts_prefer(base::intersect)
conflicts_prefer(dplyr::filter)
conflicts_prefer(dplyr::rename)
co... |
625f7eead8e6cec33ff2861795d0dcffc803b86b3332c48581c6d99a88e9ca7b | R | 5,854 | 78 | ## Correlations with peak frequency and oscillatory power in alpha, and other bands
library(readr)
library(ggrain)
library(ggplot2)
library(tidyverse)
library(ggpubr)
tablepath = "~/Library/CloudStorage/OneDrive-Personal/Documentos/Papers_msi/Thesis/Shared_Code_and_Data/"
tauorign <- read_csv("Desktop/Tau_data/tau... |
a131304b075ccd5747d5edde27c0f3c325fd7721679ffc9166819deb2c31e608 | R | 5,871 | 161 | #' Return a sample Neuroglancer scene URL for FANC dataset
#'
#' @details See
#' \href{https://fanc-reconstruction.slack.com/archives/C01RZP5JH9C/p1616522511001900}{FANC
#' slack} for details.
#'
#' @param ids A set of root ids to include in the scene. Can also be a
#' data.frame.
#' @param open Whether to open ... |
ff3c4106ae06e25d462b232a324f973a6445a561181cc64b1be9aaa412cd7bb0 | R | 5,871 | 213 | ---
title: "Race Models"
description: "A step-by-step race model workflow in EMC2 using the LBA"
author: "Niek Stevenson"
output: rmarkdown::html_document
bibliography: refs.bib
vignette: >
%\VignetteIndexEntry{"Race Models"}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
```{r, echo = FALSE}
r... |
8c810561abdefbbdc50d2276efad63aa7d9774eefd3111358427227a0b4f158c | R | 5,874 | 215 | ---
title: "Fig_S4R_Malig_cells_GSEA_Hallmark"
output: html_document
date: "2026-02-17"
---
```{r}
library(devtools)
install_github("alserglab/fgsea") # dependency for clusterprofiler
remotes::install_version("yulab.utils", version = "0.2.3") # dependency for ggtree
devtools::install_github("GuangchuangYu/ggtree") # ... |
1705cd9dc298b33fa52334ff07c3fab84519a40c8094733376a507031a2ebcf9 | R | 5,876 | 192 | ---
title: "Pre-processing of new 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)
devtools::load_all()
theme_set(theme_bw())
```
Load data:
`... |
d85053f926e2245e35b1df61381994e9ec5c828fa8c62304dfb2c68bfee6fc3a | R | 5,881 | 201 | # ===============================================================
# 🧩 Plot grid module
# ===============================================================
compute_default_grid <- function(n) {
n <- coerce_grid_value(n, default = 1L)
rows <- ceiling(sqrt(n))
list(rows = rows, cols = ceiling(n / rows))
}
coerce_gr... |
3da5c1fc8bea487ce18e798b4c26ad5e5d85209389e4527bbc104113ba4a764b | R | 5,883 | 160 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
587eda7b0c35a23319aaf1900ac56948544b70a194170140e608a953faae1cf6 | R | 5,885 | 158 | # Outline: The purpose of this script is to compute Bayes factors for mu and beta ERS and ERD, in a selected sensor (ususally C3) and in a set of labels (i.e., ROIs)
# Import packages
library(BayesFactor)
library(reticulate)
library(ggplot2)
library(scales)
library(effsize)
library(abind)
np <- import('numpy') # This ... |
1e95848023187394c348cae7fe15ebfc09a32bec4b4fd4997e3b1b30accb8d83 | R | 5,887 | 168 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
691c336395aa75d37c34319a63cfbf2a41e9e498ee31856cb1f5b688ab3b6089 | R | 5,890 | 130 | #################################
### Choose neurons to process ###
#################################
source("banc/banc-startup.R")
library(fancr)
# FANC cave tables
## https://cave.fanc-fly.com/annotation/views/aligned_volume/fanc_v4?middle_auth_url=global.daf-apis.com%2Fsticky_auth
# Define the mapping for each spe... |
149efca7f7db0fb8b9c28784043ff870c4564a00e9710631286993c279242755 | R | 5,891 | 158 | here::i_am("scripts/2.validations/2.3.binding_site_enrichment_and_divergence/2.3.10.liftOver_human_NPC_peaks_to_gorGor6.R")
library(plyranges)
library(tidyverse)
library(rtracklayer)
library(GenomeInfoDb)
library(here)
wd <- here("data/validations/ATAC_seq_peaks")
## Perform liftOver -------------------------------... |
ede86c6648777624e4ce18429b80d024c03f22e4fea48240aa80e46ea6cdb870 | R | 5,894 | 127 | library(beeswarm)
# wd <- '/net/mraid20/export/tgdata/users/yonshap/proj/mmcortex/'
wd <- '.'
# setwd(wd)
source(file.path(wd, 'scripts/util.r'))
load(file = './output/sequence_modeling/fig_6_data.rda')
dir.create('./output/paper_figs/Fig6/')
device <- 'pdf'
fig_6a_path <- file.path(wd, glue::glue('./outp... |
05504740e4769ea666f2bc174972af696079d724b10a5155640243931f89c14e | R | 5,895 | 164 | immuno_gnn <- function(input_type="single", input_file, pep, hla,
immuno_gnn_env, immuno_gnn_path, temp_dir){
input_type <- match.arg(arg = input_type, choices = c("single","multiple"))
pseudu <- MHCbinding::pseudu
if (input_type == "multiple"){
pep_file <- read.csv(input_file)
}else{... |
69ad52277a50c78cfa8f39498629dc39949eb5e52c4ffa107b7dba94fd591909 | R | 5,901 | 161 | #!/usr/bin/env Rscript
# ============================================================================ #
## 03_mgngtus_export2cbm.R
## MGNG-TUS study: Export data into .csv files to be read into MATLAB for computational modelling.
## Copyright (C) Johannes Algermissen, University of Oxford, Oxford, UK, 2024-2025.
rm(li... |
348a62a738c06380711735132dea4bf4f51049da0eaaef8eb5c5018d9d8ab11b | R | 5,907 | 133 | ## ============================================================================
## Beta-diversity ordination and PERMANOVA
## - Computes Bray-Curtis dissimilarity from a feature table
## - Performs PERMDISP2 (homogeneity of multivariate dispersions) and
## PERMANOVA (adonis2) to test group differences
## - Builds a f... |
040619075ec2f440d65ab3bfc44eb25e23ddf7a516db2974f06e40095faef60d | R | 5,912 | 174 | #!/usr/bin/env Rscript
source("banc/banc-startup.R")
# Download SWC files
out_dir <- "/n/data1/hms/neurobio/wilson/banc/matching/malecns/JRC2018U"
base::dir.create(out_dir, recursive = TRUE, showWarnings = FALSE)
gcs_path <- "gs://flyem-male-cns/v0.9/segmentation/skeletons-unisex-template/skeletons-swc/"
# Build and ... |
10ed1b9cae3f113a5e85b3b2c2480bd68a10b8f2b11752820182241c96e178f5 | R | 5,914 | 230 | mlflow_relative_paths <- function(paths) {
gsub(paste0("^", file.path(getwd(), "")), "", paths)
}
get_executing_file_name <- function() {
pattern <- "^--file="
v <- grep(pattern, commandArgs(), value = TRUE)
file_name <- gsub(pattern, "", v)
if (length(file_name)) file_name
}
get_source_name <- function() {... |
cb03182fa404f5bd19953519222dda921763dd8bdc91f5b3823c142354197af5 | R | 5,916 | 107 | here::i_am("scripts/3.brain_dataset/3.3.CroCoNet_analysis/3.3.3.cor_kIM_VS_cor_adj.R")
library(tidyverse)
library(CroCoNet)
library(ggsignif)
library(patchwork)
library(cowplot)
library(here)
dir_cor.adj <- here("data/brain_dataset/CroCoNet_analysis/")
dir_cor.kIM <- here("data/brain_dataset/CroCoNet_analysis_cor.kIM... |
6b48d7c14942f296041f0411be0efd29a6bfd3ab3388423cfa06485ea52a7d01 | R | 5,917 | 168 | #------------------------------------------------------SETUP-----------------------------------------------------#
# Load libraries
library(tidyverse)
library(data.table)
library(BuenColors)
library(Seurat)
library(irlba)
library(Matrix)
library(future)
library(reticulate)
library(ggrastr)
library(tidytext)
library(ma... |
5ffe4747eb54b310ab29b1303878d4367b7d2dedc19da40b24e755d8b62f8b97 | R | 5,918 | 182 | ---
title: "Fig_S4D_inferCNV.rmd"
output: html_document
date: "2026-02-17"
---
```{r}
library(Seurat)
library(dplyr)
library(ggplot2)
library(readr)
library(infercnv)
```
# Define functions
This outputs annotations files for cell ranger cell ids and seurat clusters and returns a gene expression matrix
```{r}
# Defi... |
b29305f8db0f9c6d99fcde2d02d43dec254412d82846f22606b1a6b1c8b3f892 | R | 5,920 | 164 | # modified 06/07/2015 pliu
#
# modified 3-29-10: Qunhua Li
# add 2 columns in the output of "-overlapped-peaks.txt": local.idr and IDR
# 01-20-2010 Qunhua Li
#
# This program performs consistency analysis for a pair of peak calling outputs
# It takes narrowPeak or broadPeak formats.
#
# usage: Rscript batch-consisten... |
610bbb9cedeff5d2d1c7022cbf4216936cf92dd26cba4f6bcb9044de51c71f04 | R | 5,921 | 187 | # Environment ------------------------------------------------------------------
library(tidyverse)
library(lme4)
library(ggseg)
library(patchwork)
library(here)
library(glue)
library(ggsegJHU)
library(tidymodels)
source(here("src", "R", "plot_ggseg_brain.R"))
source(here("src", "R", "run_lda_workflow.R"))
# Data I/... |
68be169dba0dfcb960bee86cb5094842d4066cf4a3a87acb2955e93e61352c77 | R | 5,929 | 190 | library(MicrobiotaProcess)
library(phyloseq)
library(tidyverse)
library(ggtree)
library(ggtreeExtra)
library(ggnewscale)
library(patchwork)
library(ggpubr)
library(aplot)
data_dir <- file.path(proj_dir, "Data")
qiime_dir <- file.path(data_dir, "QIIME2")
micom_dir <- file.path(data_dir, "MICOM")
#... |
ad1ad8e5be593be6239ebc7e4de1c9b89cc86064f7a0e517b2bdcc0803689293 | R | 5,933 | 192 | ---
title: "example_regenie_gwas_quantanx_metagwas"
author: "Megan Skelton"
output: html_document
---
# QC genotype file or create keep and extract lists to use in REGENIE script
Restrict genotype file to analysis sample
Perform any necessary additional QC to your genotype file e.g. Minor allele frequency & Hardy-we... |
b68682631b165ee51855d32d879a5b5c0a709720d5ec2953927c41a85696438b | R | 5,937 | 115 | # Written by Yapei Xie and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
CBIG_LBC_chord_diagram_Yan_Kong17 <- function(input_path, min_thre, max_thre, width_cm, height_cm, outname) {
if (!require(circlize)) install.packages('circlize')
if (!require(igraph)) install.packages(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.