getSequence-methods: Get the sequence from a GenBank record.

Description Usage Arguments Value Examples

Description

Get the sequence from a GenBank record.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
getSequence(x, ...)

## S4 method for signature 'gbFeature'
getSequence(x)

## S4 method for signature 'gbFeatureTable'
getSequence(x)

## S4 method for signature 'gbRecord'
getSequence(x)

## S4 method for signature 'gbRecordList'
getSequence(x)

Arguments

x

A gbFeature, gbFeatureTable, gbRecord, or gbRecordList instance.

...

Additional arguments passed to methods.

Value

An XStringSet object, containing either the complete sequence(s) of the record(s), or of the selected feature(s)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
gbk_file <- system.file("extdata", "S_cerevisiae_mito.gb", package = "biofiles")
x <- gbRecord(gbk_file)

## extract the full-length sequence of the record.
getSequence(x)

## extract coding sequences only
getSequence(x["CDS"])

## End(Not run)

biofiles documentation built on May 2, 2019, 3:31 p.m.