getGeneLengthAndGCContent: Get gene length and GC-content

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/getLengthAndGC.R


Automatically retrieves gene length and GC-content information from Biomart or org.db packages.


getGeneLengthAndGCContent(id, org, mode=c("biomart", "org.db"))



Character vector of one or more ENSEMBL or ENTREZ gene IDs.


Organism three letter code, e.g. 'hsa' for 'Homo sapiens'. See also:; In org.db mode, this can be also a specific genome assembly, e.g. 'hg38' or 'sacCer3'.


Mode to retrieve the information. Defaults to 'biomart'. See Details.


The 'biomart' mode is based on functionality from the biomaRt packgage and retrieves the required information from the BioMart database. This is available for all ENSEMBL organisms and is typically most current, but can be time-consuming when querying several thousand genes at a time.

The 'org.db' mode uses organism-based annotation packages from Bioconductor. This is much faster than the 'biomart' mode, but is only available for selected model organism currently supported by BioC annotation functionality.

Results for the same gene ID(s) can differ between both modes as they are based on different sources for the underlying genome assembly. While the 'biomart' mode uses the latest ENSEMBL version, the 'org.db' mode uses BioC annotation packages typically built from UCSC.


A numeric matrix with two columns: gene length and GC-content.


Ludwig Geistlinger <[email protected]>

See Also

getSequence to retrieve a genomic sequence from BioMart, genes to extract genomic coordinates from a TxDb object, getSeq to extract genomic sequences from a BSgenome object, alphabetFrequency to calculate nucleotide frequencies.


getGeneLengthAndGCContent("ENSG00000012048", "hsa")

EDASeq documentation built on Nov. 17, 2017, 10:56 a.m.