Learn R Programming

biofiles (version 1.0.0)

shift: Shift the location of features in a GenBank record

Description

Shift the location of features in a GenBank record

Usage

shift(x, shift = 0L, split = FALSE, order = TRUE, ...)

# S4 method for gbLocation shift(x, shift = 0L, split = FALSE, order = TRUE, ...)

# S4 method for gbFeature shift(x, shift = 0L, split = FALSE, order = TRUE, ...)

# S4 method for gbFeatureTable shift(x, shift = 0L, split = FALSE, order = FALSE)

# S4 method for gbRecord shift(x, shift, split = FALSE, order = TRUE)

Arguments

x

A '>gbFeatureTable or '>gbRecord instance (gbFeatureTables must be complete and include a 'source' field).

shift

Number of basepairs (or aa residues) to shift.

split

Split features that after the shift extends across the end of the sequence.

order

Reorder features after the shift.

...

Additional arguments passed to methods.

Value

A '>gbFeatureTable object.

Examples

Run this code
# NOT RUN {
load(system.file("extdata", "S_cerevisiae_mito.rda", package = "biofiles"))

## shift the S. cerevisiae mitochondrion such that cytochrome b is the first CDS
cytb <- start(filter(x, product = "^cytochrome b$")[[1]])[1]
x2 <- shift(x, shift = -cytb + 1, split = TRUE)
# }

Run the code above in your browser using DataLab