knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(sc2marker)
mca.spleen Idents(mca.spleen) <- "anno" ids <- c("T cell(Spleen)", "Macrophage(Spleen)", "NK cell(Spleen)", "Marginal zone B cell(Spleen)") mca.spleen@meta.data$annotation_simplified <- mca.spleen@meta.data$anno
ids <- c("T cell(Spleen)", "Macrophage(Spleen)", "NK cell(Spleen)", "Marginal zone B cell(Spleen)") mca.spleen@meta.data$annotation_simplified <- ifelse(mca.spleen@meta.data$annotation_simplified %in% ids, mca.spleen@meta.data$annotation_simplified, "Other") mca.spleen@meta.data$annotation_simplified[mca.spleen@meta.data$annotation_simplified == "T cell(Spleen)"] <- "T Cell" mca.spleen@meta.data$annotation_simplified[mca.spleen@meta.data$annotation_simplified == "Marginal zone B cell(Spleen)"] <- "B Cell" mca.spleen@meta.data$annotation_simplified[mca.spleen@meta.data$annotation_simplified == "NK cell(Spleen)"] <- "NK Cell" mca.spleen@meta.data$annotation_simplified[mca.spleen@meta.data$annotation_simplified == "Macrophage(Spleen)"] <- "Macro" Idents(mca.spleen) <- "annotation_simplified"
To run sc2marker you need to execute the following command, providing a clustered single cell data sets (as Seurat object), the cell type of interest and the antibody databased (IHC, ICC or Flow).
nk.markers <- Detect_single_marker(mca.spleen, id = "NK Cell", category = "Flow", org = "mouse", min.pct = 0.1) get_antibody(nk.markers, org = "mouse")
# Ridge plot of top 9 markers of NK cells plot_ridge(mca.spleen, id = "NK Cell", genes = nk.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
b.markers <- Detect_single_marker(mca.spleen, id = "B Cell", category = "Flow", org = "mouse", min.pct = 0.1) get_antibody(b.markers, org = "mouse")
# Ridge plot of top 9 markers of B cells plot_ridge(mca.spleen, id = "B Cell", genes = b.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
t.markers <- Detect_single_marker(mca.spleen, id = "T Cell", category = "Flow", org = "mouse", min.pct = 0.1) get_antibody(t.markers, org = "mouse")
# Ridge plot of top 9 markers of B cells plot_ridge(mca.spleen, id = "T Cell", genes = t.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
Macro.markers <- Detect_single_marker(mca.spleen, id = "Macro", category = "Flow", org = "mouse", min.pct = 0.1) get_antibody(Macro.markers, org = "mouse")
# Ridge plot of top 9 markers of B cells plot_ridge(mca.spleen, id = "Macro", genes = Macro.markers[1:9,]$gene, ncol = 3, assay = "RNA", aggr.other = F)
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.