ValueError: could not convert string to float: 'NA'
I get the same error when parsing a vcf annotated with dbNSFP ( by snpSift )
I ran the following
reader = vcf.Reader(open("file.vcf"))
for line in reader:
print(line)
Record(CHROM=chr1, POS=15959886, REF=C, ALT=[G])
Record(CHROM=chr1, POS=15959977, REF=C, ALT=[T])
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in _parse_info(self, info_str)
389 try:
--> 390 val = self._map(int, vals)
391 # Allow specified integers to be flexibly parsed as floats.
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in _map(self, func, iterable, bad)
359 return [func(x) if x != bad else None
--> 360 for x in iterable]
361
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in <listcomp>(.0)
359 return [func(x) if x != bad else None
--> 360 for x in iterable]
361
ValueError: invalid literal for int() with base 10: 'NA'
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-6-075c10591bbb> in <module>
----> 1 for line in reader:
2 print(line)
3
4
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in __next__(self)
570 else:
571 filt = filt.split(';')
--> 572 info = self._parse_info(row[7])
573
574 try:
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in _parse_info(self, info_str)
392 # Handles cases with incorrectly specified header types.
393 except ValueError:
--> 394 val = self._map(float, vals)
395 elif entry_type == 'Float':
396 vals = entry[1].split(',')
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in _map(self, func, iterable, bad)
358 '''``map``, but make bad values None.'''
359 return [func(x) if x != bad else None
--> 360 for x in iterable]
361
362 def _parse_info(self, info_str):
/usr/local/lib/python3.6/dist-packages/vcf/parser.py in <listcomp>(.0)
358 '''``map``, but make bad values None.'''
359 return [func(x) if x != bad else None
--> 360 for x in iterable]
361
362 def _parse_info(self, info_str):
ValueError: could not convert string to float: 'NA'
By looking the corresponding line in the vcf, it seems comming from a NA value. dbNSFP_TSL=NA;
chr1 18807897 rs2992755 C G 3135.77 PASS AB=0;ABP=0;AC=2;AF=1;AN=2;AO=99;BaseQRankSum=0;CIGAR=1X;ClippingRankSum=0;DB;DP=199;DPB=100;DPRA=0;EPP=9.34924;EPPR=5.18177;ExcessHet=3.0103;FS=3.235;GTI=0;LEN=1;MEANALT=1;MLEAC=2;MLEAF=1;MQ=60;MQM=60;MQMR=60;MQRankSum=0;NS=1;NUMALT=1;ODDS=131.281;PAIRED=1;PAIREDR=1;PAO=0;PQA=0;PQR=0;PRO=0;QA=3935;QD=31.67;QR=41;RO=1;RPL=49;RPP=3.03223;RPPR=5.18177;RPR=50;RUN=1;ReadPosRankSum=0.81;SAF=53;SAP=4.08507;SAR=46;SET=Intersection;SOR=0.42;SRF=0;SRP=5.18177;SRR=1;TYPE=snp;set=variant;technology.ILLUMINA=1;ANNOVAR_DATE=2017-06-01;Func.refGene=exonic;Gene.refGene=KLHDC7A;GeneDetail.refGene=.;ExonicFunc.refGene=nonsynonymous_SNV;AAChange.refGene=KLHDC7A:NM_152375:exon1:c.422C>G:p.P141R;snp138=rs2992755;avsnp147=rs2992755;esp6500siv2_all=0.6213;1000g2015aug_all=0.646965;ExAC_nonpsych_ALL=0.6480;ExAC_nonpsych_AFR=0.5786;ExAC_nonpsych_AMR=0.8127;ExAC_nonpsych_EAS=0.9001;ExAC_nonpsych_FIN=0.6301;ExAC_nonpsych_NFE=0.6375;ExAC_nonpsych_OTH=0.6503;ExAC_nonpsych_SAS=0.5159;ExAC_nontcga_ALL=0.6490;ExAC_nontcga_AFR=0.5764;ExAC_nontcga_AMR=0.8154;ExAC_nontcga_EAS=0.9006;ExAC_nontcga_FIN=0.6345;ExAC_nontcga_NFE=0.6304;ExAC_nontcga_OTH=0.6540;ExAC_nontcga_SAS=0.5161;gnomAD_genome_ALL=0.6361;gnomAD_genome_AFR=0.5783;gnomAD_genome_AMR=0.7673;gnomAD_genome_ASJ=0.6391;gnomAD_genome_EAS=0.8776;gnomAD_genome_FIN=0.6431;gnomAD_genome_NFE=0.6339;gnomAD_genome_OTH=0.6439;Kaviar_AF=0.637333;Kaviar_AC=98533;Kaviar_AN=154602;dbscSNV_ADA_SCORE=.;dbscSNV_RF_SCORE=.;dpsi_max_tissue=.;dpsi_zscore=.;SIFT_score=0.482;SIFT_pred=T;Polyphen2_HDIV_score=0.0;Polyphen2_HDIV_pred=B;Polyphen2_HVAR_score=0.0;Polyphen2_HVAR_pred=B;LRT_score=.;LRT_pred=.;MutationTaster_score=1;MutationTaster_pred=P;MutationAssessor_score=0;MutationAssessor_pred=N;FATHMM_score=-0.68;FATHMM_pred=T;PROVEAN_score=0.32;PROVEAN_pred=N;VEST3_score=0.037;CADD_raw=-0.317;CADD_phred=0.607;DANN_score=0.758;fathmm-MKL_coding_score=0.010;fathmm-MKL_coding_pred=N;MetaSVM_score=-1.015;MetaSVM_pred=T;MetaLR_score=0.000;MetaLR_pred=T;integrated_fitCons_score=0.545;integrated_confidence_value=0;GERP++_RS=1.18;phyloP7way_vertebrate=0.028;phyloP20way_mammalian=-1.654;phastCons7way_vertebrate=0.001;phastCons20way_mammalian=0.000;SiPhy_29way_logOdds=5.254;MCAP=.;REVEL=0.098;CLINSIG=.;CLNDBN=.;CLNACC=.;CLNDSDB=.;CLNDSDBID=.;phastConsElements46way=.;phastConsElements100way=.;gerp++elem=.;FATHMM_noncoding=0.19464;FATHMM_coding=0.00976;genomicSuperDups=.;cosmic70=.;gwasCatalog=.;InterVar_automated=Benign;PVS1=0;PS1=0;PS2=0;PS3=0;PS4=0;PM1=0;PM2=0;PM3=0;PM4=0;PM5=0;PM6=0;PP1=0;PP2=0;PP3=0;PP4=0;PP5=0;BA1=1;BS1=1;BS2=0;BS3=0;BS4=0;BP1=0;BP2=0;BP3=0;BP4=1;BP5=0;BP6=0;BP7=0;ALLELE_END;ANN=G|missense_variant|MODERATE|KLHDC7A|ENSG00000179023|transcript|ENST00000400664|protein_coding|1/1|c.422C>G|p.Pro141Arg|474/5055|422/2334|141/777||;dbNSFP_1000Gp3_AC=3240;dbNSFP_1000Gp3_AF=0.646964856230032;dbNSFP_1000Gp3_AFR_AC=752;dbNSFP_1000Gp3_AFR_AF=0.5688350983358548;dbNSFP_1000Gp3_AMR_AC=496;dbNSFP_1000Gp3_AMR_AF=0.7146974063400576;dbNSFP_1000Gp3_EAS_AC=903;dbNSFP_1000Gp3_EAS_AF=0.8958333333333334;dbNSFP_1000Gp3_EUR_AC=615;dbNSFP_1000Gp3_EUR_AF=0.6113320079522863;dbNSFP_1000Gp3_SAS_AC=474;dbNSFP_1000Gp3_SAS_AF=0.48466257668711654;dbNSFP_ALSPAC_AC=2411;dbNSFP_ALSPAC_AF=0.6255838090295797;dbNSFP_APPRIS=principal1;dbNSFP_AltaiNeandertal=C/C;dbNSFP_Ancestral_allele=G;dbNSFP_CADD_phred=5.639;dbNSFP_CADD_raw=0.315784;dbNSFP_CADD_raw_rankscore=0.03306;dbNSFP_DANN_rankscore=0.11231;dbNSFP_DANN_score=0.75840627264468774;dbNSFP_DEOGEN2_pred=T;dbNSFP_DEOGEN2_rankscore=0.00857;dbNSFP_DEOGEN2_score=0.001397;dbNSFP_Denisova=C/C;dbNSFP_ESP6500_AA_AC=2422;dbNSFP_ESP6500_AA_AF=0.5956714215445155;dbNSFP_ESP6500_EA_AC=5311;dbNSFP_ESP6500_EA_AF=0.6337708830548926;dbNSFP_Eigen_PC_phred_coding=0.1698369;dbNSFP_Eigen_PC_raw_coding=-1.3649826891049;dbNSFP_Eigen_PC_raw_coding_rankscore=0.03632;dbNSFP_Eigen_pred_coding=0.1166261;dbNSFP_Eigen_raw_coding=-1.40048376730824;dbNSFP_Eigen_raw_coding_rankscore=0.02635;dbNSFP_Ensembl_geneid=ENSG00000179023;dbNSFP_Ensembl_proteinid=ENSP00000383505;dbNSFP_Ensembl_transcriptid=ENST00000400664;dbNSFP_ExAC_AC=78071;dbNSFP_ExAC_AF=6.455e-01;dbNSFP_ExAC_AFR_AC=5603;dbNSFP_ExAC_AFR_AF=5.786e-01;dbNSFP_ExAC_AMR_AC=9379;dbNSFP_ExAC_AMR_AF=8.126e-01;dbNSFP_ExAC_Adj_AC=77660;dbNSFP_ExAC_Adj_AF=6.493e-01;dbNSFP_ExAC_EAS_AC=7730;dbNSFP_ExAC_EAS_AF=8.993e-01;dbNSFP_ExAC_FIN_AC=4174;dbNSFP_ExAC_FIN_AF=6.345e-01;dbNSFP_ExAC_NFE_AC=41877;dbNSFP_ExAC_NFE_AF=6.326e-01;dbNSFP_ExAC_SAS_AC=8320;dbNSFP_ExAC_SAS_AF=5.159e-01;dbNSFP_ExAC_nonTCGA_AC=68210;dbNSFP_ExAC_nonTCGA_AF=6.450e-01;dbNSFP_ExAC_nonTCGA_AFR_AC=4828;dbNSFP_ExAC_nonTCGA_AFR_AF=5.764e-01;dbNSFP_ExAC_nonTCGA_AMR_AC=9119;dbNSFP_ExAC_nonTCGA_AMR_AF=8.154e-01;dbNSFP_ExAC_nonTCGA_Adj_AC=67940;dbNSFP_ExAC_nonTCGA_Adj_AF=6.490e-01;dbNSFP_ExAC_nonTCGA_EAS_AC=7055;dbNSFP_ExAC_nonTCGA_EAS_AF=9.006e-01;dbNSFP_ExAC_nonTCGA_FIN_AC=4174;dbNSFP_ExAC_nonTCGA_FIN_AF=6.345e-01;dbNSFP_ExAC_nonTCGA_NFE_AC=34048;dbNSFP_ExAC_nonTCGA_NFE_AF=6.304e-01;dbNSFP_ExAC_nonTCGA_SAS_AC=8270;dbNSFP_ExAC_nonTCGA_SAS_AF=5.161e-01;dbNSFP_ExAC_nonpsych_AC=58084;dbNSFP_ExAC_nonpsych_AF=6.433e-01;dbNSFP_ExAC_nonpsych_AFR_AC=5593;dbNSFP_ExAC_nonpsych_AFR_AF=5.786e-01;dbNSFP_ExAC_nonpsych_AMR_AC=9370;dbNSFP_ExAC_nonpsych_AMR_AF=8.127e-01;dbNSFP_ExAC_nonpsych_Adj_AC=57716;dbNSFP_ExAC_nonpsych_Adj_AF=6.480e-01;dbNSFP_ExAC_nonpsych_EAS_AC=5026;dbNSFP_ExAC_nonpsych_EAS_AF=9.001e-01;dbNSFP_ExAC_nonpsych_FIN_AC=2392;dbNSFP_ExAC_nonpsych_FIN_AF=6.301e-01;dbNSFP_ExAC_nonpsych_NFE_AC=26569;dbNSFP_ExAC_nonpsych_NFE_AF=6.375e-01;dbNSFP_ExAC_nonpsych_SAS_AC=8316;dbNSFP_ExAC_nonpsych_SAS_AF=5.159e-01;dbNSFP_FATHMM_converted_rankscore=0.72568;dbNSFP_FATHMM_pred=T;dbNSFP_FATHMM_score=-0.68;dbNSFP_GENCODE_basic=Y;dbNSFP_GERP___NR=5.16;dbNSFP_GERP___RS=1.18;dbNSFP_GERP___RS_rankscore=0.20058;dbNSFP_GM12878_confidence_value=0;dbNSFP_GM12878_fitCons_rankscore=0.32753;dbNSFP_GM12878_fitCons_score=0.574621;dbNSFP_GTEx_V7_gene=ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7_ENSG00000179023.7;dbNSFP_GTEx_V7_tissue=Adipose_Subcutaneous_Breast_Mammary_Tissue_Colon_Transverse_Esophagus_Mucosa_Lung_Pancreas_Pituitary_Prostate_Skin_Not_Sun_Exposed_Suprapubic_Skin_Sun_Exposed_Lower_leg_Stomach_Thyroid;dbNSFP_GenoCanyon_rankscore=0.40745;dbNSFP_GenoCanyon_score=0.999594599579045;dbNSFP_H1_hESC_confidence_value=0;dbNSFP_H1_hESC_fitCons_rankscore=0.32324;dbNSFP_H1_hESC_fitCons_score=0.601644;dbNSFP_HGVSc_ANNOVAR=c.422C>G;dbNSFP_HGVSc_VEP=c.422C>G;dbNSFP_HGVSc_snpEff=c.422C>G;dbNSFP_HGVSp_ANNOVAR=p.P141R;dbNSFP_HGVSp_VEP=p.Pro141Arg;dbNSFP_HGVSp_snpEff=p.Pro141Arg;dbNSFP_HUVEC_confidence_value=0;dbNSFP_HUVEC_fitCons_rankscore=0.26826;dbNSFP_HUVEC_fitCons_score=0.564101;dbNSFP_MPC_rankscore=0.40459;dbNSFP_MPC_score=0.392783734943;dbNSFP_MetaLR_pred=T;dbNSFP_MetaLR_rankscore=0.00011;dbNSFP_MetaLR_score=0.0000;dbNSFP_MetaSVM_pred=T;dbNSFP_MetaSVM_rankscore=0.25336;dbNSFP_MetaSVM_score=-1.0150;dbNSFP_MutationAssessor_pred=N;dbNSFP_MutationAssessor_rankscore=0.06538;dbNSFP_MutationAssessor_score=0;dbNSFP_MutationTaster_AAE=P141R;dbNSFP_MutationTaster_converted_rankscore=0.08975;dbNSFP_MutationTaster_model=simple_aae;dbNSFP_MutationTaster_pred=P;dbNSFP_MutationTaster_score=1;dbNSFP_PROVEAN_converted_rankscore=0.03955;dbNSFP_PROVEAN_pred=N;dbNSFP_PROVEAN_score=0.32;dbNSFP_Polyphen2_HDIV_pred=B;dbNSFP_Polyphen2_HDIV_rankscore=0.02946;dbNSFP_Polyphen2_HDIV_score=0.0;dbNSFP_Polyphen2_HVAR_pred=B;dbNSFP_Polyphen2_HVAR_rankscore=0.01387;dbNSFP_Polyphen2_HVAR_score=0.0;dbNSFP_PrimateAI_pred=T;dbNSFP_PrimateAI_rankscore=0.02667;dbNSFP_PrimateAI_score=0.23862016201;dbNSFP_REVEL_rankscore=0.28615;dbNSFP_REVEL_score=0.098;dbNSFP_Reliability_index=8;dbNSFP_SIFT4G_converted_rankscore=0.07173;dbNSFP_SIFT4G_pred=T;dbNSFP_SIFT4G_score=0.631;dbNSFP_SIFT_converted_rankscore=0.08188;dbNSFP_SIFT_pred=T;dbNSFP_SIFT_score=0.482;dbNSFP_SiPhy_29way_logOdds=5.2538;dbNSFP_SiPhy_29way_logOdds_rankscore=0.14853;dbNSFP_SiPhy_29way_pi=0.3998:0.1386:0.4616:0.0;dbNSFP_TSL=NA;dbNSFP_TWINSUK_AC=2296;dbNSFP_TWINSUK_AF=0.6192017259978425;dbNSFP_UK10K_AC=4707;dbNSFP_UK10K_AF=0.6224543771489024;dbNSFP_Uniprot_acc=Q5VTJ3;dbNSFP_Uniprot_entry=KLD7A_HUMAN;dbNSFP_VEP_canonical;dbNSFP_VEST4_rankscore=0.00445;dbNSFP_VEST4_score=0.024;dbNSFP_VindijiaNeandertal=C/C;dbNSFP_aaalt=R;dbNSFP_aapos=141;dbNSFP_aaref=P;dbNSFP_alt=G;dbNSFP_bStatistic=976;dbNSFP_bStatistic_rankscore=0.95254;dbNSFP_cds_strand=+;dbNSFP_chr=1;dbNSFP_codon_degeneracy=0;dbNSFP_codonpos=2;dbNSFP_fathmm_MKL_coding_group=AEFDBHCIJ;dbNSFP_fathmm_MKL_coding_pred=N;dbNSFP_fathmm_MKL_coding_rankscore=0.03727;dbNSFP_fathmm_MKL_coding_score=0.00976;dbNSFP_fathmm_XF_coding_pred=N;dbNSFP_fathmm_XF_coding_rankscore=0.00927;dbNSFP_fathmm_XF_coding_score=0.021253;dbNSFP_genename=KLHDC7A;dbNSFP_gnomAD_exomes_AC=163604;dbNSFP_gnomAD_exomes_AF=6.593320e-01;dbNSFP_gnomAD_exomes_AFR_AC=8970;dbNSFP_gnomAD_exomes_AFR_AF=5.826946e-01;dbNSFP_gnomAD_exomes_AFR_AN=15394;dbNSFP_gnomAD_exomes_AFR_nhomalt=2625;dbNSFP_gnomAD_exomes_AMR_AC=27669;dbNSFP_gnomAD_exomes_AMR_AF=8.033506e-01;dbNSFP_gnomAD_exomes_AMR_AN=34442;dbNSFP_gnomAD_exomes_AMR_nhomalt=11208;dbNSFP_gnomAD_exomes_AN=248136;dbNSFP_gnomAD_exomes_ASJ_AC=6977;dbNSFP_gnomAD_exomes_ASJ_AF=6.974210e-01;dbNSFP_gnomAD_exomes_ASJ_AN=10004;dbNSFP_gnomAD_exomes_ASJ_nhomalt=2432;dbNSFP_gnomAD_exomes_EAS_AC=16079;dbNSFP_gnomAD_exomes_EAS_AF=8.956662e-01;dbNSFP_gnomAD_exomes_EAS_AN=17952;dbNSFP_gnomAD_exomes_EAS_nhomalt=7195;dbNSFP_gnomAD_exomes_FIN_AC=13853;dbNSFP_gnomAD_exomes_FIN_AF=6.444455e-01;dbNSFP_gnomAD_exomes_FIN_AN=21496;dbNSFP_gnomAD_exomes_FIN_nhomalt=4480;dbNSFP_gnomAD_exomes_NFE_AC=70583;dbNSFP_gnomAD_exomes_NFE_AF=6.286226e-01;dbNSFP_gnomAD_exomes_NFE_AN=112282;dbNSFP_gnomAD_exomes_NFE_nhomalt=22116;dbNSFP_gnomAD_exomes_POPMAX_AC=16079;dbNSFP_gnomAD_exomes_POPMAX_AF=8.956662e-01;dbNSFP_gnomAD_exomes_POPMAX_AN=17952;dbNSFP_gnomAD_exomes_POPMAX_nhomalt=7195;dbNSFP_gnomAD_exomes_SAS_AC=15496;dbNSFP_gnomAD_exomes_SAS_AF=5.075331e-01;dbNSFP_gnomAD_exomes_SAS_AN=30532;dbNSFP_gnomAD_exomes_SAS_nhomalt=3998;dbNSFP_gnomAD_exomes_controls_AC=71489;dbNSFP_gnomAD_exomes_controls_AF=6.596387e-01;dbNSFP_gnomAD_exomes_controls_AFR_AC=4138;dbNSFP_gnomAD_exomes_controls_AFR_AF=5.811798e-01;dbNSFP_gnomAD_exomes_controls_AFR_AN=7120;dbNSFP_gnomAD_exomes_controls_AFR_nhomalt=1200;dbNSFP_gnomAD_exomes_controls_AMR_AC=13681;dbNSFP_gnomAD_exomes_controls_AMR_AF=8.037246e-01;dbNSFP_gnomAD_exomes_controls_AMR_AN=17022;dbNSFP_gnomAD_exomes_controls_AMR_nhomalt=5550;dbNSFP_gnomAD_exomes_controls_AN=108376;dbNSFP_gnomAD_exomes_controls_ASJ_AC=1594;dbNSFP_gnomAD_exomes_controls_ASJ_AF=6.906412e-01;dbNSFP_gnomAD_exomes_controls_ASJ_AN=2308;dbNSFP_gnomAD_exomes_controls_ASJ_nhomalt=558;dbNSFP_gnomAD_exomes_controls_EAS_AC=7766;dbNSFP_gnomAD_exomes_controls_EAS_AF=8.994672e-01;dbNSFP_gnomAD_exomes_controls_EAS_AN=8634;dbNSFP_gnomAD_exomes_controls_EAS_nhomalt=3493;dbNSFP_gnomAD_exomes_controls_FIN_AC=8532;dbNSFP_gnomAD_exomes_controls_FIN_AF=6.426635e-01;dbNSFP_gnomAD_exomes_controls_FIN_AN=13276;dbNSFP_gnomAD_exomes_controls_FIN_nhomalt=2759;dbNSFP_gnomAD_exomes_controls_NFE_AC=26587;dbNSFP_gnomAD_exomes_controls_NFE_AF=6.259594e-01;dbNSFP_gnomAD_exomes_controls_NFE_AN=42474;dbNSFP_gnomAD_exomes_controls_NFE_nhomalt=8282;dbNSFP_gnomAD_exomes_controls_POPMAX_AC=7766;dbNSFP_gnomAD_exomes_controls_POPMAX_AF=8.994672e-01;dbNSFP_gnomAD_exomes_controls_POPMAX_AN=8634;dbNSFP_gnomAD_exomes_controls_POPMAX_nhomalt=3493;dbNSFP_gnomAD_exomes_controls_SAS_AC=7919;dbNSFP_gnomAD_exomes_controls_SAS_AF=5.060711e-01;dbNSFP_gnomAD_exomes_controls_SAS_AN=15648;dbNSFP_gnomAD_exomes_controls_SAS_nhomalt=2069;dbNSFP_gnomAD_exomes_controls_nhomalt=24339;dbNSFP_gnomAD_exomes_nhomalt=55385;dbNSFP_gnomAD_genomes_AC=19888;dbNSFP_gnomAD_genomes_AF=6.353994e-01;dbNSFP_gnomAD_genomes_AFR_AC=5010;dbNSFP_gnomAD_genomes_AFR_AF=5.777214e-01;dbNSFP_gnomAD_genomes_AFR_AN=8672;dbNSFP_gnomAD_genomes_AFR_nhomalt=1448;dbNSFP_gnomAD_genomes_AMR_AC=646;dbNSFP_gnomAD_genomes_AMR_AF=7.617925e-01;dbNSFP_gnomAD_genomes_AMR_AN=848;dbNSFP_gnomAD_genomes_AMR_nhomalt=247;dbNSFP_gnomAD_genomes_AN=31300;dbNSFP_gnomAD_genomes_ASJ_AC=185;dbNSFP_gnomAD_genomes_ASJ_AF=6.379310e-01;dbNSFP_gnomAD_genomes_ASJ_AN=290;dbNSFP_gnomAD_genomes_ASJ_nhomalt=58;dbNSFP_gnomAD_genomes_EAS_AC=1367;dbNSFP_gnomAD_genomes_EAS_AF=8.785347e-01;dbNSFP_gnomAD_genomes_EAS_AN=1556;dbNSFP_gnomAD_genomes_EAS_nhomalt=593;dbNSFP_gnomAD_genomes_FIN_AC=2224;dbNSFP_gnomAD_genomes_FIN_AF=6.398159e-01;dbNSFP_gnomAD_genomes_FIN_AN=3476;dbNSFP_gnomAD_genomes_FIN_nhomalt=726;dbNSFP_gnomAD_genomes_NFE_AC=9753;dbNSFP_gnomAD_genomes_NFE_AF=6.344653e-01;dbNSFP_gnomAD_genomes_NFE_AN=15372;dbNSFP_gnomAD_genomes_NFE_nhomalt=3060;dbNSFP_gnomAD_genomes_POPMAX_AC=1367;dbNSFP_gnomAD_genomes_POPMAX_AF=8.785347e-01;dbNSFP_gnomAD_genomes_POPMAX_AN=1556;dbNSFP_gnomAD_genomes_POPMAX_nhomalt=593;dbNSFP_gnomAD_genomes_controls_AC=7036;dbNSFP_gnomAD_genomes_controls_AF=6.490775e-01;dbNSFP_gnomAD_genomes_controls_AFR_AC=1517;dbNSFP_gnomAD_genomes_controls_AFR_AF=5.921155e-01;dbNSFP_gnomAD_genomes_controls_AFR_AN=2562;dbNSFP_gnomAD_genomes_controls_AFR_nhomalt=449;dbNSFP_gnomAD_genomes_controls_AMR_AC=178;dbNSFP_gnomAD_genomes_controls_AMR_AF=7.235772e-01;dbNSFP_gnomAD_genomes_controls_AMR_AN=246;dbNSFP_gnomAD_genomes_controls_AMR_nhomalt=65;dbNSFP_gnomAD_genomes_controls_AN=10840;dbNSFP_gnomAD_genomes_controls_ASJ_AC=26;dbNSFP_gnomAD_genomes_controls_ASJ_AF=6.842105e-01;dbNSFP_gnomAD_genomes_controls_ASJ_AN=38;dbNSFP_gnomAD_genomes_controls_ASJ_nhomalt=9;dbNSFP_gnomAD_genomes_controls_EAS_AC=806;dbNSFP_gnomAD_genomes_controls_EAS_AF=8.799127e-01;dbNSFP_gnomAD_genomes_controls_EAS_AN=916;dbNSFP_gnomAD_genomes_controls_EAS_nhomalt=352;dbNSFP_gnomAD_genomes_controls_FIN_AC=755;dbNSFP_gnomAD_genomes_controls_FIN_AF=6.497418e-01;dbNSFP_gnomAD_genomes_controls_FIN_AN=1162;dbNSFP_gnomAD_genomes_controls_FIN_nhomalt=247;dbNSFP_gnomAD_genomes_controls_NFE_AC=3490;dbNSFP_gnomAD_genomes_controls_NFE_AF=6.354698e-01;dbNSFP_gnomAD_genomes_controls_NFE_AN=5492;dbNSFP_gnomAD_genomes_controls_NFE_nhomalt=1080;dbNSFP_gnomAD_genomes_controls_POPMAX_AC=806;dbNSFP_gnomAD_genomes_controls_POPMAX_AF=8.799127e-01;dbNSFP_gnomAD_genomes_controls_POPMAX_AN=916;dbNSFP_gnomAD_genomes_controls_POPMAX_nhomalt=352;dbNSFP_gnomAD_genomes_controls_nhomalt=2286;dbNSFP_gnomAD_genomes_nhomalt=6359;dbNSFP_hg18_chr=1;dbNSFP_hg18_pos_1_based_=18680484;dbNSFP_hg19_chr=1;dbNSFP_hg19_pos_1_based_=18807897;dbNSFP_integrated_confidence_value=0;dbNSFP_integrated_fitCons_rankscore=0.22601;dbNSFP_integrated_fitCons_score=0.545045;dbNSFP_phastCons100way_vertebrate=0.000000;dbNSFP_phastCons100way_vertebrate_rankscore=0.06391;dbNSFP_phastCons17way_primate=0.000000;dbNSFP_phastCons17way_primate_rankscore=0.00833;dbNSFP_phastCons30way_mammalian=0.000000;dbNSFP_phastCons30way_mammalian_rankscore=0.01923;dbNSFP_phyloP100way_vertebrate=0.014000;dbNSFP_phyloP100way_vertebrate_rankscore=0.13228;dbNSFP_phyloP17way_primate=-1.904000;dbNSFP_phyloP17way_primate_rankscore=0.00521;dbNSFP_phyloP30way_mammalian=-1.098000;dbNSFP_phyloP30way_mammalian_rankscore=0.02165;dbNSFP_pos_1_based_=18807897;dbNSFP_ref=C;dbNSFP_refcodon=CCC;dbNSFP_rs_dbSNP151=rs2992755 GT:AD:DP:GQ:PL 1/1:1,98:99:99:3164,265,0
It would be greate to handle this error .
Originally posted by @dridk in https://github.com/jamescasbon/PyVCF/issues/296#issuecomment-544299270
Any solution for this aside from manually manipulating the original vcf file as suggested here? https://github.com/jamescasbon/PyVCF/issues/296#issuecomment-407030801
I fixed it by myself because my pull request has not been yet accepted :
https://github.com/labsquare/cutevariant/blob/de89068619f78f5e21276394cdbb59c0d9a0b80a/cutevariant/core/reader/vcfreader.py#L10
Thanks @dridk! But this might not solve my error. I am getting something specific like this:
could not convert string to float: 'ENST00000423372.3'
interesting..Could you share the header and the first row of your vcf where this field is locatated ?
@dridk Sorry, I am not sure whether I am allowed share. But this entity appears in an additional column with exon information.