sgkit.infer_sample_ploidy#
- sgkit.infer_sample_ploidy(ds, *, call_genotype='call_genotype', call_ploidy='call_ploidy', merge=True)#
Infer the ploidy of each sample across all variants 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 inds.- 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 inds, it will be computed usinginfer_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.
- ds
- Return type:
- Returns:
: A dataset containing
sgkit.variables.sample_ploidy_spec.