Apply vcftools --diff, it is easy to find command/shared variants between two VCF files.
vcftools --vcf A.vcf --diff B.vcf --diff-site
However, Is there any easy to identify A specific or B specific variants?
Here is what I noticed:
Parameters as interpreted:
After filtering, kept 0 out of 0 Individuals
First Header entry should be #CHROM: #OM
Outputting Discordance By Site...
Found 1696 sites common to both files.
Found 57 sites only in main file.
Found 0 sites only in second file.
After filtering, kept 1753 out of a possible 1753 Sites
Run Time = 0.00 seconds
I want to extract these 57 sites which only belong to main file (the first file) ...
Sorry. It looks I find the solution:
awk '$3==1' out.diff.sites | wc -l