plotCluster: Visualization of cluster data of FSPY

Description Usage Arguments Value Examples

View source: R/plot2D.R

Description

Visualization of cluster data of FSPY

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plotCluster(
  object,
  item.use = c("PC_1", "PC_2"),
  color.by = "cluster",
  size.by = "cell.number.percent",
  order.by = NULL,
  size = 1,
  alpha = 1,
  category = "categorical",
  show.cluser.id = FALSE,
  show.cluser.id.size = 4,
  main = "2D plot of cluster in FSPY",
  plot.theme = theme_bw()
)

Arguments

object

An FSPY object

item.use

character. Items use to 2D plot, axes x and y must be numeric.

color.by

character. Dot or mesh color by which character. It can be one of the column of plot.meta, or it can be just "density" (the default value).

size.by

character. Size of the dot

order.by

vector. Order of color theme.

size

numeric. Size of the dot

alpha

numberic. Transparency (0-1) of the dot, default is 1.

category

character. numeric or categorical

show.cluser.id

logical. Whether to show cluster id in the plot.

show.cluser.id.size

numeric. Size of the cluster id.

main

character. Title of the plot.

plot.theme

themes from ggplot2

Value

ggplot2 figure

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
if (FALSE) {
plotCluster(fspy)

plotCluster(fspy, item.use = c("PC_1", "PC_2"))
plotCluster(fspy, item.use = c("PC_2", "PC_3"))
plotCluster(fspy, item.use = c("PC_2", "PC_3"), color.by = "CD43", category = "numeric")
plotCluster(fspy, item.use = c("PC_2", "PC_3"), color.by = "CD43", category = "numeric") +
    scale_colour_gradientn(colors = c("blue", "white", "red"))

plotCluster(fspy, item.use = c("tSNE_1", "tSNE_2"))
plotCluster(fspy, item.use = c("tSNE_1", "tSNE_2"), show.cluser.id = T)

plotCluster(fspy, item.use = c("DC_1", "DC_2"))

plotCluster(fspy, item.use = c("UMAP_1", "UMAP_2"))
}

JhuangLab/flowSpy documentation built on July 15, 2020, 8:31 a.m.