Sample.clustered_barcodes

Sample.clustered_barcodes#

missionbio.mosaic.sample.Sample.clustered_barcodes

Sample.clustered_barcodes(names: Optional[Sequence[str]] = None, attributes: Optional[Sequence[Union[str, ndarray]]] = None, subcluster: bool = True, return_index: bool = False) ndarray#

Similar to _Assay.clustered_barcodes() but for multiple assays

Only common barcodes are clustered and returned. It assumes that the order of the barcodes in all assays is the same, even if some barcodes might be absent in some assays.

Parameters:
namesTuple[str]

The assay names which are to be clustered

attributeslist

The attributes to cluster the assays by. If None, the barcodes are clustered by their labels.

subclusterbool

If True, clusters the barcodes within each label. This is only applicable for the last assay in the list. All other assays are sorted by their labels. So, if Dna labels are assigned but Protein labels are not, then passing subcluster=True will be useful with names=(“dna”, “protein”) but not with names=(“protein”, “dna”).

return_indexbool

If True, returns the indices of the barcodes instead of the barcodes themselves


< Class Sample