[][src]Enum gb_io::seq::Position

pub enum Position {
    Single(i64),
    Between(i64i64),
    Span(Box<Position>, Box<Position>),
    Before(i64),
    After(i64),
    Complement(Box<Position>),
    Join(Vec<Position>),
    Order(Vec<Position>),
    Bond(Vec<Position>),
    OneOf(Vec<Position>),
    External(StringOption<Box<Position>>),
    Gap(Option<i64>),
}

Represents a Genbank "position", used to specify the location of features and in the CONTIG line. See http://www.insdc.org/files/feature_table.html for a detailed description of what they mean.

Note that positions specified here must always refer to a nucleotide within the sequence. Ranges are inclusive. To specify a range that wraps around, use join(x..last,1..y).

Variants

Single(i64)

Just a number

Between(i64i64)

n^n+1

Span(Box<Position>, Box<Position>)

x..y

Before(i64)

<x

After(i64)

x

Complement(Box<Position>)Join(Vec<Position>)Order(Vec<Position>)Bond(Vec<Position>)OneOf(Vec<Position>)External(StringOption<Box<Position>>)Gap(Option<i64>)

Methods

impl Position[src]

pub fn simple_span(first: i64, last: i64) -> Position[src]

Convenience constructor for this commonly used variant

pub fn find_bounds(&self) -> Result<(i64, i64), PositionError>[src]

Try to get the outermost bounds for a position. Returns the starting and finishing positions, as inclusive sequence coordinates.

pub fn truncate(&self, start: i64, end: i64) -> Option<Position>[src]

Truncates this position, limiting it to the given bounds. Note: higher is exclusive. None is returned if no part of the position lies within the bounds.

pub fn to_gb_format(&self) -> String[src]

Trait Implementations

impl PartialEq<Position> for Position[src]

impl Clone for Position[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Display for Position[src]

impl Debug for Position[src]

Auto Trait Implementations

impl Send for Position

impl Sync for Position

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]