Question: How to apply vcftools --diff to identify vcf-specific variants/records
0
gravatar for Shicheng Guo
5 days ago by
Shicheng Guo7.5k
Shicheng Guo7.5k wrote:

HI All,

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:
        --vcf gnomad.exomes.r2.1.sites.chr21.rec.ExomeStop.vcf
        --diff gnomad.exomes.r2.1.sites.chr21.rec.ExomeStop.vcf.vat
        --diff-site-discordance

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)

Thanks.

Sorry. It looks I find the solution:

 awk '$3==1' out.diff.sites | wc -l
vcftools --diff-site --diff • 58 views
ADD COMMENTlink modified 5 days ago • written 5 days ago by Shicheng Guo7.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 910 users visited in the last hour