IndexError: string index out of range
Hey,
I am new to GADMA. I have installed GADMA2 and trying to run it on vcf file but I get the error pasted bellow. Could you please help. My parameter file is attached too.
UserWarning: Parameters will be in genetic units (Relative parameters). Engines dadi and moments require mutation rate and sequence length for unit translation (/usr/local/lib/python3.6/site-packages/gadma/cli/settings_storage.py:1352)
Data reading
False
Traceback (most recent call last):
File "/usr/local/bin/gadma", line 11, in
Hi @anubhabkhan ,
Sorry for the late reply. The error occurs during VCF data reading. Moments sometimes failed to read files. Let's find out what is the reason and I think that I will put some warning for the future.
I have checked moments code and it looks like you have VCF file with haploid samples. Is that correct? Do you have GT field like ./. or just ., where . is for 0 or 1?
Best regards, Ekaterina
Hey,
My populations are diploid. I do have a GT field. I am attaching a sample of my vcf in .txt format here. Could you please take a look. It would be very helpful.
Thank you
Hi @anubhabkhan,
Sorry for slow reply, I have checked VCF file that you have sent and found that in some samples there is haploid information. That is why the error occurs. The GT field is the first field in the sample information and you should check that it is 0/0 or 0/1 or 1/1 thought the file. For example I see 0:4,0:2,0:2,0:4:0:99:3:0,144:0:LowGQX;SiteConflict: as a sample information somewhere in the file and GT field here is 0 which is bad for GADMA. Maybe it is because of SiteConflict as I see several similar info in the file?
Best regards, Ekaterina
Hey,
thanks for that. We have removed those loci but now we get a different error and I am unable to solve this one too. Could you please look at the attached files and advice.
Anubhab [GADMA.log](https://github.com/ctlab/GADMA/files/9140418/GADMA.log GADMA_param_no_site_conflict.par.txt )
Hi Anubhab,
Great! I see that file was successfully read. The error is caused because GADMA tries to build model using moments engine for more than 5 populations. How many population have you specified in popmap file?
Usually GADMA supports up to three populations. It could deal with 4 and 5 but it is slow and I recommend to specify simple models (e.g. without migrations).
Best, Ekaterina
Thanks so much. I tried with 6 populations and that is probably the reason it failed. I will try again with fewer populations. Thanks
Anubhab
You are welcome!