Entering edit mode
10 months ago
eebloom
▴
90
I am trying to run whatshap phase
on a female human sample, so diploid x chromosome:
Command:
whatshap phase \
-o ${SAMPLE}_phased.vcf \
--reference GCA_000001405.15_GRCh38_no_alt_analysis_set.fna \
${SAMPLE}.vcf.gz \
${SAMPLE}_aligned.bam \
--ignore-read-groups \
--use-supplementary
And I am getting this error:
# Working on contig chrX in individual SHGSOC058N
Found 74358 usable heterozygous variants (0 skipped due to missing genotypes)
Number of supplementary alignments: 5861
Number of non-singleton groups: 833
Skipped 5000 groups
Found 127390 reads covering 74060 variants
Kept 90496 reads that cover at least two variants each
Selected 63350 most phase-informative reads covering 73289 variants
Best-case phasing would result in 1514 non-singleton phased blocks (0 singletons).
Phasing 1 sample by solving the MEC problem ...
Largest block contains 2009 variants (2.7% of accessible variants) between position 126713773 and 130491811
Traceback (most recent call last):
File "/usr/local/bin/whatshap", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/whatshap/__main__.py", line 64, in main
module.main(args)
File "/usr/local/lib/python3.9/site-packages/whatshap/cli/phase.py", line 1209, in main
run_whatshap(**vars(args))
File "/usr/local/lib/python3.9/site-packages/whatshap/cli/phase.py", line 458, in run_whatshap
for variant_table in timers.iterate("parse_vcf", vcf_reader):
File "/usr/local/lib/python3.9/site-packages/whatshap/timer.py", line 58, in iterate
for item in iterator:
File "/usr/local/lib/python3.9/site-packages/whatshap/vcf.py", line 582, in __iter__
yield self._process_single_chromosome(chromosome, records)
File "/usr/local/lib/python3.9/site-packages/whatshap/vcf.py", line 742, in _process_single_chromosome
raise PloidyError(
whatshap.vcf.PloidyError: Inconsistent ploidy (2 and 1)
I'm confused as the sample should be diploid on the X chromosome and I don't know why the error is coming up. I had a look on the github page but similar issues did not help. How can I fix it or investigate what the issue is?