I have a vcf dataset which contains 4 populations. The SNPs have been filtered for 50% missing data overall. The data set is for studying population structure, the history of divergence and eventual migration between these populations.
Starting from this file, I have generated one file for each of the populations to filter out SNPs that fail HW equilibrium test and those in linkage desiquilibrium.
The resulting files have private SNPs and SNPs that are are common between all files. I want to merge these files and at the same time intersect the genotypes. Does anyone know how I can merge the 4 files wile asking for only SNPs that are common to all files to be kept?
Thank you all.