pub struct PackedSeq<'s> { /* private fields */ }Expand description
A 2-bit packed non-owned slice of DNA bases.
Implementations§
Trait Implementations§
Source§impl<'s> MemDbgImpl for PackedSeq<'s>
impl<'s> MemDbgImpl for PackedSeq<'s>
fn _mem_dbg_rec_on( &self, _memdbg_writer: &mut impl Write, _memdbg_total_size: usize, _memdbg_max_depth: usize, _memdbg_prefix: &mut String, _memdbg_is_last: bool, _memdbg_flags: DbgFlags, ) -> Result
fn _mem_dbg_depth_on( &self, writer: &mut impl Write, total_size: usize, max_depth: usize, prefix: &mut String, field_name: Option<&str>, is_last: bool, padded_size: usize, flags: DbgFlags, ) -> Result<(), Error>
Source§impl Ord for PackedSeq<'_>
impl Ord for PackedSeq<'_>
Source§impl PartialOrd for PackedSeq<'_>
impl PartialOrd for PackedSeq<'_>
Source§impl<'s> Seq<'s> for PackedSeq<'s>
impl<'s> Seq<'s> for PackedSeq<'s>
Source§fn as_u64(&self) -> u64
fn as_u64(&self) -> u64
Convert a short sequence (kmer) to a packed representation as usize.
Panics if self is longer than 32 characters.
Source§fn revcomp_as_u64(&self) -> u64
fn revcomp_as_u64(&self) -> u64
Convert a short sequence (kmer) to a packed representation of its reverse complement as usize.
Panics if self is longer than 32 characters.
Source§fn par_iter_bp_delayed(
self,
context: usize,
delay: usize,
) -> (impl ExactSizeIterator<Item = (S, S)> + Clone, usize)
fn par_iter_bp_delayed( self, context: usize, delay: usize, ) -> (impl ExactSizeIterator<Item = (S, S)> + Clone, usize)
NOTE: When self starts does not start at a byte boundary, the
‘delayed’ character is not guaranteed to be 0.
Source§fn par_iter_bp_delayed_2(
self,
context: usize,
delay1: usize,
delay2: usize,
) -> (impl ExactSizeIterator<Item = (S, S, S)> + Clone, usize)
fn par_iter_bp_delayed_2( self, context: usize, delay1: usize, delay2: usize, ) -> (impl ExactSizeIterator<Item = (S, S, S)> + Clone, usize)
NOTE: When self starts does not start at a byte boundary, the
‘delayed’ character is not guaranteed to be 0.
Source§const BASES_PER_BYTE: usize = 4usize
const BASES_PER_BYTE: usize = 4usize
Number of encoded characters per byte of memory of the
Seq.Source§const BITS_PER_CHAR: usize = 2usize
const BITS_PER_CHAR: usize = 2usize
Number of bits
b to represent each character returned by iter_bp and variants..Source§type SeqVec = PackedSeqVec
type SeqVec = PackedSeqVec
The corresponding owned sequence type.
Source§fn get_ascii(&self, index: usize) -> u8
fn get_ascii(&self, index: usize) -> u8
Get the ASCII character at the given index, without mapping to
b-bit values.Source§fn to_vec(&self) -> PackedSeqVec
fn to_vec(&self) -> PackedSeqVec
Convert to an owned version.
Source§fn to_revcomp(&self) -> PackedSeqVec
fn to_revcomp(&self) -> PackedSeqVec
Compute the reverse complement of this sequence.
Source§fn slice(&self, range: Range<usize>) -> Self
fn slice(&self, range: Range<usize>) -> Self
Get a sub-slice of the sequence.
range indicates character indices.Source§fn iter_bp(self) -> impl ExactSizeIterator<Item = u8> + Clone
fn iter_bp(self) -> impl ExactSizeIterator<Item = u8> + Clone
Iterate over the
b-bit characters of the sequence.Source§fn par_iter_bp(
self,
context: usize,
) -> (impl ExactSizeIterator<Item = S> + Clone, usize)
fn par_iter_bp( self, context: usize, ) -> (impl ExactSizeIterator<Item = S> + Clone, usize)
Iterate over 8 chunks of
b-bit characters of the sequence in parallel. Read moreSource§fn bits_per_char(&self) -> usize
fn bits_per_char(&self) -> usize
Convenience function that returns
b=Self::BITS_PER_CHAR.Source§fn to_word(&self) -> usize
fn to_word(&self) -> usize
👎Deprecated: Prefer
to_u64.Convert a short sequence (kmer) to a packed representation as
usize.Source§fn to_word_revcomp(&self) -> usize
fn to_word_revcomp(&self) -> usize
👎Deprecated: Prefer
revcomp_to_u64.Convert a short sequence (kmer) to a packed representation of its reverse complement as
usize.impl<'s> Copy for PackedSeq<'s>
impl Eq for PackedSeq<'_>
Auto Trait Implementations§
impl<'s> Freeze for PackedSeq<'s>
impl<'s> RefUnwindSafe for PackedSeq<'s>
impl<'s> Send for PackedSeq<'s>
impl<'s> Sync for PackedSeq<'s>
impl<'s> Unpin for PackedSeq<'s>
impl<'s> UnwindSafe for PackedSeq<'s>
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> MemDbg for Twhere
T: MemDbgImpl,
impl<T> MemDbg for Twhere
T: MemDbgImpl,
Source§fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg(&self, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage, expanding
all levels of nested structures.
Source§fn mem_dbg_on(
&self,
writer: &mut impl Write,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_on( &self, writer: &mut impl Write, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage, expanding all levels of nested structures.Source§fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
fn mem_dbg_depth(&self, max_depth: usize, flags: DbgFlags) -> Result<(), Error>
Writes to stderr debug infos about the structure memory usage as
mem_dbg, but expanding only up to max_depth
levels of nested structures.Source§fn mem_dbg_depth_on(
&self,
writer: &mut impl Write,
max_depth: usize,
flags: DbgFlags,
) -> Result<(), Error>
fn mem_dbg_depth_on( &self, writer: &mut impl Write, max_depth: usize, flags: DbgFlags, ) -> Result<(), Error>
Writes to a
core::fmt::Write debug infos about the structure memory
usage as mem_dbg_on, but expanding only up to
max_depth levels of nested structures.