COmparing two SNV vcf files using bedtools
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
• 4,133 views
•
link
2 answers
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.
• 0 views
•
link
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
• 0 views
•
link
Log in to answer this question.