clusters | R Documentation |
Generic to extract clusters from CDS object
clusters(x, reduction_method = "UMAP")
x |
A cell_data_set object. |
reduction_method |
Reduced dimension to extract clusters for. |
Clusters.
cell_metadata <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_coldata.rds',
package='monocle3'))
gene_metadata <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_rowdata.rds',
package='monocle3'))
expression_matrix <- readRDS(system.file('extdata',
'worm_embryo/worm_embryo_expression_matrix.rds',
package='monocle3'))
cds <- new_cell_data_set(expression_data=expression_matrix,
cell_metadata=cell_metadata,
gene_metadata=gene_metadata)
cds <- preprocess_cds(cds)
cds <- reduce_dimension(cds)
cds <- cluster_cells(cds)
clusters_factors <- clusters(cds, "UMAP")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.