[−][src]Enum gb_io::seq::Position
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(i64, i64)
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(String, Option<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(&self) -> 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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,