Dna.set_labels#
missionbio.mosaic.dna.Dna.set_labels
- Dna.set_labels(clusters: Union[Sequence, dict, _Assay], default_label=None)#
Set the labels for the barcodes.
Modifies the id row attribute of the assay.
- Parameters:
- clusterslist, dictionary, or Assay
The clusters corresponding to the barcodes.
List: The labels are set in the same order as the order of barcodes.
Dict: The dictionary should be a mapping of cluster names to the barcodes in that cluster.
Assay: The labels from the assay are used. The palette of the assay is also copied.
- default_labelstr
In case not all barcodes are labeled, then this is the label of the remaining barcodes. If None, then the labels for missing barcodes are not updated.
< Class Dna