Convert VCF4.1 to VCF4.2 using bcftools (preferrably)
0
0
Entering edit mode
4.3 years ago

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 • 3.2k views
ADD COMMENT
1
Entering edit mode

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.
ADD REPLY
0
Entering edit mode

Ok, got it, thanks you!

ADD REPLY
0
Entering edit mode
ADD REPLY

Login before adding your answer.

Traffic: 2560 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6