pub struct Minimizer64<const K: u8, const W: u8>(pub u64);Expand description
Minimizer-selected packed canonical kmer key stored in 64 bits.
Minimizer64<K, W> stores one canonical K-mer chosen from a longer
sequence using minimizer selection over a window of W consecutive K-mers.
The effective sequence span examined by the selector is therefore
K + W - 1 bases.
When multiple minimizer candidates are produced for a sequence, dryice
reduces them to a single record key by taking the minimum canonical packed
value. This keeps the result deterministic and stable under
reverse-complement transforms.
Tuple Fields§
§0: u64Implementations§
Source§impl<const K: u8, const W: u8> Minimizer64<K, W>
impl<const K: u8, const W: u8> Minimizer64<K, W>
Sourcepub fn try_from_sequence(seq: &[u8]) -> Result<Option<Self>, DryIceError>
pub fn try_from_sequence(seq: &[u8]) -> Result<Option<Self>, DryIceError>
Derive a minimizer-selected canonical kmer key from a sequence.
§Errors
Returns an error only for unexpected internal failures. Expected no-key
outcomes such as short or ambiguous sequences return Ok(None).
This constructor currently uses simd-minimizers internally for
canonical minimizer discovery, but dryice owns the public reduction
semantics: one key per record, chosen as the minimum selected canonical
packed value.
Trait Implementations§
Source§impl<const K: u8, const W: u8> Clone for Minimizer64<K, W>
impl<const K: u8, const W: u8> Clone for Minimizer64<K, W>
Source§fn clone(&self) -> Minimizer64<K, W>
fn clone(&self) -> Minimizer64<K, W>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<const K: u8, const W: u8> Ord for Minimizer64<K, W>
impl<const K: u8, const W: u8> Ord for Minimizer64<K, W>
Source§fn cmp(&self, other: &Minimizer64<K, W>) -> Ordering
fn cmp(&self, other: &Minimizer64<K, W>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl<const K: u8, const W: u8> PartialOrd for Minimizer64<K, W>
impl<const K: u8, const W: u8> PartialOrd for Minimizer64<K, W>
Source§impl<const K: u8, const W: u8> RecordKey for Minimizer64<K, W>
impl<const K: u8, const W: u8> RecordKey for Minimizer64<K, W>
Source§fn encode_into(&self, out: &mut [u8])
fn encode_into(&self, out: &mut [u8])
Source§fn decode_from(bytes: &[u8]) -> Result<Self, DryIceError>
fn decode_from(bytes: &[u8]) -> Result<Self, DryIceError>
impl<const K: u8, const W: u8> Copy for Minimizer64<K, W>
impl<const K: u8, const W: u8> Eq for Minimizer64<K, W>
impl<const K: u8, const W: u8> StructuralPartialEq for Minimizer64<K, W>
Auto Trait Implementations§
impl<const K: u8, const W: u8> Freeze for Minimizer64<K, W>
impl<const K: u8, const W: u8> RefUnwindSafe for Minimizer64<K, W>
impl<const K: u8, const W: u8> Send for Minimizer64<K, W>
impl<const K: u8, const W: u8> Sync for Minimizer64<K, W>
impl<const K: u8, const W: u8> Unpin for Minimizer64<K, W>
impl<const K: u8, const W: u8> UnsafeUnpin for Minimizer64<K, W>
impl<const K: u8, const W: u8> UnwindSafe for Minimizer64<K, W>
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
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>
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>
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