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

TypeError: zip argument #3 #25

Closed ClaudimarceO closed 3 years ago

ClaudimarceO commented 3 years ago

Hello, I am quite new to running this kind of program. So, I do not know whether my problem is a bug issue or whether it is because I am doing something wrong. I hope you can help me.

I am running pixy for different ORFs using the following command:

pixy --stats pi fst dxy --n_cores 24 --vcf Capture_ORF_45_filtered.vcf.gz --populations sampleIDs_popfile_45.txt --bed_file genomic_windows.bed

The program starts running, it can do some calculations and produce a .tmp file but at some point, it crashes and I got the following error:

Traceback (most recent call last): TypeError: zip argument #3 must support iteration """

The above exception was the direct cause of the following exception:

TypeError: zip argument #3 must support iteration

OS information Linux

Do you know what could be the reason?

Thank you very much

ksamuk commented 3 years ago

Hi there! Its not immediately clear what is causing that error, so, in order to track this down, I'll need a subset of your VCF that contains the rows causing the issue. Can you do the following?

  1. Look at the tmp file and see what the coordinates of the last window are (the 4-6 columns of the last line in the file). You are looking for the chromosome, and the start and end coordinates of that window.

  2. Use tabix to create subset of your VCF that contains that window, and some buffer before and after. About 1 windows worth of buffer on either side should do (so +/- the window size on each end). For example, if the last window was "X 20000 40000", and the window size was 20000 (you'll need to get this from your BED file), then, in the folder that contains your VCF, you would invoke:

    tabix -h your.vcf.gz X:1-60000 > vcf_subset.vcf
  3. Send me that file, along with your populations and bed file. You can email these to me at ksamuk@gmail.com, or use a dropbox link.

ksamuk commented 3 years ago

We resolved this issue via email, and the bug that @ClaudimarceO identified was fixed in version 1.0.2.beta1. Thanks again for your help!