timeclustplot: Plot clustering results for time course data.

Description Usage Arguments Value Author(s) Examples

View source: R/plots.R

Description

This function plots the clusters generated from timeclust. For fuzzy cmeans clustering, data points are color-coded according to membership values, the color palettes can be customized.

Usage

1
2
3
4
5
timeclustplot(object = NULL, categories = "timepoint",
  value = "expression", cols = NULL, cl.color = "gray50",
  membership.color = rainbow(30, s = 3/4, v = 1, start = 1/6),
  title.size = 18, axis.line.size = 0.6, axis.title.size = 18,
  axis.text.size = 16, legend.title.size = 14, legend.text.size = 14)

Arguments

object

a TCA object or a clust object

categories

character string giving the x-axis label

value

character string giving the y-axis label

cols

integer value specifying number of columns in the final layout.

cl.color

character string specifying a color for hard clustering.

membership.color

color palettes, a character vector of n colors

title.size

numeric value specifying the font size of title of each plot in the layout

axis.line.size

numeric value specifying the size of both axis lines

axis.title.size

numeric value specifying the font size of titles of both axis

axis.text.size

numeric value specifying the font size of labels of both axis

legend.title.size

numeric value specifying the font size of legend title

legend.text.size

numeric value specifying the font size of legend text

Value

Plot all clusters in one plot and return a list of ggplot objects, each object is for one cluster. The ggplot object can be drawed by calling print.ggplot

Author(s)

Mengjun Wu

Examples

1
2
3
4
5
6
7
x <- matrix(sample(500, 1600, replace = TRUE), nrow = 200,
            dimnames = list(paste0('peak', 1:200), 1:8))
clust_res <- timeclust(x, algo = 'cm', k = 4, standardize = TRUE)
p <- timeclustplot(clust_res, cols =2)
# to plot a individual cluster
print (p[[2]]) # plot cluster 2
print (p[[3]]) # plot cluster 3

TCseq documentation built on Nov. 8, 2020, 5:46 p.m.