def type(self, variant_probe_coverages, variant=None):
if not isinstance(variant_probe_coverages, list):<EOL><INDENT>variant_probe_coverages = [variant_probe_coverages]<EOL><DEDENT>calls = []<EOL>for variant_probe_coverage in variant_probe_coverages:<EOL><INDENT>calls.append(<EOL>self._type_variant_probe_coverages(<EOL>variant_probe_coverage, variant))<EOL><DEDENT>hom_alt_calls = [c for c in calls if sum(c["<STR_LIT>"]) > <NUM_LIT:1>]<EOL>het_calls = [c for c in calls if sum(c["<STR_LIT>"]) == <NUM_LIT:1>]<EOL>if hom_alt_calls:<EOL><INDENT>hom_alt_calls.sort(key=lambda x: x["<STR_LIT:info>"]["<STR_LIT>"], reverse=True)<EOL>return hom_alt_calls[<NUM_LIT:0>]<EOL><DEDENT>elif het_calls:<EOL><INDENT>het_calls.sort(key=lambda x: x["<STR_LIT:info>"]["<STR_LIT>"], reverse=True)<EOL>return het_calls[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>calls.sort(key=lambda x: x["<STR_LIT:info>"]["<STR_LIT>"], reverse=True)<EOL>return calls[<NUM_LIT:0>]<EOL><DEDENT>
Takes a list of VariantProbeCoverages and returns a Call for the Variant.
Note, in the simplest case the list will be of length one. However, we may be typing the
Variant on multiple backgrouds leading to multiple VariantProbes for a single Variant.