Cnv.cluster¶
-
Cnv.
cluster
(attribute, method='dbscan', **kwargs)¶ Identify clusters of cells.
Modifies the label row attribute of the assay.
- Parameters
- attributestr / np.array
The attribute to use as coordinates for clustering. Uses
_Assay.get_attribute()
to retrieve the values constrained by row.- methodstr
dbscan, hdbscan, kmeans, or graph-community (Louvain on a shared nearest neighbor graph).
- kwargsdictionary
Passed to the appropriate clustering method.
- Available parameters for the methods are:
- dbscaneps (float)
A measure of how close the points are.
- hdbscanmin_cluster_size (int)
The number of cells in a cluster.
- kmeansn_clusters (int)
The number of clusters to be generated.
- graph-communityk (int)
The number of nearest neighbors to consider in the shared nearest neighbor graph generation.
- Raises
- ValueError
When the row attribute is not available in the assay.
- Exception
When an unsupported clustering method is provided.