Closed 23andme-jaredo closed 1 year ago
PS. I couldn't see any issue with actual genotypes - the re-computed allele counts are consistent with the original input BCF. So this appears mainly cosmetic.
It looks like the issue impacts only the common ones, and removing one of the count_alt
on these two lines fixed it.
https://github.com/odelaneau/shapeit5/blob/main/phase_rare/src/io/haplotype_writer.cpp#L112-L115
count_alt += a0+a1;
genotypes[2*i+0] = bcf_gt_phased(a0);
genotypes[2*i+1] = bcf_gt_phased(a1);
count_alt += a0+a1;
Thanks for reporting this. I added the fix.
thanks!
For example try:
I am seeing:
I think what is happening is that the variants in the scaffold are having their allele count doubled.
Maybe it is some interaction here: