sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
df3e3dfb444a1b548918d3aafc12b206338026d2a0c0c6468012bc0c05fd9a27
R
6,426
191
#!/usr/bin/env Rscript #------------------------------------------------- # Title: edgeR # Author: Amanda Zacharias & CM # Date: 2025-07-17 # Email: 19cm51@queensu.ca #------------------------------------------------- # Notes ------------------------------------------ # module load StdEnv/2023 r/4.5.0 # # # # Options -...
5b90253bc9cdba11f29793ef4d2848ce43b9dad7614af88de0510be4b6fe1adf
R
6,429
142
seizure <- c("NRP2,MAPK10,TRPC5,KCNJ6,HOMER1,CNTNAP2,KCNK1,ITPR1,PCDH15,MPC1,GRM1,NTRK2,NEUROD2,NF1,PLCL1,BDNF,SYN3,GABRG2,GAP43,NRN1,SPTBN2,KCNA4,SV2C,MALAT1,CACNA1H,GABRG3,PHACTR1,SCG2,CACNA1G,GABRA5,SV2B,CHGB,KCNQ3,KCNC2,SPNS2,HTR4,KCNT2") seizure <- unlist(strsplit(seizure,",")) foo = function(x){ paste(toupper(s...
c5f194399325655ae6e18ebc99111843f518eb7660892adb939a425d78867736
R
6,437
192
#QC2: Use the nodose ganglia cell cluster specific asw to draw line graph to identify the best pc&res model #Phox2b is the marker of nodose ganglia cells #Identify the clusters where nodose ganglia cells are clustered ("Phox2b_cluster") #Extract the pergroup_asw of Phox2b expressed clusters and average their asw from r...
15f08eb4230a7594cd0a463fa6518bd84a2d5e64cfee8c0057c6a7f31a69de2d
R
6,438
156
# ENRICHMENT # library(topGO) library(tidyverse) get_cat_long <- function(cat){ category_dictionary <- c( "0" = "Unclassified", "1" = "Neural and synaptic structure and signaling", "2" = "Immune and inflammatory response", "3" = "Metabolism and catabolism", "4" = "Gene regulation", "5" = "Ti...
370afb17f14eb1b9ac41be0fb23ab7f3bcc904a62acbe7323e80cf0d7f51741a
R
6,447
141
################################################################################ ###############------ POSTERIOR PREDICTIVE CHECK FUNCTION -------############### ################################################################################ ## Extracts generated quantities in a memory saving manner -----------------...
88c12df5d471a93c6b954ee1c6424ffcc7dd00e439d9b93264ba4cd2fa53d958
R
6,449
189
--- title: "R Notebook" output: html_notebook --- This is an [R Markdown](http://rmarkdown.rstudio.com) Notebook. When you execute code within the notebook, the results appear beneath the code. Try executing this chunk by clicking the *Run* button within the chunk or by placing your cursor inside it and pressing *Ctrl...
3da2174114026f7ec71d02e6b1dd22b0b1dc9845f409596d0df777850e490a0b
R
6,454
155
# Set working directory to project root # setwd("path/to/project/root") tissues = c("dlpfc") full = sapply(tissues,function(x){ if(x!="amygdala"){ epixcan = get(load(paste0("./predictions/EpiXcan/EpiXcan_",x,"_testing_dataset_name_performance_selected.RData"))) epixcan = epixcan$gene ...
1c4ab9c1372b1f5175a58f3e5172e4b74efe6c3bdaeffaf7593791f1fb69bdd8
R
6,456
193
--- title: "Compute Methylation-based Resilience Score (MRS)" author: LW date: "`r format(Sys.time(), '%Y-%m-%d')`" output: html_document: toc: true toc_float: true number_sections: true word_document: default pdf_document: default --- # Overview This document computes a methylation-b...
aeb63038f677ce571695125d455bbc6fee388f260e0ae7f1950d2472d9cf147d
R
6,462
214
runEigDecomp2 <- function(obj, num.eigs){ nmat = obj@jmat@nmat; diag(nmat) = 0; norm_p1 = nmat d_norm1 <- Matrix::rowSums(norm_p1); d_rot1 <- Diagonal(x = d_norm1 ^ -.5); transitions <- as.matrix(d_rot1 %*% norm_p1 %*% d_rot1); diag(transitions) = 0 message("-- using Adjacency spectral e...
1077f7f89ff987e9fcf7b2513ea61d810347d1ffd05fc4e1adff004392e00ae0
R
6,465
148
#' banc-tracing-cns-network — CNS-cluster / CNS-network curation + snapshot restore. #' #' Patches CNS cluster + CNS-network assignments from tracing sheets and #' restores prior assignments from snapshots when needed. #' #' @section Reads: #' - `BANC-project/data/cns_cluster/spectral_clustering_assignments_banc_591....
e37655f4158d7fac2096e8a5299eede8bd1662fb32fc8e1555efe4cceab77591
R
6,468
218
#' qhet_mvmr #' #' Fits a multivariable Mendelian randomization model adjusting for weak instruments. The functions requires a formatted dataframe using the [`format_mvmr`] function, as well a phenotypic correlation matrix \code{pcor}. This should be obtained from individual level #' phenotypic data, or constructed as ...
768a25a13c8c15e3d2dea24aa5eb3a876be7e75c620891b403dea88ad9d3a377
R
6,471
216
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "readxl", "ggplot2", "tidyr", "dplyr", "reshape2", "rstatix") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies ...
e11b87ed34ff8ee07a257ac5939a2e0c1a6db9e797911715dae006e42f49088b
R
6,473
175
#' @title Save the output of lesymap. #' #' @description #' Function to save the output of lesymap. #' #' @param lsm object obtained with lesymap() #' @param saveDir folder to save to, will be #' created if it doesn't exist. #' @param infoFile (default='Info.txt') what should #' be the filename of the file with informa...
57e47937fdc17997dba904a9d60fd8fc6b7e418c2ab50fac4155f3c929c639c4
R
6,474
104
#' Normalize edge weights between 0 and 1 #' #' Transforms the edge weights of all networks to be in the range [0, 1]. #' #' Normalizing the edge weights between 0 and 1 makes them interpretable as adjacencies and ensures that network concepts such as connectivity are applicable. #' #' There are 2 approaches for the no...
ac9ff4d804178f06c7a4e816d1c9a1129647d3c71dc7de824ce6fd681b3d55f0
R
6,474
151
#' banc-malecns-nblast-images — Render per-query BANC↔maleCNS NBLAST review PNGs. #' #' For efferent / motor / visceral BANC neurons lacking a maleCNS match. #' #' @section Reads: #' - per-query NBLAST CSVs under `<banc.nblast.malecns.save.path>/results/<ver>` #' #' @section Writes: #' - `<banc.nblast.malecns.save....
9e0765b2c6353a70a147fcadd68cc6af653cd594038fe8273a809c9d7ebc48a2
R
6,485
160
#!/usr/bin/env Rscript ## 5b.maturation_euler.R ## ## Concern: replace Fig. 4c UpSet with a three-set Euler diagram ## of the maturation contrasts (Time_Ctrl, Time_G32A, Time_R403C). ## ## Produces Euler diagrams at FDR<0.05 (primary Fig. 4c replacement) and ## FDR<0.10 (relaxed-threshold robustness panel for Supplemen...
c284c3563c86e22f1d7793c398c78c17188c2e0a769e98185e5525a2e9f732ca
R
6,486
173
--- title: "Untitled" output: html_document date: "2026-04-17" --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` Load ```{r} library(rstatix) library(dplyr) library(car) library(GO.db) library(Seurat) library(readr) library(stringr) library(clusterProfiler) library(scCustomize) library(ggplot2) ...
8d17985585cb257f020da56cb80553b61b470a74ee61f0f30c7596d023149ae8
R
6,504
133
#' @title export2loom #' @description Create .loom file with the results of the analysis to visualize them in http://scope.aertslab.org #' @param scenicOptions scenicOptions object #' @param dgem Digital expression matrix #' @param hierarchy Labels for the hierarchy levels (up to three) #' @return The .loom file (\code...
de61c0398325fa9daed86b79a7ea5c1e2f130517fe82274ce737fe08db438af0
R
6,510
180
################################################################################ # Figure 3B with Individual Points # Creates multi-panel grid of all tissue scatter plots (Factor1 vs GDF15) # with individual sample points colored by DTHPLCE and copies individual # tissue plots to the journal guidelines folder #########...
0994fa021a95638613fa784dfa0e181fe63da70788c70a510996af19731d42f0
R
6,519
209
#!/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 clustered RData") parser$add_argument("-p", "--...
58e19ea0bb9454c0f0e58dee118d8d4f4ddc9c6fa969e2c73e564632f208f791
R
6,523
126
here::i_am("scripts/2.validations/2.3.binding_site_enrichment_and_divergence/2.3.23.binding_site_divergence_across_species.R") library(tidyverse) library(here) library(ggbeeswarm) library(ggsignif) wd <- here("data/validations/binding_site_enrichment_and_divergence/") dir.create(here(wd, "figures")) ## Calculate bi...
b51d52733bd0ba6af2e2c58ce2bda2ad12d85061a44b0b2379c86f1763a0a15b
R
6,525
167
#' Map points between FlyWire v1 and FAFB14 space (xyz nm) #' #' @description \code{flywire2fafb} maps points FlyWire->FAFB #' #' @details Note that you can also access FlyWire<->FAFB bridging registrations #' via the \code{\link[nat.templatebrains]{xform_brain}} series of functions. This will allow you #' to trans...
078d066f09309113e715d643511c10494cfa265ebcc541a529fff8dab906b96d
R
6,529
180
#' Convert XYZ locations between FANC4 (autoseg) and FANC3 (CATMAID) #' #' @param xyz An Nx3 matrix of coordinates #' @param ... additional arguments for \code{pbapply::pblapply} (used to chunk #' requests for many points) and eventually the POST command against the #' transform services server. #' @inheritParams f...
2098e5ea10911206762a53825d24a877ef0e57cae796b212d1d41d079ddd33bc
R
6,530
233
# Building a Prod-Ready, Robust Shiny Application. # # Each step is optional. # # 2. All along your project ## 2.1 Add modules ## # golem::add_module( name = "my_first_module" ) # Name of the module # golem::add_module( name = "my_other_module" ) # Name of the module ## 2.2 Add dependencies # usethis::use_package( ...
24baca0c4defeb0c7aede5386240c625f68762e544fbec2ba065095f1a36058d
R
6,548
158
#TODO: Convert regulons to GeneSet or a class? #' @title regulonsToGeneSet #' @description Converts the regulons stored as incidence matrix to gene sets (e.g. list of genes) #' @param incidMat Incidence matrix with TFs as rows and GENES as columns #' @return List of genes per regulon #' @examples #' regulonsToGeneSe...
49d81cb89f11d2c10b4bf430ec6e5cff21b263375c4ad62000817d7ff21c519e
R
6,552
170
--- output: github_document --- <!-- README.md is generated from README.Rmd. Please edit that file --> ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) options(tibble.print_min = 5, tibble.print_max = 5) ``` # RECOMBINE ##...
344260c03d6c2587e27bd28ec2cb54b388a54ce9219040ededf599abcdbb972b
R
6,553
154
###combine driver mutations of cancers library(dplyr) files <- list.files("data/Onco_mutations_OncoVar_TCGA/",full.names = T) dt <- do.call(rbind,lapply(files,data.table::fread,data.table=F)) files_gene <- list.files("data/Onco_genes_OncoVar_TCGA/",full.names = T) dt_genes <- do.call(rbind,lapply(files_gene,data.table...
8097a326cad48dc33182878fae101c52384612ff46634f6ba545076d61d7bb0c
R
6,565
143
gene_sets <- list( M_gene_set_GG_GO0014004_16 = M_gene_set_GG_GO0014004_16, M_gene_set_GG_GO0014014_59 = M_gene_set_GG_GO0014014_59, M_gene_set_GG_GO0014015_94 = M_gene_set_GG_GO0014015_94, M_gene_set_GG_GO0042063_410 = M_gene_set_GG_GO0042063_410, M_gene_set_GG_GO0048708_94 = M_gene_set_GG_GO0048708_94, M_...
582a00b69fbeb69f51b036f05e9f86dd6a1efcf28dfbf01baa7175d374eac628
R
6,568
156
#' banc-update-ntpred — Push neurotransmitter predictions to SeaTable. #' #' Reads `banc_ntpred_<src>.feather` (from `banc-calculate-ntpred.R`) and #' pushes per-neuron predictions to SeaTable's `neurotransmitter_predicted_v<N>` #' column (v1 reserved for older detector; v2/v3 populated from #' `--source v2/v3` runs). ...
c955146d5100c3e2813d6d2ae505d71710519b944d381dddea4b1128e57fe276
R
6,576
220
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "readxl", "ggplot2", "tidyr", "dplyr", "reshape2", "rstatix") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies ...
367fdbb95d8880f570a85db115f7a0c33ee119cd7094b01d04922c7854992c6a
R
6,586
153
#IMPORTANT INFORMATION BEFORE STARTING #.bam and .bai files should have the same name and should have identical paths as this .R file #This script exports 2 different results in pzfx (Prism) or xlsx (Excel) format. #file named as "-frequency-of-sequences" shows frequency of all sequences present in library #file name...
7fcbe6e61cf7bcfe0c7bca79e15a7758237541b92865c66cf5ba669bbae1eb19
R
6,607
220
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "readxl", "ggplot2", "tidyr", "dplyr", "reshape2", "rstatix") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies ...
a9156ef319076ad0bdcbaeec94b9f3b52e06b62c496519c413027366e6db5afa
R
6,607
175
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- #################################################...
ef9e0bf534fed2236e53634a3fe46c3d4e348d1b1cc079a1899c0027b356aba0
R
6,607
174
# ============================================================================= # Supplementary Figure 8 — STS Control Analysis: Learning # ============================================================================= # # Paper: ReFOFA (NCOMMS-24-11279) # Sample: Experimental group only, all stimuli (faces + animals),...
28bec90efd3fa977af25b4476de263532b6da790a7baa7873e9aaff44fa7abbd
R
6,612
146
here::i_am("scripts/2.validations/2.7.POU5F1_LTR7_enrichment/2.7.3.calculate_enrichment_near_POU5F1_module_members.R") library(tidyverse) library(plyranges) library(here) wd <- here("data/validations/POU5F1_LTR7_enrichment/") fig_dir <- here(wd, "figures/") dir.create(fig_dir) # all network genes all_genes <- readR...
8195e78ebdb87c772e90eeb617eff0a68744a7f5fc9cecc8fb1f46c7b90005e8
R
6,614
143
## Side chain analysis across 2 in vitro studies ## Remove LPC-O and LPE-O with 1 or 2 double bonds, as well as LPC-P and LPE-P with 0 or 1 double bond due to annotation ambiguity. setwd(rstudioapi::getActiveProject()) rm(list = ls()) library(tidyverse) library(ggpubr) library(ggrepel) source("./Scripts/Function_script...
549ce02acc0d1c16d41ae6d62b2ce08da1ca4217bb98a13906ed4d7db5ed42ba
R
6,618
210
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(ggraph) library(igraph) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) # Data I/O ----...
c6d6bed6f9997dc55a67d344db4cf36122470d18f125742e7f68f51a301496bb
R
6,619
207
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(ggraph) library(igraph) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R")) # Data I/O ----...
79e26f64f813830a0b19d05f218e7684e32847321126c5849a4cf09c34558e35
R
6,622
99
library(dplyr) #### choose groups to compare #### ####### COLDATA_3 ####### coldata_df_M_KAI_IH_IPSI_A_HA <- coldata_df_M %>% filter(TYPE_2 == "M_KAI_IH_IPSI_A_HA") filtered_samples_M_KAI_IH_IPSI_A_HA <- rownames(coldata_df_M_KAI_IH_IPSI_A_HA) adjusted_df_M_KAI_IH_IPSI_A_HA <- adjusted_df_M[, colnames(adjusted_df_M)...
ed5d583b3b3171ee73f7be98f6f5dbba5bb10fd6b3f76cdde0b1d689908bea33
R
6,622
118
here::i_am("scripts/2.validations/2.2.pathway_enrichment/2.2.2.summarize_Reactome_results.R") library(tidyverse) library(ggpubr) library(ggtext) library(here) wd <- here("data/validations/pathway_enrichment/") dir.create(paste0(wd, "figures/")) # load all regulators regulators <- readRDS(here("data/neural_different...
42f73003ebbe813f82027ae3a5814b63876fa29bad4855ebc9a8557f647366b7
R
6,624
144
#' Find reciprocal top hits #' #' Identifies reciprocal top hits and high scoring cell type pairs. This #' function calls the newer topHitsByStudy function. #' #' @param cell_NV matrix of celltype-to-celltype AUROC scores #' (output from \code{\link{MetaNeighborUS}}) #' @param dat a SummarizedExperiment object contain...
c082220d08de9f9cd11e151d7226af86c5e7c321da04bbe1c3f8448b0ce2dcdc
R
6,625
203
# create parser object suppressPackageStartupMessages(library("argparse")) parser <- ArgumentParser() parser$add_argument("-i", "--input", required=TRUE, help="list of summit bed") parser$add_argument("-g", "--genome", default="hg38", help="genome") parser$add_argument("-blacklist", "--blacklist", required=TRUE, help...
811c70be6842b5f93ae545615957e8fd2acc80b54bba37fbc8edc001b3f9ff35
R
6,628
158
# ============================================================================== # Script 07: Supplementary Figure 6 - Alterations in Key Pathways (ICLE) # ============================================================================== # Description: Generates pathway-level alteration matrix and heatmap for ICLE # ...
4bdaa7fc5bbb5461ef4f3456c708b5e0675de77666324536d54a38439cfc4231
R
6,631
113
library(data.table) library(parallel) library(dplyr) library(purrr) library(limma) # Set working directory to project root # setwd("path/to/project/root") ##### ### Params #### model="CIS_EpiXcan" model_cis = "CIS" model_epi = "EpiXcan" ### Params target_file_path = c("./genotype/") site ...
50d87f6f2786b2055348fe43ffd3197e95d8e93c3e2806c4bc3c65c640b8046b
R
6,633
132
# Load necessary libraries library(dplyr) library(pheatmap) library(Cairo) library(ComplexHeatmap) library(circlize) # For colorRamp2 ################################################ ################ GO terms ################### ################################################ # Choose Species Species <- 'Mouse' Spec...
e7b29abec8f00c63f535e10aeb2342c04dc7fb9b06d65642a40abd37afb004da
R
6,636
246
## lasso_model_omnibus.R ## ## For a given design matrix X_design and response Y, this function: ## 1) runs de-sparsified lasso (lasso.proj), ## 2) computes group-wise MinP (Westfall–Young) and iART-A statistics, ## 3) combines them via ACATO to obtain omnibus p-values for Group 1 and Group 2. ## ## Additiona...
b81750c839e564ad3fac3b62ba17ddb6670d4c2d3f4c0ef898b381592c73f2c3
R
6,650
135
library(here) library(dplyr) # load summary of top hits from Macosko/Zeng pretained models df1 = read.delim(here('results/cross_species_studies/cross_species_studies_mapping_summary_Macosko.csv'), sep = ',') df2 = read.delim(here('results/cross_species_studies/cross_species_studies_mapping_summary_Zeng.csv'), sep = ',...
f36a75ec1ad5ae562243e82a67bea1b9cb38ef2a6594d353691ef08fd1203c6a
R
6,653
121
#!/usr/bin/env Rscript library(Matrix) library(Seurat) library(tidyverse) library(readxl) library(Augur) source("scRNAseq_funs.R") IntegratedCsa <- readRDS("IntegratedCsa.RDS") print(sprintf("There are %s cells from Csa.", nrow(IntegratedCsa@meta.data))) ###########################################################...
9847dc101150f60d3688b20d77d4a5b8d7ce91424298025f04c8b2520081f291
R
6,661
193
#' @title Prediction of new cases from lesymap output #' #' @description #' Uses an existing lesyamp object output from your #' analysis to predict new cases. #' #' @param lsm object of class lesymap from previous analysis #' #' @param lesions.list list of antsImages, or a vector of #' filenames, or a single antsImage ...
86f40470dd14b4015ede859deea1891395e1c0ea6e4d6dc0b8cc0a50950b1d1d
R
6,669
151
#' Return the soma or root position of MANC bodyids #' #' @details Currently there are three sources of soma information, the #' \code{\link{mancsomapos}} data.frame distributed with the malevnc package, #' a key value annotation stored in DVID and and point annotations stored in #' Clio. Currently DVID is consid...
71623cba1730efc5e746c47455c11e7c8b4960c1ce4e150825aef6312c09fb1c
R
6,670
175
################################# # R script for exploring gene expression in the single cell dataset. ################################# # remove all the objects from the R session rm(list=ls()) #set the working directory: # ***********update "WD" with the path to your working directory on your computer: WD="P...
1b04db8b607aeb3768c841a3799d02ef7a50c38589d86e104366ac761fa84f66
R
6,686
156
here::i_am("scripts/2.validations/2.5.expression_pattern_divergence/2.5.1.calculate_expression_pattern_divergence.R") library(tidyverse) library(BiocManager) library(SingleCellExperiment) library(variancePartition) library(here) wd <- here("data/validations/expression_pattern_divergence/") dir.create(wd) ## Calcula...
68b575744d2969963e62a1d8a898b6d0ec850e816abb54afe09a183b30db3b3c
R
6,695
152
here::i_am("scripts/2.validations/2.4.sequence_divergence/2.4.2.calculate_sequence_divergence.R") library(tidyverse) library(plyranges) library(Biostrings) library(ggrepel) library(here) wd <- here("data/validations/sequence_divergence/") fig_dir <- here(wd, "figures/") dir.create(fig_dir) ## Get the longest (C)CDS...
f937b1dce860488cc7e885a2762def6c72b2fc8c8efd394b2b0b77be839a9a54
R
6,696
172
# ============================================================ # Inhibitory neurons (ROSMAP): CHCHD10 ~ Braak (NO covariates) # Per-donor aggregation from a single Seurat object # No AD/NC grouping or coloring # ============================================================ suppressPackageStartupMessages({ library(Seu...
14cb5652c418dc46d114c0da25c68ae1de3f06bdc6114ddf6c646bb6a852d9cd
R
6,704
229
library(ggplot2) path='/Users/menezeslf/Documents/LabManuscripts/del3-67 eye/hg38_loops/' files0=sapply(strsplit(dir(path),split='.hg38',fixed=TRUE), function(x) x[1]) files=paste0(path,dir(path)) df=data.frame('source'=character(),'chrA'=character(),'startA'=numeric(),'endA'=numeric(),'chrB'=character(),'startB'=nu...
f2edaf34fded6657695b24f9f4f0001c81fc915cb1b874642910b794e7af4f11
R
6,706
185
# ============================================================== # Script: Immune cells — merge clinical, QC, and DEG (wilcox) # Modified: run fully UNFILTERED DEG and save CSV + RDS # ============================================================== suppressPackageStartupMessages({ library(Seurat) library(dplyr) l...
1a8adff0e4cc31c2f315bb31e38d09510da0b441f051ab5a1b12d528a6303e7c
R
6,711
153
#' banc-hemibrain-nblast-images — Render per-query BANC↔hemibrain NBLAST review PNGs. #' #' @section Reads: #' - per-query NBLAST CSVs under `<banc.nblast.hemibrain.save.path>/results_with_mirrored/<ver>` #' - BANC + hemibrain BANC-space meshes #' #' @section Writes: #' - `<banc.nblast.hemibrain.save.path>/images...
28dde4f10b9e64a60cf7efb281c40cb07d1a2bfdef98bbd21ce9cc752ddb9ab0
R
6,712
126
# function to find differential spatial signaling scores (differential S3) # input: mFISH seurat object, with cell identity columns, assay, slots, networks, data directories, case and control dataset name, shortlist cell identity pairs and ligand-receptor pairs # output: for all ligand-receptors and all cell identity p...
f50284c7b3b95d3dddf2e1bac266208427b560315443f5d434bbf793ad89881e
R
6,715
211
# Environment ------------------------------------------------------------------ library(tidyverse) library(lme4) library(ggseg) library(patchwork) library(here) library(glue) library(ggraph) library(igraph) library(tidymodels) source(here("src", "R", "plot_ggseg_brain.R")) source(here("src", "R", "run_lda_workflow.R"...
54a1f18713bec9603206aa2b4323abaeb0a5d899c74c075e763cc430b539aaab
R
6,716
262
--- title: "Quality Control" author: "bcbio" date: "`r Sys.Date()`" output: html_document: code_folding: hide df_print: paged highlights: pygments number_sections: true self_contained: true theme: default toc: true toc_float: collapsed: true smooth_sc...
107cc5cd8d0a59f7fcf10a0d9c49044e0b09737f464fee698d949e366952c54e
R
6,730
290
--- title: "KM plots of aging-associated CpGs in external cohort (ADNI)" 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: page...
ca4a6650165b80c66a1cfe1a49c581e4a56ad6d0441630271a3aa9e66c49bebb
R
6,730
171
#!/usr/bin/env Rscript # Load required packages require(metafor) require(metap) require(dplyr) require(purrr) # Load configuration and utilities source("config.R") source("utils.R") # Parse command line arguments args <- commandArgs(trailingOnly = TRUE) if (length(args) != 1) { stop("Usage: Rscript ...
c5aefdce6cdcfa98683d335543394a43f124074b6f142eba22cd89fc46346a89
R
6,737
230
rm(list = ls()) ############################################ # Packages ############################################ pkgs_cran <- c("openxlsx", "readxl", "ggplot2", "tidyr", "dplyr", "reshape2", "rstatix") for (pkg in pkgs_cran) { if (!requireNamespace(pkg, quietly = TRUE)) { install.packages(pkg, dependencies ...
de40307e547182a77f522ee30ccfe7f03bfff7e3f286d0f0bc926ef5dd5fe4bb
R
6,741
171
--- title: "Linear models for ECG data" author: "Joonatan Palmu" date: "`r format(Sys.time(), '%d.%m.%Y')`" editor_options: chunk_output_type: console --- # Init ```{r options, include = FALSE} knitr::opts_chunk$set(include = TRUE, echo = TRUE, message = FALSE, results='asis', cache=FALSE, warning=FALSE, collapse ...
dfe13b36c9af331183f914345a9ed2b0b624392c59f229467ea99c019ea18f51
R
6,751
188
library(dplyr) library(pheatmap) library(viridis) library(RColorBrewer) #Plotting the top10 -log(p-value) of NGN3, NGN9, NGN16, NGN18 leftright <- c("Oxidative Phosphorylation", "Mitochondrial Dysfunction", "Respiratory electron transport", "RHO GTPase cycle", ...
c838a1dc5af6044f82842e24e3639eb03802a1ce852f544e3f5a0622f915c24f
R
6,763
159
#' banc-fanc-nblast-images — Render per-query BANC↔FANC NBLAST review PNGs. #' #' @section Reads: #' - per-query NBLAST CSVs under `<banc.nblast.fanc.save.path>/results/<ver>` #' - BANC + FANC BANC-space meshes #' #' @section Writes: #' - `<banc.nblast.fanc.save.path>/images/<ver>/todo/*.png` #' #' @section Invok...
095f5ea87aef61c8ae9319aa2d7e39e9fddd31bf754c20bccc326ee654a897a6
R
6,777
178
#!/usr/bin/env Rscript suppressPackageStartupMessages({ if(!require(optparse)){ install.packages("optparse"); library(optparse) } if(!require(data.table)){ install.packages("data.table"); library(data.table) } if(!require(tidyverse)){ install.packages("tidyverse"); library(tidyverse) } if(!require(ggplot2)){ i...
5586e0aefa4e9b9b58d3c15c9cfca3cfa7b548c8a73d6c71d3e4735827e3e276
R
6,783
209
#title: "Post-hoc ANOVA test Peri/resection cavity area" #author: "Mona Zimmermann" #date: "" #output: html_document #### Email: m.l.m.zimmermann@amsterdamumc.nl #### Purpose of script: Statistical analysis for the post hoc test of clinical #### relevance in activity changes for the peri-resection cavity ##...
76931b1eff8a4bcfb627ee4992e59efc2c62d248873bacf7468228bef13ea541
R
6,789
308
--- title: "Prepare pseudo-bulk data and conduct DE analysis" 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 --- ```{r s...
161619c51ee12e1d6abb5b7558d7391cc353cd775dd44e585da4663ca9660956
R
6,791
247
# ============================================================ # KPCA design matrix construction # # Three KPCA-based design matrices are constructed: # - P : pre-image–guided truncation using r_P components # - PA : adaptive truncation within the P set # - A : fully adaptive truncation based on global eigenval...
44c40d7a456e3a0262d131e63de7315c7f0c8836ce44bae096d2c4c184ff7ee4
R
6,793
208
## Simulating an ordinal trait with genetic association ## Strategy: ## simulate a large population with an ordinal association (K categories, ## proportions per category, and a defined minor allele frequency and ## odds ratio, under proportional odds assumption). ## Then, select samples from the large ...
b4d38ce76efa50f24343fbe29b1e1b0580be7d5e6f03850622013a57702c82a8
R
6,817
217
#### Section: Plot Context Initialization #### initialize_anova_plot_context <- function(data, info, layout_values) { factor1 <- info$factors$factor1 factor2 <- info$factors$factor2 order1 <- info$orders$order1 order2 <- info$orders$order2 if (!is.null(factor1) && !is.null(order1) && factor1 %in% na...
81cb6e273368165f680d6b6574c43e822a66e51e742e4428cb9c22b9bf1b4302
R
6,829
191
################################################################################ # Marker-based dot plot for graph-based clusters # # - No absolute/local paths are hard-coded or printed # - Input/output locations are provided via command-line arguments # - Cluster labels remain unlabeled (numeric IDs only) # # Usage: #...
c6361c2b67039f5ad3c368a40961cbd39568501b7c7a09642de96723d71a676b
R
6,832
158
############################## ### Run ArchR differential gene accessibility on multiome ATAC data for Myeloid cells ### Author: Kevin Johnson ############################## ## Myeloid cell states gene differential gene accessibility # Specify directories workdir <- "/vast/palmer/pi/verhaak/kcj28/care_idh_mut/results...
2df9c1a4d895806800d318b521d96b998dee023cfb9b2cd4468b13697e34908f
R
6,844
141
# ============================================================================== # Script 06: Supplementary Figure 5 - Key ILC vs NST Alterations (Patient Tumors) # ============================================================================== # Description: Builds frequency table and barplot of LumA ILC vs NST alterat...
a795fcfa0e9fd19489ffda4327e8da0f3e3ed19edf792e439efd743215d7cf73
R
6,852
147
#' Create Marker-free Visualization #' #' Generates a heatmap representing correlation coefficients. #' Includes options for clustering and tiered significance markers (***, **, *). #' #' @param ann An object containing correlation data (`ann@results$marker_free$corr`) and p-values. #' @param meta A data frame contai...
3e67794fd062bba3c3c4ef39cdf7692f67019375eeadf59e046c8992463f3f85
R
6,856
100
library(neuprintr) library(malevnc) library(igraph) library(nat) library(RCy3) #find neurons that make up an indirect pathway between two neurons of interest, #by their contribution to indirect connectivity strength #uses the get_partners_by_multistep_conn function with inputids and outputids specified #for a given p...
bf15af0281ed968e9f438cb55d85a1d7a0ab00c563efea89069620988346b080
R
6,871
144
#This script is to compare our clustering and nucseq annotation to publicly available datasets library(Seurat) library(ggplot2) library(dplyr) library(stringr) #1. read in data data<-readRDS('~/OneDrive - University of Cambridge/NodoMap/datasets/diet_nodomap.RDS') #Read in Kupari annotations kupari<-read.delim('~/One...
a5e2b9133f07e57826e4204ab903b995e538806b30e6a1c6ea89e215357febd2
R
6,872
202
library(Seurat) library(miloR) library(SingleCellExperiment) library(scater) library(scran) library(dplyr) library(patchwork) load("Astro_clusters.RData") counts <- Astro_sub@assays$RNA subset_FADS1@assays$RNA <- counts subset_fad <- subset_FADS1 DefaultAssay(subset_fad) <- 'RNA' subset_fad <- as.SingleCellExperime...
7b73abe0bf9c55af8590272ba9adc858d108eafcf804e51fff0dc7644bf72d26
R
6,874
186
# This code has been adapted from the wrsk package ((Brodinova et al (2017)) GenSynData<- function(size_clusters, p_inf, p_noise, mu_clusters, s_clusters, out_unif_range, out_n, ...
79bb8fb1b2d5ab7cc92ffb09e0b4fd233415ae85dc39f449c63ecd27ad8f645d
R
6,877
198
library(dplyr) library(pROC) library(ROCR) library(ggplot2) library(stringr) library(paletteer) library(patchwork) all_file_paths <- "D:\\work2\\t2dAndComplicationsUkb\\data\\processed\\lgbmNonMlr3_2ndEd" %>% list.files(path = ., pattern = ".*", full.names = TRUE, recursive = TRUE) aucPIndex <- which(str_d...
6e44b746c141dfb98597a934d799a2fd2975a1d7c5ae4022261d9f0f58f8cdca
R
6,879
206
### ----------------------------------------------------------------- ### Legacy exploratory analysis by a member of the Wilson Lab. ### Historical record only — not part of the bancpipeline release. ### ----------------------------------------------------------------- # Cluster DNs, use various distances and explore ...
804446a0c71e05d09f6fa4c45e7d0970323dff83fc42e9b85c18600fe86b581b
R
6,880
206
# # 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...
322750013e4172d7f6d513bd0fb7ef4560f3d26f565fb0dfa9ba3cc973ff543e
R
6,887
184
#------------------------------------------------------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...
fda107cc93033f9dbafe7f8e3be1ce51d334f42740b7dc68002c21925eb3929e
R
6,898
288
--- title: "Recalculate ROSMAP data DMR medians" 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_print: paged ...
fd998faee4bfd3d6ca5add2c30fd0fb68724c2ee1be7de07b3bf8b5643a31b4f
R
6,903
159
#' banc-fafb-nblast-images — Render per-query BANC↔FAFB NBLAST review PNGs. #' #' For BANC neurons lacking `fafb_match`. `BANC_NBLAST_REDO=TRUE` to regenerate. #' #' @section Reads: #' - per-query NBLAST CSVs under `<banc.nblast.fafb.save.path>/results/<ver>` #' - BANC + FAFB BANC-space meshes #' #' @section Writes...
d54f8e89856a2629d8c196e39662762363082d666c6fb4e38920d10b8752ddd9
R
6,904
198
### Data Preprocessing - Creating a long form dataframe from the FC matrices ### # Install packages #install.packages('stringr') #install.packages('tidyverse') #install.packages('readxl') #install.packages('reshape2') # Packages library(stringr) library(tidyverse) library(readxl) library(reshape2) ######### Setting ...
08c05735daa051d900eb2017829ee96c91181af576208f736716abc5726ff58e
R
6,909
181
here::i_am("scripts/2.validations/2.7.POU5F1_LTR7_enrichment/2.7.2.get_LTR7_positions_and_info.R") library(plyranges) library(tidyverse) library(rtracklayer) library(GenomeInfoDb) library(DBI) library(RMySQL) library(here) wd <- here("data/validations/POU5F1_LTR7_enrichment/") # Get LTR7 and HERV-int elements from ...
22ac72943af61ebbc7267eda11b9c48bd35224948381d72b7fd887c65c51a311
R
6,929
162
setwd("./SD/SD2") source("SD2_utiles.R") library(anndata) library(scater) ###helper functions generate_spots = function (se_obj, clust_vr,lower = 2, upper = 10, n = 1000, verbose = TRUE) { if (is(se_obj) != "Seurat") stop("ERROR: se_obj must be a Seurat object!") if (!is.character(clust_vr)) stop("ERRO...
a098d66d6df5ca17a88251d98dbf317028438c73e3e6d4d4f27f03e8a8184c9f
R
6,948
239
#!/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="list of summit bed") parser$add_argument("-g", "--ge...
f5eff15cc5d56221619df2ed79d6095526cfe6523be7d265754eee83ebdb28f6
R
6,952
158
#PCA #http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#R_clustering #http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#clustering_pca #http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/My_R_Scripts/my.colorFct.R args<-commandArgs(TRUE) RCSU_file = sprintf("%s", args[1]) vir_taxa_file = sprintf("%s"...
1ef319c912e0b10e41449edd6805a8150887fb5d2dfb3ddcc0257b81d57eef93
R
6,953
182
library(ggExtra) library(ggplot2) library(tidyr) library(MetaNeighbor) library(conflicted) library(magrittr) library(reshape2) library(dplyr) library(here) library(readr) library(tmod) conflict_prefer("count", "dplyr") conflict_prefer("select", "dplyr") conflict_prefer("filter", "dplyr") conflicts_prefer(dplyr::rename)...
42df7710c307795187bacfcf8642e4f636551e96cd3730066426b69db6df7167
R
6,961
221
#' @title GENI plots test data for the Manhattan plot #' #' @description An R object containing formatted results from a genome-wide #' association study (GWAS) of interleukin-6 levels with *p*-values < `1e-3` #' ([GCST90274815](https://www.ebi.ac.uk/gwas/studies/GCST90274815)). #' #' @name geni_test_manhattan #' #...
45bd30507d73fc38562c62439f9c62be6519c72701e05656bbc5584783a23a80
R
6,962
156
#' banc-meta-fix — One-off spot-fixes for BANC metadata issues. #' #' Ad-hoc fixer script for the franken / flywire / manc metas, run by hand #' when a class of metadata bugs surfaces. Not part of any automated run. #' #' @section Reads: #' - `<banc.meta.save.path>/flywire_meta.csv` #' - `<banc.meta.save.path>/manc...
11e1470564f447b5a68370d8aac5563dba761fc23f40973831b792bbaf963aea
R
6,964
199
--- title: "quantanx_PRS" output: html_document authors: "Rujia Wang & Megan Skelton" --- https://github.com/zhilizheng/SBayesRC # Prepare summary statistics for SBayesRC Created by Tian Xie 2023/06/12 ```{r sbayesrc prep} library(data.table) library(dplyr) #install.packages("https://github.com/zhilizheng/SBayesRC/...
9039e0553bfa8b03b91b9f6416ccf6dc2ef55fda409ebea31c35e9c2b651f1dc
R
6,969
205
#!/usr/bin/env Rscript ############################################### # Manoj M Wagle (USydney, MIT CSAIL) ############################################### suppressPackageStartupMessages({ library(ggplot2) library(data.table) library(ggridges) library(rlang) }) args <- commandArgs(trailingOnly = TR...
324f28cd060f997031e04bf97985abccf064a0bdbc3421e8a04c0162162b3421
R
6,981
93
plotfun.TRs.only <- function(samples=NA, visfrom = NA, visto = NA, vline= NULL, vline2 = NULL, # breakseq = 1500, breakseq=NULL, ylim=NULL, cagefr.clust=NULL, annot_fill_column = annot_fill_column, palette=colorvec, tr.palette = colorvec, ...
5803168fb47bec9a9f695dc817c8d1bd8a1c61c295e58c9059d84220da830751
R
6,981
211
# Load required libraries library(Seurat) library(patchwork) library(ggplot2) library(dplyr) # Load individual Seurat objects into the environment E12.5_1 <- readRDS(".../E12.5_1.RDS") E12.5_2 <- readRDS(".../E12.5_2.RDS") E12.5_3 <- readRDS(".../E12.5_3.RDS") E13.5_1 <- readRDS(".../E13.5_1.RDS") E13.5_2 <- readRDS("...
c347e6fd3bd60211bc9b7ce43e29f4cecbaa5cce458d9620be9241b1fc3a263a
R
6,983
182
#load libraries library(gwaRs) library(ggplot2) library(dplyr) library(ggrepel) #load in data #brain MTG Ext.DMR.Data <- read.csv("D:/ManhattanPlot/Ext.DMRs.con.vs.ad.meth.csv") #Brain PFC #Ext.DMR.Data <- read.csv("D:/Second.Ext.Meth.Data.MtSinai.csv") Int.DMR.Data <- read.csv("D:/ManhattanPlot/Int.CONvsAD...
5cb37281a607273644b9e11274a6258811baaaf5a0c171bc8c42b0be3b4e3ee4
R
6,987
171
#安装包 install.packages('Seurat') install.packages(c('dplyr','patchwork')) install.packages('BiocManager') BiocManager::install('scater') install.packages('ggplot2') #加载包 library(Seurat) library(dplyr) library(patchwork) library(cowplot) library(tidyverse) library(ggplot2) #导入数据 pbmc.data <- Read10X...