This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Why are the sum of all exons so much longer than CDS?

Is this because of non-coding RNA? I thought these would have been at least comparable.

library(GenomicFeatures)
txdb <- makeTxDbFromEnsembl("Homo Sapiens",server="useastdb.ensembl.org")
gr<-cds(txdb)
sum(width(reduce(gr)))
[1] 41901692

gr<-exons(txdb)
sum(width(reduce(gr)))
[1] 153094341
exons cds

yes, there are a bunch of non-coding RNA families (rRNA, tRNA, miRNA, snRNA, lncRNA, ...) which can be in your exon list but not in your CDS

2 answers

3' and 5' UTR as well as non-coding species.

how about that!

sum(width(unlist(fiveUTRsByTranscript(txdb))))
[1] 21299710
sum(width(unlist(threeUTRsByTranscript(txdb))))
[1] 86927764

Yeah, the mean 3' UTR is around 40% of the length of a transcript and a not insubstantial number of UTRs are more than 75% of the transcript.

Also, ensembl will count an exon as unique if it overlaps with other exons, so a lot of sequence is being counted over and over again because it belongs to multiple slightly different exons.

Log in to answer this question.