Dna.mutated_cells#
missionbio.mosaic.dna.Dna.mutated_cells
- Dna.mutated_cells(labels: Sequence, variants: Optional[Sequence] = None, kind: str = 'count', layer: str = 'NGT_FILTERED') Series #
The count/fraction of cells that are mutated for each clone.
- Parameters:
- labelsSequence
List of labels for which the mutated cells are to be calculated It must be the same length as the number of cells in the assay.
- variantsSequence
List of variants for which the mutated cells are to be calculated for (e.g. [‘chr1:12341234:T/A’]). By default it will get mutated cells for all variants from the assay.
- kindstr
The kind of output to return. Can be one of ‘count’ or ‘fraction’. If ‘count’, the number of mutated cells is returned. If ‘fraction’, the fraction of mutated cells is returned.
- layerstr
The layer to use for calculating the mutated cells. By default, it will use the NGT_FILTERED layer.
- Returns:
- mutatedpandas.DataFrame
A dataframe containing the count/fraction of cells that are mutated for each variant.
< Class Dna