vcf2phylip icon indicating copy to clipboard operation
vcf2phylip copied to clipboard

KeyError: '2': always met this error when converting a vcf file to phylip file.

Open mxtu97 opened this issue 1 month ago • 3 comments

I have modified the variety names to be four digits, such as 4111, ensuring they are within 10 characters. However, I am still encountering this error. Could you please teach me how to resolve it?

$ python3 vcf2phylip-2.8/vcf2phylip.py -i test.vcf

Converting file 'test.vcf':

Number of samples in VCF: 290 Traceback (most recent call last): File "vcf2phylip-2.8/vcf2phylip.py", line 502, in main() File "vcf2phylip-2.8/vcf2phylip.py", line 316, in main site_tmp = get_matrix_column(record, num_samples, File "vcf2phylip-2.8/vcf2phylip.py", line 129, in get_matrix_column column += AMBIG[geno_nuc] KeyError: '2'

mxtu97 avatar May 12 '24 15:05 mxtu97