+1. And you can see this in the browser if you set the gene track to visibility full so it shows the various transcripts.
I've downloaded BED files from UCSC Table Browser for the "Exons" track and for the "Introns" track. But I just discovered that these BED files have some overlaps ?!

Could you please explain me where these overlap come from?
1 answer
The reason is that both introns and exons will be defined in UCSC relative to transcripts and not the overall gene. If you grab the introns and exons for a single transcript you should not see these types of overlaps. But if you take all of the exons for all of the transcripts of a gene you will often see them.
If you truly want your exon and intron BEDs to occupy mutually exclusive space in the genome, you will need to do some extra work. For example you could:
- Start with the exons BED file from UCSC.
- Use BEDTools to merge overlapping exons in this file. The resulting merged exons for each gene make a sort of 'fake' transcript. Some people refer to these as the 'exon content' of a gene, the 'squashed' transcriptome, etc. Think about how you want to deal with transcripts that overlap on opposite strands at this point.
- Now you can extract intron coordinates for each gene using the merged/squashed exons. You should also be able to do this with BEDTools where you have one BED file containing your squashed exons and another containing the outer boundaries of each gene.
Excellent. Thank you so much for the explanation!
Log in to answer this question.
The visual example of what you are referring to is really great for these kinds of questions.