clusters: Generic to extract clusters from CDS object

clustersR Documentation

Generic to extract clusters from CDS object

Description

Generic to extract clusters from CDS object

Usage

clusters(x, reduction_method = "UMAP")

Arguments

x

A cell_data_set object.

reduction_method

Reduced dimension to extract clusters for.

Value

Clusters.

Examples

  
    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")
  


cole-trapnell-lab/monocle3 documentation built on May 24, 2022, 5:25 p.m.