Learn R Programming

biofiles (version 1.0.0)

getSequence: Get the sequence from a GenBank record.

Description

Get the sequence from a GenBank record.

Usage

getSequence(x, ...)

# S4 method for gbFeature getSequence(x)

# S4 method for gbFeatureTable getSequence(x)

# S4 method for gbRecord getSequence(x)

# S4 method for 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

Run this code
# 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"])
# }

Run the code above in your browser using DataLab