Question: COmparing two SNV vcf files using bedtools
0
gravatar for panbar
2.8 years ago by
panbar20
panbar20 wrote:

I have two SNV vcf files A.vcf and B.vcf I would like to find the

  • common SNVs between A and B
  • SNVs unique for A
  • SNVs unique for B

I tried bedtools intersect option for finding common between A and B.

bedtools intersect -a A.vcf -b B.vcf > ABcommon.vcf

Can anyone suggest how to find - SNVs unique for A SNVs unique for B

intersect bedtools vcf • 1.2k views
ADD COMMENTlink modified 2.8 years ago by jasper191810 • written 2.8 years ago by panbar20
0
gravatar for Dan Gaston
2.8 years ago by
Dan Gaston7.1k
Canada
Dan Gaston7.1k wrote:

The example is right in the documentation, you want to use the -v flag which gives you those features in A that are not in B. For the reverse, just flip your A and B files.

ADD COMMENTlink written 2.8 years ago by Dan Gaston7.1k
0
gravatar for jasper1918
2.8 years ago by
jasper191810
United States
jasper191810 wrote:

Please be aware that bedtools does not verify that the allele is common between both samples when doing intersection. It is looking only at positions. This will inflate your concordance. Rather, I would use bcftools isec

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by jasper191810
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: 1204 users visited in the last hour