Entering edit mode
4.9 years ago
nikitavlassenko
▴
120
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:
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:
101010
) option to format code and ensure the preview looks good when you submit. I've re-formatted your post this time.Ok, got it, thanks you!
doesn't this do exactly that in vcftools? https://github.com/vcftools/vcftools/blob/master/src/perl/vcf-convert