shift: Shift the location of features in a GenBank record

Description Usage Arguments Value Note Examples

Description

Shift the location of features in a GenBank record

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
shift(x, shift = 0L, split = FALSE, order = TRUE, ...)

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

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

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

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

Note

shift does not currently handle compound locations In a shifted feature table compound locations get merged.

Examples

1
2
3
4
5
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)

gschofl/biofiles documentation built on Sept. 27, 2020, 12:08 a.m.