Entering edit mode
5.6 years ago
isabel.hostettler.14
▴
20
Hi there,
I'm not sure about the following: if you use bcftools merge
to merge vcf.gz files does it merge the overlapping variants only or does it also merge variants that are present in one dataset but not in the other?
Thanks!
Thank you very much for the answer. Is there an option to only merge the overlapping variants from the beginning?
Hello again,
please use the
ADD REPLY
button below the post you like to reply to.I'm not aware of such in option. If you can make sure, that in your vcf file you like to merge, are no genotypes
./.
, you could filter out those sites after merging.fin swimmer
Okay thanks. But if I do it that way it will still be present in one part of the dataset (for the ones it was present before merging) or will it the variant be remove from the whole dataset?
Isabel
Your initial datasets will be keepd untouched.
If you are interested to find out which variants are in all your vcf files, without merging them than the term you are looking for is
intersect
.Have a look at the man page of
bcftools isec
for some examples. So e.g. this might be a useful command:fin swimmer