This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Intersect Gene Annotation With Specific Position Or Genomic Interval

Hi,

I've several genomic interval and I want to check if they are overlapping with known gene. I've a gtf file with the coordinates of gene exons. My idea was to use intersectBed from bedtools but I've a little problem with small genomic interval that are are overlapping intron coordinates and not exons ( it do ot report me the gene where this interval is). Is it possible to specifiy to intersectBed to take into account introns ? or is there an another tool ?

Thanks

N.

intersect bedtools

1 answer

Instead of intersecting with some monolithic gene track containing everything, you're going to want to intersect with a track containing only exons.

Since I don't know exactly what your data looks like, I can't tell you exactly how to accomplish this. If you don't have coordinates for specific exons in your data, you can download such tracks from UCSC genome browser or Ensembl easily enough.

I'm not immediately familiar with that format, but it probably contains lines labelled "intron", "cds_exon", "rna", etc. Grep out the lines you want, do your intersection, then collapse by gene name if necessary

Log in to answer this question.