Closed ameynert closed 3 years ago
Loading VCF files downloaded with gsutil to populate a local copy of gnomad. Errors like this:
Error parsing vcf line: 22 16157427 . G A,C 1640.05 PASS AC=3,1;AF=2.17707e-04,7.25689e-05;AN=13780;...;AC_Male=2,0;AC_Female=1,1; ..... Traceback (most recent call last): File "/array11/alison/gnomad/gnomad_browser/parsing.py", line 163, in get_variants_from_sites_vcf variant['ac_male'] = int(info_field['AC_Male']) ValueError: invalid literal for int() with base 10: '2,0'
Error parsing vcf line: 22 16157427 . G A,C 1640.05 PASS AC=3,1;AF=2.17707e-04,7.25689e-05;AN=13780;...;AC_Male=2,0;AC_Female=1,1; .....
Traceback (most recent call last):
File "/array11/alison/gnomad/gnomad_browser/parsing.py", line 163, in get_variants_from_sites_vcf
variant['ac_male'] = int(info_field['AC_Male'])
ValueError: invalid literal for int() with base 10: '2,0'
Noticed in parsing.py line 147:
variant['allele_count'] = int(info_field['AC'].split(',')[i])
So I have modified lines 163-164:
variant['ac_male'] = int(info_field['AC_Male'].split(',')[i]) variant['ac_female'] = int(info_field['AC_Female'].split(',')[i])
variant['ac_male'] = int(info_field['AC_Male'].split(',')[i])
variant['ac_female'] = int(info_field['AC_Female'].split(',')[i])
This seems to have fixed the problem.
https://github.com/macarthur-lab/gnomad_browser/pull/46 contains a fix for this.
This repository is no longer being maintained. Development of the gnomAD browser has moved to broadinstitute/gnomad-browser.
Loading VCF files downloaded with gsutil to populate a local copy of gnomad. Errors like this:
Error parsing vcf line: 22 16157427 . G A,C 1640.05 PASS AC=3,1;AF=2.17707e-04,7.25689e-05;AN=13780;...;AC_Male=2,0;AC_Female=1,1; .....
Traceback (most recent call last):
File "/array11/alison/gnomad/gnomad_browser/parsing.py", line 163, in get_variants_from_sites_vcf
variant['ac_male'] = int(info_field['AC_Male'])
ValueError: invalid literal for int() with base 10: '2,0'
Noticed in parsing.py line 147:
variant['allele_count'] = int(info_field['AC'].split(',')[i])
So I have modified lines 163-164:
variant['ac_male'] = int(info_field['AC_Male'].split(',')[i])
variant['ac_female'] = int(info_field['AC_Female'].split(',')[i])
This seems to have fixed the problem.