getTxsSeq: Get transcript sequences

Description Usage Arguments Value Methods (by class) Examples

Description

Extract the DNA sequences of all exons of transcript models and concatenate to one sequence per transcript. This is basically a wrapper for extractTranscriptSeqs, which makes sure that the exons are correctly sorted according to their position in the transcript (3' to 5').

Usage

1
2
3
4
5
6
7
getTxsSeq(transcripts, genome)

## S4 method for signature 'GRangesList'
getTxsSeq(transcripts, genome)

## S4 method for signature 'GRanges'
getTxsSeq(transcripts, genome)

Arguments

transcripts

A GRanges or GRangesList object containing exons of transcripts for which sequences should be extracted. All exons in a GRanges object are assumed to belong to the same transcript. Multiple transcripts can be provided in a GRangesList object.

genome

A BSgenome or DNAStringSet object containing chromosome sequences which should be used to extract transcript sequences. Although using a BSgenome object is the easiest way, the genome sequence could also be loaded from a FASTA file using readDNAStringSet.

Value

A DNAString or DNAStringSet object containing the transcript sequence(s).

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(BSgenome)

# protein-coding exons of transcripts within chr11 region
data("chr11_genes")
target_txs <- split(chr11_genes, f = chr11_genes$transcript_id)

# human genome (hg38) BSgenome object (needs to be installed separately from Bioconductor)
hg38 <- getBSgenome("BSgenome.Hsapiens.UCSC.hg38")

# get sequences for all target transcripts on chr11
txs_seqs <- getTxsSeq(target_txs, genome = hg38)

TAPseq documentation built on Nov. 8, 2020, 7:51 p.m.