Learn R Programming

bumphunter (version 1.12.0)

annotateTranscripts: Annotate transcripts

Description

Annotate transcripts

Usage

annotateTranscripts(txdb, annotationPackage = NULL, by = c("tx","gene"), codingOnly=FALSE, verbose = TRUE, requireAnnotation = FALSE)

Arguments

txdb
A TxDb database object such as TxDb.Hsapiens.UCSC.hg19.knownGene
annotationPackage
An annotation data package from which to obtain gene/transcript annotation. For example org.Hs.eg.db. If none is provided the function tries to infer it from species(txdb) and if it can't it proceeds without annotation unless requireAnnotation = TRUE.
by
Should we create a GRanges of transcripts (tx) or genes (gene).
codingOnly
Should we exclude all the non-coding transcripts.
verbose
logical value. If 'TRUE', it writes out some messages indicating progress. If 'FALSE' nothing should be printed.
requireAnnotation
logical value. If 'TRUE' function will stop if no annotation package is successfully loaded.

Value

A GRanges object with an attribute description set to annotatedTranscripts. The following columns are added. seqinfo is the information returned by seqinfo, CSS is the coding region start, CSE is the coding region end, Tx is the transcript ID used in TxDb, Entrez is the Entrez ID, Gene is the gene symbol, Refseq is the RefSeq annotation, Nexons is the number of exons, Exons is an IRanges with the exon information.

Details

This function prepares a GRanges for the matchGenes function. It adds information and in particular adds exons information to each gene/transcript.

See Also

matchGenes

Examples

Run this code
## Not run: 
#     library("TxDb.Hsapiens.UCSC.hg19.knownGene")
#     genes <- annotateTranscripts(TxDb.Hsapiens.UCSC.hg19.knownGene)
#     
#     ##and to avoid guessing the annotation package:
#     genes <- annotateTranscripts(TxDb.Hsapiens.UCSC.hg19.knownGene,annotation="org.Hs.eg.db")
#     
# ## End(Not run)

Run the code above in your browser using DataLab