Thanks a lot! That looks the way I like I want it. I try it out the next days.
fin swimmer
Hello,
I do Variant Calling with freebayes. For comparison with another vcf from another source I need to split called mnp to snp.
For example freebayes called this:
chr2 21232803 . TG CA,CG
But I need this:
chr2 21232803 . T C
chr2 21232804 . G A
How can I do this?
fin swimmer
here is the solution to your problem with bcftools and vt and I added an extra record to check the program: (For some reason latest version of vt is crashing on decompose function. Hence bcftools was used. Otherwise, vt alone is fine for this solution)
$ bcftools norm -m -both test.vcf.gz | vt decompose_blocksub - -o output.vcf
output ( VCF headers are not shown):
#CHROM POS ID REF ALT QUAL FILTER INFO
2 21232803 . T C . . OLD_CLUMPED=2:21232803:TG/CA
2 21232803 . T C . . OLD_CLUMPED=2:21232803:TG/CG
2 21232804 . G A . . OLD_CLUMPED=2:21232803:TG/CA
20 763837 . C T . . OLD_CLUMPED=20:763837:CA/TG
20 763838 . A G . . OLD_CLUMPED=20:763837:CA/TG
input ( VCF headers are not shown):
#CHROM POS ID REF ALT QUAL FILTER INFO
2 21232803 . TG CA,CG
20 763837 . CA TG
Thanks a lot! That looks the way I like I want it. I try it out the next days.
fin swimmer
I would try vcfallelicprimitives from vcflib, especially given that vcflib is from the same author as freebayes.
In fact, the author of freebayes even has a section in the manual about this topic.
nice answer
Log in to answer this question.
Try bcftools norm with m - option.
Thanks for your answer.
But this option for bcftools just spilt the multiallelic entry in two seperate lines, resulting in
fin swimmer