Hey all,
I am working on the genomics data and need some help with the cordinates of introns. I have a data frame of few exons(having start and end position) and i wanted to get the coordinates(start and end position) of the previous and next intron to the paticular exons.
(the red are the exons that i have and there cordinates(marked in green), now trying to get the cordinates of the previous intron and next intron of these exons)
So, what i am trying is to get the previous and next intron cordinates of the introns. I have the gtf file (GENCODE v25.p7) and by using genomics features package have also extracted all exons and all introns from the gtf file, but unable to get the required introns.
Just a pointer: biomaRt might be a good place to begin. You can set up an EnsEMBL mart and get exon coordinates for the gene of your query exon. Once you get that data, you can pick your exon of interest, its two surrounding exons and use their end points to get neighboring introns.
If you wish to group your exons, you can do that by finding the first exon's 5' neighbor intron and the last exon's 3' neighbor intron. It'll be some math, but nothing too convoluted.