I have three samples, generated Illumina PE reads for each of them, and then mapped the reads against the reference to produce three alignments. I called SNPs and now I would like to determine the subset of SNPs that are present in sample A and B but not in C. I ran
bedtools as follows:
bedtools intersect -a A.vcf -b B.vcf > A_and_B.vcf bedtools subtract -a A_and_B.vcf -b C.vcf
Unfortunately, I get the following error message:
ERROR: file A_and_B.vcf has non positional records, which are only valid for the groupBy tool.
I checked that all my files are tab-delimited and I also ran
sort -k1 on the
A_and_B.vcf file but that didn't affect the output.
My questions are:
- How do I string these two bedtools commands together?
- Is there a better way to do this?
Thanks for any suggestions!