library(knitr) opts_chunk$set(collapse = TRUE, comment = "#>", tidy = TRUE, tidy.opts=list(width.cutoff=70))
PISCES
in your research, please cite our preprint on bioRxiv [TO DO].# install cran packages install.packages("abind", "BiocManager", "circlize", "cluster", "devtools", "ggplot2", "ggpubr", "ggrepel", "grDevices", "Matrix", "RColorBrewer", "RSpectra", "Seurat", "uwot") # install bioconductor packages BiocManager::install("biomaRt") BiocManager::install("ComplexHeatmap") # install PISCES devtools::install_github("califano-lab/PISCES")
set.seed(343) data("PBMC.raw")
qc_plot(pbmc.raw, species = 'hum', genes = 'symb') ggsave(file = 'd496-blood/d496-blood_qc.jpg', dpi = 500, height = 6, width = 6) filt.counts <- qc_filt(raw.counts, max.depth = 25000, max.mt = 0.25) norm.counts <- pflpf_norm(filt.counts)
norm.counts <- pflpf_norm(filt.counts) gexp.pca <- fast_pca(norm.counts, num.pcs = 100) gexp.dist <- cor_dist(t(gexp.pca$x)) gexp.clust <- louvain_k(gexp.dist)
sqrt(1 - spearman)
). This distance is then used to perform clustering with the Louvain algorithm:mcell.mats <- make_metacells(norm.counts, gexp.dist, gexp.clust$opt.clust) for (cn in names(mcell.mats)) { saveRDS(mcell.mats[[cn]], file = paste('cluster-', cn, '_mcell.rds', sep = '')) }
data
directory of PISCES. Please consult the README.txt
therein for guidelines on the appropriate parameters to use for network generation. For the purposes of this vignette, we have pre-generated cluster-specific networks, which can be loaded in directly:# TO DO: add networks
meta_narnea
):gexp.ges <- internal_ges(filt.counts, norm.method = 'pflpf', est.method = 'map') narnea.res <- readRDS('d496-blood/d496-blood_pisces-narnea.rds')
narnea.dist <- cor_dist(narnea.res$PES) narnea.mds <- make_mds(narnea.dist) narnea.umap <- make_umap(narnea.res$PES) narnea.clust <- louvain_k(narnea.dist) narnea.mrs <- cluster_signature_mrs(pisces.gexp.list$norm.counts, narnea.clust$opt.clust, net.list)
narnea.mrs <- cluster_signature_mrs(pisces.gexp.list$norm.counts, narnea.clust$opt.clust, net.list) cluster_mr_volcano(narnea.mrs, num.mrs = 10)
cluster_mr_heatmap(narnea.res$PES, dat.type = 'pact', clust.vec = narnea.clust$opt.clust, narnea.mrs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.