Closed brianhill11 closed 5 years ago
@brianhill11 , The existing behavior is intentional, although I suppose it is debatable whether it is appropriate. For these cases, you need to either decide to
neither of which is desirable. I ultimately went with the latter, as the information is still available to filter these after the fact. I don't think I would want to arbitrarily force one of the homozygous genotypes, as that has the potential to further mask the issue downstream and introduce erroneous calls. Other options might include
Hi Ryan,
Thanks for the reply. It sounds like this is best handled downstream, and not during conversion.
I'm still trying to wrap my head around what a 0/1 (or 1/0) call would mean in the haploid situation. How could you have both the reference and the alternate when only one should be possible?
Thanks, Brian
Hi there,
We came across this issue while trying to run bcftools norm command to merge multi-line variants into a single line. Here is the command and error:
It was trying to combine these records (sample seems to be a male):
The 0/1 genotype call doesn't make sense to me for a male sample. It seems that there are many calls on the X chromosome that are haploid, and many that are diploid. My guess is that this piece of the code is part of the issue:
Since indels are printed out as either 0/1 or 1/0 (see the convert_indel_genotype_to_vcf function) the check
if vcf_allele1_char == vcf_allele2_char:
never evaluates to true, and therefore falls through and gets printed as a diploid call.My thought was that something like this might make more sense:
Does that seem reasonable? If so, I can open a pull request.
Thanks, Brian