| getTranscriptSeqs {VariantAnnotation} | R Documentation |
Extract transcript sequences from a BSgenome object or an FaFile.
## S4 method for signature 'GRangesList,BSgenome' getTranscriptSeqs(query, subject, ...) ## S4 method for signature 'GRangesList,FaFile' getTranscriptSeqs(query, subject, ...) ## S4 method for signature 'GRanges,FaFile' getTranscriptSeqs(query, subject, ...)
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 |
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).
A DNAStringSet instance containing the sequences for all transcripts
specified in query.
Valerie Obenchain <vobencha@fhcrc.org>
predictCoding extractTranscriptSeqs getSeq
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]