Hi, after I import the bgz vcf file, the above command gives rise to the following error:
FatalError: HailException: variant 10:32557367:CTTTTTTT:C,CT,CTT,CTTT,CTTTT: INFO field InbreedingCoeff:
unable to convert -nan (of class java.lang.String) to Double:
caught java.lang.NumberFormatException: For input string: “-nan”
-nan
isn’t a valid string representation for a float, so that is causing problems. Where did this VCF come from?
vep annotated haplotype joint calling
Interesting – Python’s float('-nan')
works but Java doesn’t support this. I’ll add a patch to support -nan from VCFs, but the patch is going into the 0.2 version, not 0.1. Can you switch?
not at the moment, besides the patch, other way I can rescue? Thanks.
you could probably change the VCF header line for that INFO field to type String.
You mean import_vcf step? how?
copy the header of the VCF, edit it manually, then do import_vcf(['fake_header_file.vcf', 'real.vcf'])
make sure the modified header is first in the import_vcf file list.
we do really recommend switching to 0.2 as soon as possible, though!
my file is compressed version vcf.bfz…
That’s fine. Same steps apply!
so say my original file is vcf.bgz, then
- I manually edit the headers# by changing ‘INFO’ type to ‘String’, save it as header.txt
- import_vcf([‘header.txt’,‘vcf.bgz’])?
change the type of the info field ‘InbreedingCoeff’ to ‘String’, yes. You’ll need to save the result as .vcf for Hail to accept it though.
All those tricks… and it works.