intersectBed of a a-VCF against a b-GFF

515 views
Skip to first unread message

remi.to...@gmail.com

unread,
Jul 10, 2015, 10:29:19 AM7/10/15
to bedtools...@googlegroups.com
Dear list,

I would like to extract SNPs from a VCF file which are localized in CDS. The CDS positions are specified in an external GFF3 file. I considered using intersectBed to perform this step. However, using the command below, the same SNPs can be repeated multiple times. Yet, when I use the -u option, there is no duplicates in the output VCF anymore... but I do not clearly see why intersectBed behaves this way without the -u option since there is no strict "interval" in my VCF, only variant monobase positions.

bedtools intersect \
    -a input.vcf \
    -b cc.gff3 \
    -header > CDS.vcf

Could you explain as to why intersectBed would output redundant SNPs when using the basic intersection method described in the command above?

Thank you very much for your lights,

Sincerely,

Rémi


Aaron Quinlan

unread,
Jul 12, 2015, 7:25:27 PM7/12/15
to bedtools...@googlegroups.com
Hi Remi,

Sorry for the delay.  I suspect this reflects the fact that many SNPs in your VCF intersect multiple transcripts for the same gene(s) in your GTF file. Are you sure that this is not the case?

Best,
Aaron
--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rémi Tournebize

unread,
Jul 15, 2015, 7:47:23 AM7/15/15
to bedtools...@googlegroups.com
Hello Aaron,

Thank you very much for your answer. You are right indeed, I just forgot that there were multiple overlaps in the GFF since it gives intervals for genes/exons/polypeptides, etc. So there is some hierarchical embedding causing SNPs to be called multiple times if I don't use the -u option.

Sorry for this naive question,

Best,

Rémi

Aaron Quinlan

unread,
Jul 15, 2015, 7:47:53 AM7/15/15
to bedtools...@googlegroups.com
Not at all, I am glad it makes sense.
Best,
Aaron

--
Reply all
Reply to author
Forward
0 new messages