LikelihoodMethod.cluster_truth#
missionbio.demultiplex.dna.likelihood.LikelihoodMethod.cluster_truth
- static LikelihoodMethod.cluster_truth(dna: Assay, labels: ndarray, genome: Optional[str] = None) Truth #
Variants that could be different across samples
This method assumes that the DNA assay has already been assigned labels and these are stored in the DEMUX_SAMPLE row attribute.
- Parameters:
dna – The DNA assay in which the FILTERED column attribute is present. All variants passing filters will be used to generate the truth.
labels – The labels assigned to the cells. The truth will be created for each unique value in the labels excluding MIXED and AMBIGUOUS.
genome – The genome version used to fetch annotations e.g. “hg19”, “hg38”. If None, the “genome_version” metadata of the dna assay is used.
- Returns:
The dataframe with extra variants
- Raises:
ImputationError – When only one sample found or no cells labeled.
AnnotationAPIError – When the missionbio annotation API fails.
AllVariantsFilteredError – When all the variants get filtered out. This can happen if the variants are not differentiating between samples or the only variants available might be pathogenic.
< Class LikelihoodMethod