ksamuk / pixy

Software for painlessly estimating average nucleotide diversity within and between populations
https://pixy.readthedocs.io/
MIT License
115 stars 14 forks source link

Issue in D xy calculation #23

Closed Doniol-Valcroze closed 3 years ago

Doniol-Valcroze commented 3 years ago

Using pixy on Linux. When trying pixy --stats dxy --vcf filtered.sans.outgroup.nomissing.recode.vcf.gz --populations pixy_Med_E_NS.txt --window_size 100000 --n_cores 80 --bypass_invariant_check yes --output_prefix Med_E_Atl

The command only calculate de Dxy on 5 chromosomes (+ half oh the 6th) out of the 10 chromosomes of my VCF and displays :

The above exception was the direct cause of the following exception: UnboundLocalError: local variable 'pixy_output' referenced before assignment

Tried with and without the --output_prefix command without succes.

Any solution known for this kind of problem?

ksamuk commented 3 years ago

Hi There! Some things we can do to try to track this down:

  1. Can you try rerunning the command with the '--debug' flag and pasting the resulting python traceback here?
  2. Can you try to see what exactly is different about the region of the genome on the 6th chromosome where pixy fails? Are there long runs of missing data or the like?
  3. Alternatively, can you provide a link to a subset of your data, ideally the region of the VCF where pixy fails? You can have a look at the temp file pixy created to see the last window that was successfully calculated. You can subset your VCF with tabix like:

tabix -h your.vcf.gz chr6:600000-700000 > vcf_subset.vcf
ksamuk commented 3 years ago

Hi there, I believe this issue is now fixed in version 1.0.3.beta1, which is now on conda-forge. Can you try updating pixy ('conda update pixy' in your pixy environment), and seeing if you still get the error?

ksamuk commented 3 years ago

Hi @Doniol-Valcroze, I'm going to close this issue for now. Please let me know if it reoccurs when using the new version.