_Assay.clustered_barcodes

_Assay.clustered_barcodes(orderby=None, splitby='label', override=False)

Hierarchical clustering of barcodes.

If the layer is not provided, the barcodes are returned according to the labels.

If a layer is provided, then further hierarchical clustering is performed based on the values in this layer for each label.

Parameters
orderbystr / np.ndarray

An attribute with at least one dimension equal to the number of barcodes. Uses _Assay.get_attribute() to retrieve the values constrained by row.

splitbybool

Whether to order the barcodes based on the given labels or not. Only applicable when labels orderby is None. Uses _Assay.get_attribute() to retrieve the values constrained by row. The shape must be equal to (#cells)

overridebool

Continue clustering even if the number of id is greater than 1,000.

Returns
numpy.ndarray

Ordered barcodes

Raises
ValueError

When the shape of orderby is not appropriate

Exception

When the number of id in the assay is greater than 1,000. This can take a long time to process, hence denied.

Warning

If the number of id is greater than 1,000 and override is passed.