clusterGenes {monocle} | R Documentation

## Clusters genes by pseudotime trend.

### Description

This function takes a matrix of expression values and performs k-means clustering on the genes.

### Usage

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

### Arguments

`expr_matrix` | A matrix of expression values to cluster together. Rows are genes, columns are cells.
`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

    ## Not run:
    full_model_fits <- fitModel(HSMM[sample(nrow(fData(HSMM_filtered)), 100),],
       modelFormulaStr="~sm.ns(Pseudotime)")
    expression_curve_matrix <- responseMatrix(full_model_fits)
    clusters <- clusterGenes(expression_curve_matrix, k=4)
    plot_clusters(HSMM_filtered[ordering_genes,], clusters)

    ## End(Not run)

[Package monocle version 2.14.0 Index]