Protein.clustered_ids#
missionbio.mosaic.protein.Protein.clustered_ids
- Protein.clustered_ids(orderby: Union[str, ndarray, DataFrame], features: Optional[Sequence] = None, override: bool = False)#
Hierarchical clustering of ids.
- Parameters:
- orderbystr / np.ndarray / pd.DataFrame
An attribute with at least one dimension equal to the number of ids in the assay. Uses
get_attribute()
to retrieve the value constrained by col- featureslist-like
The subset of ids to use and return, in case orderby is found in the layers, otherwise it is the name of the ids to be given to the orderby attribute.
- overridebool
Continue clustering even if the number of id is greater than 1,000.
- Returns:
- numpy.ndarray
ordered ids
- Raises:
- ValueError
When the labels are not set.
- Exception
When 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.
< Class Protein