This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert VCF4.1 to VCF4.2 using bcftools (preferrably)

I need to convert VCF4.1 to VCF4.2, and I am using bcftools. There is the method called convert but I am not sure how to use it to specify the output version:

http://samtools.github.io/bcftools/bcftools.html#convert

If it is not possible with bcftools, then vcftools also have a method vcf-convert:

http://vcftools.sourceforge.net/perl_module.html#vcf-convert

But the command given is unclear:

zcat file.vcf.gz | vcf-convert -r reference.fa > out.vcf

How to specify the output version here?

I need to do such a conversion because the pipeline that I am trying to run is accepting only VCF4.2 but I need it to run VCF4.1 also:

bcftools vcf

Neither bcftools nor vcftools speaks of "conversion" between versions 4.1 and 4.2.

To use hail, you'll need to fix specific differences between the 4.1 and 4.2 versions, which are not addressed by most tools. See this post for more information: What is the difference between VCF specifications 4.1 and 4.2?


Also, please note:

  1. Your post was a "Question" type post, not a "Tool" type post. You have a question, not a tool.
  2. Please format your post better. Use the code (101010) option to format code and ensure the preview looks good when you submit. I've re-formatted your post this time.

0 answers

No answers yet.

Log in to answer this question.