statgen / savvy

Interface to various variant calling formats.
Mozilla Public License 2.0
26 stars 5 forks source link

sav merge command? #32

Open mragsac opened 1 year ago

mragsac commented 1 year ago

I was looking to merge multiple sav files but noticed that sav merge isn't recognized as a command. However, after looking through the source code, I noticed that there is a merge.cpp file that references a sav merge command?

What is the best method to merge multiple sav-formatted files, similar to bcftools merge?

jonathonl commented 1 year ago

sav merge existed in version 1.x because the first version of the file format only allowed for bi-allelics and limited FORMAT fields. The second version of the SAV file format allows for multi-allelics and any format field, which makes merging VCFs that have a different set of variants a bit more complicated. I do intend on implementing a limited merge routine eventually, but it will be a while.

What is your use case? What FORMAT fields are you trying to merge? Is the variant set identical? How did you end up with files split into groups of samples?

Note: if each file has the same set of samples, then you should be using concat not merge.