transcripts {GenomicFeatures} | R Documentation |
Generic functions to extract genomic features from an object. This page documents the methods for TranscriptDb objects only.
transcripts(x, ...) ## S4 method for signature 'TranscriptDb' transcripts(x, vals=NULL, columns=c("tx_id", "tx_name")) exons(x, ...) ## S4 method for signature 'TranscriptDb' exons(x, vals=NULL, columns="exon_id") cds(x, ...) ## S4 method for signature 'TranscriptDb' cds(x, vals=NULL, columns="cds_id") #promoters(x, upstream=2000, downstream=200, ...) ## S4 method for signature 'TranscriptDb' promoters(x, upstream=2000, downstream=200, ...) microRNAs(x) ## S4 method for signature 'TranscriptDb' microRNAs(x) tRNAs(x) ## S4 method for signature 'TranscriptDb' tRNAs(x)
x |
A TranscriptDb object. |
... |
Arguments to be passed to or from methods. |
vals |
Either |
columns |
Columns to include in the output.
Must be
If the vector is named, those names are used for the corresponding column in the element metadata of the returned object. |
upstream |
For |
downstream |
For |
These are the main functions for extracting transcript information
from a TranscriptDb object. With the exception of
microRNAs
, these methods can restrict the output based on
categorical information. To restrict the output based on interval
information, use the transcriptsByOverlaps
,
exonsByOverlaps
, and cdsByOverlaps
functions.
The promoters()
function computes user-defined promoter regions
for the transcripts in a TranscriptDb
object. The return object is a
GRanges
of promoter regions around the transcription start
site the span of which is defined by upstream
and downstream
.
For additional details on how the promoter range is computed and the
handling of +
and -
strands see
?'promoters,GRanges-method'
.
a GRanges object
M. Carlson, P. Aboyoun and H. Pages
transcriptsBy
and transcriptsByOverlaps
for more ways to extract genomic features
from a TranscriptDb object.
select-methods for how to use the simple "select" interface to extract information from a TranscriptDb object.
id2name
for mapping TranscriptDb internal ids
to external names for a given feature type.
The TranscriptDb class.
## transcripts() and exons() : txdb <- loadDb(system.file("extdata", "UCSC_knownGene_sample.sqlite", package="GenomicFeatures")) vals <- list(tx_chrom = c("chr3", "chr5"), tx_strand = "+") transcripts(txdb, vals) exons(txdb, vals=list(exon_id=1), columns=c("exon_id", "tx_name")) exons(txdb, vals=list(tx_name="uc009vip.1"), columns=c("exon_id", "tx_name")) ## microRNAs() : ## Not run: library(TxDb.Hsapiens.UCSC.hg19.knownGene) library(mirbase.db) microRNAs(TxDb.Hsapiens.UCSC.hg19.knownGene) ## End(Not run) ## promoters() : head(promoters(txdb, 100, 50))