This is a test version of Biostars. For the public version, visit https://www.biostars.org.
combining overlapping vcf's into one

Hi all, I have a question as to how to combine two separate VCFs into one large one. For example, say I have a dbSNP VCF and a Cosmic database VCF. I now want to merge or combine them into one file into a way that will produce a single file that contains the contents of both files. If there is an overlap between the two, I would want to keep them as a single entry, just that it would annotate the ID field with both entries (the dbSNP rs# and the Cosmic ID). I can't seem to find a good way to do this using GATK, VCF tools, or some other approach.

Thanks for any suggestions.

vcf mergining vcfs

1 answer

bgzip and tabix index the files and use bcftools merge.

I think it should actually be the bcftools concat and not the "merge". The latter basically merges the samples while the concat merges/concatenates the sites.

Log in to answer this question.