pub struct DnaStringSlice<'a> {
pub dna_string: &'a DnaString,
pub start: usize,
pub length: usize,
pub is_rc: bool,
}Expand description
An immutable slice into a DnaString
Fields§
§dna_string: &'a DnaString§start: usize§length: usize§is_rc: boolImplementations§
Source§impl<'a> DnaStringSlice<'a>
impl<'a> DnaStringSlice<'a>
pub fn is_palindrome(&self) -> bool
pub fn bytes(&self) -> Vec<u8> ⓘ
pub fn ascii(&self) -> Vec<u8> ⓘ
pub fn to_dna_string(&self) -> String
pub fn to_string(&self) -> String
pub fn to_owned(&self) -> DnaString
Sourcepub fn slice(&self, start: usize, end: usize) -> DnaStringSlice<'_>
pub fn slice(&self, start: usize, end: usize) -> DnaStringSlice<'_>
Get slice containing the interval [start, end) of self
Sourcepub fn hamming_dist(&self, other: &DnaStringSlice<'_>) -> u32
pub fn hamming_dist(&self, other: &DnaStringSlice<'_>) -> u32
Compute the Hamming distance between this DNA string and another
Trait Implementations§
Source§impl<'a> Clone for DnaStringSlice<'a>
impl<'a> Clone for DnaStringSlice<'a>
Source§fn clone(&self) -> DnaStringSlice<'a>
fn clone(&self) -> DnaStringSlice<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for DnaStringSlice<'a>
impl<'a> Debug for DnaStringSlice<'a>
Source§impl<'a> IntoIterator for &'a DnaStringSlice<'a>
impl<'a> IntoIterator for &'a DnaStringSlice<'a>
Source§impl<'a> Mer for DnaStringSlice<'a>
impl<'a> Mer for DnaStringSlice<'a>
Source§fn set_slice_mut(&mut self, _: usize, _: usize, _: u64)
fn set_slice_mut(&mut self, _: usize, _: usize, _: u64)
Set
nbases positions in the sequence, starting at pos.
Values must be packed into the upper-most bits of value.Source§fn rc(&self) -> DnaStringSlice<'a>
fn rc(&self) -> DnaStringSlice<'a>
Return a new object containing the reverse complement of the sequence
Source§impl<'a> PartialEq for DnaStringSlice<'a>
impl<'a> PartialEq for DnaStringSlice<'a>
Source§impl<'a> Vmer for DnaStringSlice<'a>
impl<'a> Vmer for DnaStringSlice<'a>
Source§fn from_slice(seq: &[u8]) -> Self
fn from_slice(seq: &[u8]) -> Self
Create a Vmer from a sequence of bytes
Source§fn first_kmer<K: Kmer>(&self) -> K
fn first_kmer<K: Kmer>(&self) -> K
Get the first Kmer from the sequence
Source§fn both_term_kmer<K: Kmer>(&self) -> (K, K)
fn both_term_kmer<K: Kmer>(&self) -> (K, K)
Get the terminal kmer of the sequence, on the both side of the sequence
Source§fn term_kmer<K: Kmer>(&self, dir: Dir) -> K
fn term_kmer<K: Kmer>(&self, dir: Dir) -> K
Get the terminal kmer of the sequence, on the side of the sequence given by dir
Source§fn iter_kmers<K: Kmer>(&self) -> KmerIter<'_, K, Self> ⓘ
fn iter_kmers<K: Kmer>(&self) -> KmerIter<'_, K, Self> ⓘ
Iterate over the kmers in the sequence
Source§fn iter_kmer_exts<K: Kmer>(&self, seq_exts: Exts) -> KmerExtsIter<'_, K, Self> ⓘ
fn iter_kmer_exts<K: Kmer>(&self, seq_exts: Exts) -> KmerExtsIter<'_, K, Self> ⓘ
Iterate over the kmers and their extensions, given the extensions of the whole sequence
impl<'a> Eq for DnaStringSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for DnaStringSlice<'a>
impl<'a> RefUnwindSafe for DnaStringSlice<'a>
impl<'a> Send for DnaStringSlice<'a>
impl<'a> Sync for DnaStringSlice<'a>
impl<'a> Unpin for DnaStringSlice<'a>
impl<'a> UnwindSafe for DnaStringSlice<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more