[−][src]Struct debruijn::kmer::VarIntKmer
A fixed-length Kmer sequence that may not fill the bits of T
side: L R bases: 0 0 0 A C G T T bits: H ........ L bit : 14 12 10 8 6 4 2 0
sorting the integer will give a lexicographic sorting of the corresponding string.
kmers that don't fill storage
are always aligned to the least signifcant bits
Fields
storage: T
phantom: PhantomData<KS>
Methods
impl<T: PrimInt + FromPrimitive + Hash + IntHelp, KS: KmerSize> VarIntKmer<T, KS>
[src]
Trait Implementations
impl<T: PrimInt + FromPrimitive + Hash + IntHelp, KS: KmerSize> Mer for VarIntKmer<T, KS>
[src]
fn len(&self) -> usize
[src]
fn get(&self, pos: usize) -> u8
[src]
Get the letter at the given position.
fn set_mut(&mut self, pos: usize, v: u8)
[src]
fn set_slice_mut(&mut self, pos: usize, n_bases: usize, value: u64)
[src]
Set a slice of bases in the kmer, using the packed representation in value. Sets n_bases, starting at pos. Incoming bases must always be packed into the upper-most bits of the value.
fn rc(&self) -> Self
[src]
Return the reverse complement of this kmer
ⓘImportant traits for MerIter<'a, M>fn iter<'a>(&'a self) -> MerIter<'a, Self>
[src]
Iterate over the bases in the sequence
impl<T: PrimInt + FromPrimitive + Hash + IntHelp, KS: KmerSize> Kmer for VarIntKmer<T, KS>
[src]
fn empty() -> Self
[src]
fn k() -> usize
[src]
fn to_u64(&self) -> u64
[src]
fn from_u64(v: u64) -> Self
[src]
fn extend_left(&self, v: u8) -> Self
[src]
Shift the base v into the left end of the kmer
fn extend_right(&self, v: u8) -> Self
[src]
fn extend(&self, v: u8, dir: Dir) -> Self
[src]
Add the base v
to the side of sequence given by dir
, and remove a base at the opposite side
fn get_extensions(&self, exts: Exts, dir: Dir) -> Vec<Self>
[src]
Generate all the extension of this sequence given by exts
in direction Dir
fn min_rc_flip(&self) -> (Self, bool)
[src]
Return the minimum of the kmer and it's reverse complement, and a flag indicating if sequence was flipped
fn min_rc(&self) -> Self
[src]
fn is_palindrome(&self) -> bool
[src]
Test if this Kmer and it's reverse complement are the same
fn from_bytes(bytes: &[u8]) -> Self
[src]
Create a Kmer from the first K bytes of bytes
, which must be encoded as the integers 0-4.
fn from_ascii(bytes: &[u8]) -> Self
[src]
Create a Kmer from the first K bytes of bytes
, which must be encoded as ASCII letters A,C,G, or T.
fn to_string(&self) -> String
[src]
Return String containing Kmer sequence
fn kmers_from_bytes(str: &[u8]) -> Vec<Self>
[src]
Generate vector of all kmers contained in str
encoded as 0-4.
fn kmers_from_ascii(str: &[u8]) -> Vec<Self>
[src]
Generate vector of all kmers contained in str
, encoded as ASCII ACGT.
impl<T: PartialEq + PrimInt + FromPrimitive + IntHelp, KS: PartialEq + KmerSize> PartialEq<VarIntKmer<T, KS>> for VarIntKmer<T, KS>
[src]
fn eq(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
fn ne(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
impl<T: Clone + PrimInt + FromPrimitive + IntHelp, KS: Clone + KmerSize> Clone for VarIntKmer<T, KS>
[src]
fn clone(&self) -> VarIntKmer<T, KS>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<T: Ord + PrimInt + FromPrimitive + IntHelp, KS: Ord + KmerSize> Ord for VarIntKmer<T, KS>
[src]
fn cmp(&self, other: &VarIntKmer<T, KS>) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl<T: Eq + PrimInt + FromPrimitive + IntHelp, KS: Eq + KmerSize> Eq for VarIntKmer<T, KS>
[src]
impl<T: PartialOrd + PrimInt + FromPrimitive + IntHelp, KS: PartialOrd + KmerSize> PartialOrd<VarIntKmer<T, KS>> for VarIntKmer<T, KS>
[src]
fn partial_cmp(&self, other: &VarIntKmer<T, KS>) -> Option<Ordering>
[src]
fn lt(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
fn le(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
fn gt(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
fn ge(&self, other: &VarIntKmer<T, KS>) -> bool
[src]
impl<T: Copy + PrimInt + FromPrimitive + IntHelp, KS: Copy + KmerSize> Copy for VarIntKmer<T, KS>
[src]
impl<T: PrimInt + FromPrimitive + Hash + IntHelp, KS: KmerSize> Debug for VarIntKmer<T, KS>
[src]
impl<T: Hash + PrimInt + FromPrimitive + IntHelp, KS: Hash + KmerSize> Hash for VarIntKmer<T, KS>
[src]
fn hash<__HTKS: Hasher>(&self, state: &mut __HTKS)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PrimInt + FromPrimitive + IntHelp, KS: KmerSize> Serialize for VarIntKmer<T, KS> where
T: Serialize,
[src]
T: Serialize,
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de, T: PrimInt + FromPrimitive + IntHelp, KS: KmerSize> Deserialize<'de> for VarIntKmer<T, KS> where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl<T, KS> Send for VarIntKmer<T, KS> where
KS: Send,
T: Send,
KS: Send,
T: Send,
impl<T, KS> Sync for VarIntKmer<T, KS> where
KS: Sync,
T: Sync,
KS: Sync,
T: Sync,
Blanket Implementations
impl<T> MerImmut for T where
T: Mer + Clone,
[src]
T: Mer + Clone,
fn set(&self, pos: usize, val: u8) -> Self
[src]
fn set_slice(&self, pos: usize, nbases: usize, bits: u64) -> Self
[src]
impl<T> From for T
[src]
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, 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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?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> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,