sgkit.infer_variant_ploidy#

sgkit.infer_variant_ploidy(ds, *, call_genotype='call_genotype', call_ploidy='call_ploidy', merge=True)#

Infer the ploidy at each variant across all samples based on the number of fill (non-allele) values in call genotypes.

Parameters:
ds Dataset

Dataset containing genotype calls.

call_genotype Hashable (default: 'call_genotype')

Input variable name holding call_genotype as defined by sgkit.variables.call_genotype_spec. Must be present in ds.

call_ploidy Hashable (default: 'call_ploidy')

Input variable name holding call_ploidy as defined by sgkit.variables.call_ploidy_spec. If the variable is not present in ds, it will be computed using infer_call_ploidy().

merge bool (default: True)

If True (the default), merge the input dataset and the computed output variables into a single dataset, otherwise return only the computed output variables. See Dataset merge behavior for more details.

Return type:

Dataset

Returns:

: A dataset containing sgkit.variables.variant_ploidy_spec.