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][1] 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	

  [1]: https://genome.sph.umich.edu/wiki/Vt
