Protein.clustered_barcodes
Protein.clustered_barcodes#
- Protein.clustered_barcodes(orderby=None, splitby='label', override=False)#
Hierarchical clustering of barcodes.
If orderby is not provided, the ordered barcodes are returned according to splitby. If orderby is provided, then further hierarchical clustering is performed based on the values in it for each unqiue splitby value.
- 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.- splitbystr / np.ndarray
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 splitby is not one-dimensional
- 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.