Learn R Programming

monocle (version 1.6.2)

plot_clusters: Plots the minimum spanning tree on cells.

Description

Plots the minimum spanning tree on cells.

Usage

plot_clusters(cds, clustering, drawSummary = TRUE, sumFun = mean_cl_boot,
  ncol = NULL, nrow = NULL, row_samples = NULL, callout_ids = NULL)

Arguments

cds
CellDataSet for the experiment
clustering
a clustering object produced by clusterCells
drawSummary
whether to draw the summary line for each cluster
sumFun
whether the function used to generate the summary for each cluster
ncol
number of columns used to layout the faceted cluster panels
nrow
number of columns used to layout the faceted cluster panels
row_samples
how many genes to randomly select from the data
callout_ids
a vector of gene names or gene ids to manually render as part of the plot

Value

  • a ggplot2 plot object

Examples

Run this code
full_model_fits <- fitModel(HSMM_filtered[sample(nrow(fData(HSMM_filtered)), 100),],  modelFormulaStr="expression~VGAM::bs(Pseudotime)")
expression_curve_matrix <- responseMatrix(full_model_fits)
clusters <- clusterGenes(expression_curve_matrix, k=4)
plot_clusters(HSMM_filtered[ordering_genes,], clusters)

Run the code above in your browser using DataLab