You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/bin/whatshap", line 10, in
sys.exit(main())
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/main.py", line 64, in main
module.main(args)
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 565, in main
run_stats(**vars(args))
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 544, in run_stats
detailed_stats = stats.get_detailed_stats(chr_lengths)
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 316, in get_detailed_stats
phased_snvs_fraction=phased_snvs / self.heterozygous_snvs,
ZeroDivisionError: division by zero
Information:
WhatsHap version 2.0, Python version 3.10
Installed with conda
The text was updated successfully, but these errors were encountered:
Yes, getting the ZeroDivisionError is not very useful here. I implemented a fix in PR #471. Now stats should be generated regardless if you don't have any heterozygous or phased variants in your VCF
Whatshap stats (using version 2.0) generates an ZeroDivisionError exception if there is no heterozygous variant on one of the contigs.
Command line: whatshap stats whatshap_phased.vcf > phase.stats
Results in:
Traceback (most recent call last):
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/bin/whatshap", line 10, in
sys.exit(main())
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/main.py", line 64, in main
module.main(args)
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 565, in main
run_stats(**vars(args))
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 544, in run_stats
detailed_stats = stats.get_detailed_stats(chr_lengths)
File "/home/hulsmanm/.snakemake/3846fa4274a6ef7f4cc91bf7fe3c9b94_/lib/python3.10/site-packages/whatshap/cli/stats.py", line 316, in get_detailed_stats
phased_snvs_fraction=phased_snvs / self.heterozygous_snvs,
ZeroDivisionError: division by zero
Information:
The text was updated successfully, but these errors were encountered: