I would like to merge two vcf files, one with a more limited list of SNPs/regions than the other. The trick being that I would like to merge these two files while only retaining SNPs within regions from the more limited vcf. How would you recommend accomplishing this merge successfully?
Thus far I have worked tried merging with bcftools, but have not found a way to limit the regions to those only included in one vcf:
bcftools merge Pop_filtered.bg.vcf.gz Pop_filtered2.bg.vcf.gz --output-type z --output bcftools_merged.vcf.gz -m both --threads 6