[−][src]Struct codenano::Strand
A DNA strand.
Fields
domains: Vec<Domain<DomainLabel>>
The (ordered) vector of domains, where each domain is a directed interval of a helix.
sequence: Option<Cow<'static, str>>
The sequence of this strand, if any. If the sequence is longer than specified by the domains, a prefix is assumed. Can be skipped in the serialisation.
cyclic: bool
Is this sequence cyclic? Can be skipped (and defaults to
false
) in the serialization.
color: Option<Color>
Colour of this strand. If skipped, a default colour will be chosen automatically.
label: Option<Label>
An optional label for the strand. Can be
serde_json::Value::Null
, and skipped in the serialisation.
Implementations
impl<Label, DomainLabel> Strand<Label, DomainLabel>
[src]
pub fn find_nucl(&self, nucl: isize) -> (isize, isize, bool)
[src]
Find the nucl-th nucleotide of the strand. Output is (h, x, b) so that the nucl-th nucleotide of the strand is on helix h at position x with orientation b.
impl<StrandLabel, DomainLabel> Strand<StrandLabel, DomainLabel>
[src]
pub fn default_color(&self) -> Color
[src]
Provide a default color to the strand.
pub fn set_kelly_color(&mut self, color: usize)
[src]
Choose a color for this strand.
pub fn is_empty(&self) -> bool
[src]
Return true
iff the strand is empty
pub fn len(&self) -> usize
[src]
Total length of the strand
pub fn from_domain(domain: Domain<DomainLabel>) -> Self
[src]
Create a strand made of one domain
pub fn first_nucl(&self) -> Option<(isize, isize, bool)>
[src]
Return the first Nucleotide of the strand if the length is at least 1. Return None otherwise
pub fn last_nucl(&self) -> Option<(isize, isize, bool)>
[src]
Return the last Nucleotide of the strand if the length is at least 1. Return None otherwise
pub fn nth_nucl(&self, n: usize) -> Option<(isize, isize, bool)>
[src]
Return the n-th nucleotide of the strand, or None if the length of the strand is less than n.
pub fn set_sequence(&mut self, seq: String)
[src]
Set the sequence of the strand, if the strand is longer than the provided sequence, the 3' end of the strand will not have a sequence. If the sequence is longer than the strand, the last chars of the sequence will be ignored
Trait Implementations
impl<Label: Clone, DomainLabel: Clone> Clone for Strand<Label, DomainLabel>
[src]
impl<Label: Debug, DomainLabel: Debug> Debug for Strand<Label, DomainLabel>
[src]
impl<Label: Default, DomainLabel: Default> Default for Strand<Label, DomainLabel>
[src]
impl<'de, Label, DomainLabel> Deserialize<'de> for Strand<Label, DomainLabel> where
Label: Deserialize<'de>,
DomainLabel: Deserialize<'de>,
[src]
Label: Deserialize<'de>,
DomainLabel: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<Label, DomainLabel> Serialize for Strand<Label, DomainLabel> where
Label: Serialize,
DomainLabel: Serialize,
[src]
Label: Serialize,
DomainLabel: Serialize,
Auto Trait Implementations
impl<Label, DomainLabel> RefUnwindSafe for Strand<Label, DomainLabel> where
DomainLabel: RefUnwindSafe,
Label: RefUnwindSafe,
DomainLabel: RefUnwindSafe,
Label: RefUnwindSafe,
impl<Label, DomainLabel> Send for Strand<Label, DomainLabel> where
DomainLabel: Send,
Label: Send,
DomainLabel: Send,
Label: Send,
impl<Label, DomainLabel> Sync for Strand<Label, DomainLabel> where
DomainLabel: Sync,
Label: Sync,
DomainLabel: Sync,
Label: Sync,
impl<Label, DomainLabel> Unpin for Strand<Label, DomainLabel> where
DomainLabel: Unpin,
Label: Unpin,
DomainLabel: Unpin,
Label: Unpin,
impl<Label, DomainLabel> UnwindSafe for Strand<Label, DomainLabel> where
DomainLabel: UnwindSafe,
Label: UnwindSafe,
DomainLabel: UnwindSafe,
Label: UnwindSafe,
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
[src]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,