Learn R Programming

monocle (version 1.6.2)

clusterGenes: Plots the minimum spanning tree on cells.

Description

Plots the minimum spanning tree on cells.

Usage

clusterGenes(expr_matrix, k, method = function(x) {     as.dist((1 -
  cor(t(x)))/2) }, ...)

Arguments

expr_matrix
a matrix of expression values to cluster together
k
how many clusters to create
method
the distance function to use during clustering
...
extra parameters to pass to pam() during clustering

Value

  • a pam cluster object

Examples

Run this code
full_model_fits <- fitModel(HSMM[sample(nrow(fData(HSMM_filtered)), 100),],  modelFormulaStr="expression~sm.ns(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