Description Usage Arguments Value Methods and Functions Author(s) See Also Examples
These methods allow to calculate the lengths of features (transcripts, genes,
CDS, 3' or 5' UTRs) defined in an EnsDb
object or database.
1 2 |
(In alphabetic order)
filter |
A filter describing which results to retrieve from the database. Can
be a single object extending
|
of |
for |
x |
For |
For lengthOf
: see method description above.
Retrieve the length of genes or transcripts from the database. The length is the sum of the lengths of all exons of a transcript or a gene. In the latter case the exons are first reduced so that the length corresponds to the part of the genomic sequence covered by the exons.
Note: in addition to this method, also the
transcriptLengths
function in the
GenomicFeatures
package can be used.
Johannes Rainer
exonsBy
transcripts
transcriptLengths
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | library(EnsDb.Hsapiens.v75)
edb <- EnsDb.Hsapiens.v75
##### lengthOf
##
## length of a specific gene.
lengthOf(edb, filter = GeneIdFilter("ENSG00000000003"))
## length of a transcript
lengthOf(edb, of = "tx", filter = TxIdFilter("ENST00000494424"))
## Average length of all protein coding genes encoded on chromosomes X
mean(lengthOf(edb, of = "gene",
filter = ~ gene_biotype == "protein_coding" &
seq_name == "X"))
## Average length of all snoRNAs
mean(lengthOf(edb, of = "gene",
filter = ~ gene_biotype == "snoRNA" &
seq_name == "X"))
##### transcriptLengths
##
## Calculate the length of transcripts encoded on chromosome Y, including
## length of the CDS, 5' and 3' UTR.
len <- transcriptLengths(edb, with.cds_len = TRUE, with.utr5_len = TRUE,
with.utr3_len = TRUE, filter = SeqNameFilter("Y"))
head(len)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.