plotCodes: tSNE and PCA on SOM codes

View source: R/plotCodes.R

plotCodesR Documentation

tSNE and PCA on SOM codes

Description

Plots the tSNE and PCA representing the SOM codes as inferred by FlowSOM. Sizes are scaled to the total number of events assigned to each cluster, and points are color according to their cluster ID upon ConsensusClusterPlus metaclustering into k clusters.

Usage

plotCodes(x, k = "meta20", k_pal = .cluster_cols)

Arguments

x

a SingleCellExperiment.

k

character string. Specifies the clustering to use for color coding.

k_pal

character string specifying the cluster color palette; If less than nlevels(cluster_ids(x, k)) are supplied, colors will be interpolated via colorRampPalette.

Value

a ggplot object.

Author(s)

Helena L Crowell helena.crowell@uzh.ch

References

Nowicka M, Krieg C, Crowell HL, Weber LM et al. CyTOF workflow: Differential discovery in high-throughput high-dimensional cytometry datasets. F1000Research 2017, 6:748 (doi: 10.12688/f1000research.11622.1)

Examples

# construct SCE & run clustering
data(PBMC_fs, PBMC_panel, PBMC_md)
sce <- prepData(PBMC_fs, PBMC_panel, PBMC_md)
sce <- cluster(sce)

plotCodes(sce, k = "meta14")

# use custom cluster color palette
plotCodes(sce, k = "meta12",
  k_pal = c("lightgrey", "cornflowerblue", "navy"))


HelenaLC/CATALYST documentation built on Oct. 16, 2024, 12:21 a.m.