Hello,
I'm trying to compare the length of several retained introns to the overall length of introns in the entire transcriptome. I've seen several posts that use IntronsByTranscript (https://rdrr.io/bioc/GenomicFeatures/man/transcriptsBy.html) or intronicParts (https://rdrr.io/bioc/GenomicFeatures/man/exonicParts.html) and I can't figure out what the difference is between these two commands.
when I run some code as shown below, I also get two different lengths for average or median intron length, which seems confusing. Could anyone please explain what might be giving me these differences (or better yet what each of these commands is returning)?
Code:
ah <- AnnotationHub()
EnDB <- ah[["AH113629"]]
intronic_parts1 <- intronicParts(EnDB)
mean(width(intronic_parts1))
This gives a value of 1080 nucleotides
median(width(intronic_parts1))
This gives a value of 79nucleotides
Then if I try this with the other method, using intronsByTranscript, I get the following:
intronic_parts2 <- intronsByTranscript(EnDB, use.names = TRUE)
intronic_parts2.1 <- unlist(intronic_parts2)
mean(width(intronic_parts2.1))
This gives a value of 1717 nucleotides
median(width(intronic_parts2.1))
This gives a value of 104 nucleotides.
Could anyone help explain what the differences are between these two? Thanks so much!
check the default behaviour of intronicParts. Might be linked to gene level.