Learn R Programming

VariantAnnotation (version 1.14.13)

getTranscriptSeqs: Get transcript sequences

Description

DEPRECATED. Use GenomicFeatures::extractTranscriptSeqs() instead. Extract transcript sequences from a BSgenome object or an FaFile.

Usage

"getTranscriptSeqs"(query, subject, ...) "getTranscriptSeqs"(query, subject, ...) "getTranscriptSeqs"(query, subject, ...)

Arguments

query
A GRangesList object containing exons or cds grouped by transcript.
subject
A BSgenome object or a FaFile from which the sequences will be taken.
...
Additional arguments

Value

A DNAStringSet instance containing the sequences for all transcripts specified in query.

Details

getTranscriptSeqs is a wrapper for the extractTranscriptSeqs and getSeq functions. The purpose is to allow sequence extraction from either a BSgenome or FaFile. Transcript sequences are extracted based on the boundaries of the feature provided in the query (i.e., either exons or cds regions).

See Also

predictCoding extractTranscriptSeqs getSeq

Examples

Run this code
## Not run: 
#   library(TxDb.Hsapiens.UCSC.hg19.knownGene)
#   library(BSgenome.Hsapiens.UCSC.hg19)
#  
#   txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene 
#   cdsByTx <- cdsBy(txdb)
# 
#   ## Use only chromosome 20.
#   seqlevels(cdsByTx, force=TRUE) <- "chr20"
# 
#   ## Return a DNAStringSet of sequences corresponding to 
#   ## the cds regions.
#   seqs <- getTranscriptSeqs(cdsByTx, Hsapiens)
# 
#   ## Sequences for the cds regions were retrieved from the BSgenome.
#   ## Each element of the cdsByTx GRangesList is represented by
#   ## a single DNAString in 'seqs'. 
#   cdsByTx[1]
#   seqs[1]
# ## End(Not run)

Run the code above in your browser using DataLab