transcripts {GenomicFeatures}R Documentation

Extract genomic features from an object

Description

Generic functions to extract genomic features from an object. This page documents the methods for TranscriptDb objects only.

Usage

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")

Arguments

x

A TranscriptDb object.

...

Arguments to be passed to or from methods.

vals

Either NULL or a named list of vectors to be used to restrict the output. Valid names for this list are: "gene_id", "tx_id", "tx_name", "tx_chrom", "tx_strand", "exon_id", "exon_name", "exon_chrom", "exon_strand", "cds_id", "cds_name", "cds_chrom", "cds_strand" and "exon_rank".

columns

Columns to include in the output. Must be NULL or a character vector with values in the above list of valid names. With the following restrictions:

  • "tx_chrom" and "tx_strand" are not allowed for transcripts.

  • "exon_chrom" and "exon_strand" are not allowed for exons.

  • "cds_chrom" and "cds_strand" are not allowed for cds.

Details

These are the main functions for extracting transcript information from a TranscriptDb object. They can restrict the output based on categorical information. To restrict the output based on interval information, use the transcriptsByOverlaps, exonsByOverlaps, and cdsByOverlaps functions.

Value

a GRanges object

Author(s)

M. Carlson, P. Aboyoun and H. Pages

See Also

TranscriptDb, id2name, transcriptsBy, transcriptsByOverlaps

Examples

  txdb <- loadFeatures(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"))

[Package GenomicFeatures version 1.6.1 Index]