cytof_clusterPlot: Scatter plot of the cluster results

Description Usage Arguments Value Examples

Description

Dot plot visualization of the cluster results, with color indicating different clusters, and shape of different samples.

Usage

1
2
3
cytof_clusterPlot(data, xlab, ylab, cluster, sample, title = "cluster",
  type = 1, point_size = NULL, addLabel = TRUE, labelSize = 10,
  sampleLabel = TRUE, labelRepel = FALSE, fixCoord = TRUE, clusterColor)

Arguments

data

The data frame of cluster results, which should contains at least xlab, ylab and cluster.

xlab

The column name of the x axis in input data.

ylab

The column name of the y axis in input data.

cluster

The column name of cluster in input data.

sample

the column name of the sample in input data.

title

the title of the plot.

type

plot type, 1 indicates combined plot, 2 indicated grid facet plot seperated by samples.

point_size

the size of the dot.

addLabel

Boolean, if add cluster labels.

labelSize

the size of cluster labels.

sampleLabel

If use point shapes to represent different samples.

labelRepel

If repel the cluste labels to avoid label overlapping.

fixCoord

If fix the Cartesian coordinates.

clusterColor

Manually specify the colour of each cluster (mainly for ShinyAPP usage).

Value

the ggplot object of the scatter cluster plot.

Examples

1
2
3
4
5
6
7
8
x <- c(rnorm(100, mean = 1), rnorm(100, mean = 3), rnorm(100, mean = 9))
y <- c(rnorm(100, mean = 2), rnorm(100, mean = 8), rnorm(100, mean = 5))
c <- c(rep(1,100), rep(2,100), rep(3,100))
rnames <- paste(paste('sample_', c('A','B','C'), sep = ''), rep(1:100,each = 3), sep='_') 
data <- data.frame(dim1 = x, dim2 = y, cluster = c)
rownames(data) <- rnames
data$sample <- "data"
cytof_clusterPlot(data, xlab="dim1", ylab="dim2", cluster="cluster", sample = "sample")


Search within the cytofkit package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.