This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error: ##fileformat=VCFv4.2 does not exist

Hello everybody,

I am using Pharmcat to preprocess my vcf file, and for this I am running this command

python3 pharmcat_vcf_preprocessor.py -vcf NA12801.VCF

But I am getting this error

Error: ##fileformat=VCFv4.2 does not exist

I have generated my vcf file by using gatk Haplotypecaller

./gatk --java-options "-Xmx4g" HaplotypeCaller -R GCF_000001405.40_GRCh38.p14_genomic.fna -I sample.bam -O sample.VCF

Kindly help me out in resolving this issue.

Thanks in advance

pharmcat vcf

4 answers

Have a look in your VCF file if that line exists.

eg

grep fileformat *.VCF

It might be VCF 4.1 or 4.3 etc.

Yes this line exist in my vcf file

##fileformat=VCFv4.2

Look at the pharmcat_vcf_preprocessor.py program, post the code near the error Error: ##fileformat=VCFv4.2 does not existis.

Error: ##fileformat=VCFv4.2 does not exist

Looks like a file does not exist error and checking source it looks like its trying to read a txt file with paths to VCF files. So instead of giving the VCF directly give a txt file with a path to VCF file.

I would also recommend checking out a different star allele-calling tool named PyPGx (see docs). It supports VCF files produced from HaplotypeCaller. Disclaimer: I'm the developer of PyPGx.

Log in to answer this question.