sgkit.convert_probability_to_call#

sgkit.convert_probability_to_call(ds, call_genotype_probability='call_genotype_probability', threshold=0.9, merge=True)#

Convert genotype probabilities to hard calls.

Parameters:
ds Dataset

Dataset containing genotype probabilities, such as from sgkit.io.bgen.read_bgen().

call_genotype_probability Hashable (default: 'call_genotype_probability')

Genotype probability variable to be converted as defined by sgkit.variables.call_genotype_probability_spec.

threshold float (default: 0.9)

Probability threshold in [0, 1] that must be met or exceeded by at least one genotype probability in order for any calls to be made – all values will be -1 (missing) otherwise. Setting this value to less than or equal to 0 disables any effect it has. Default value is 0.9.

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 the following variables: