Struct debruijn::kmer::IntKmer [−][src]
pub struct IntKmer<T: PrimInt + FromPrimitive + IntHelp> {
pub storage: T,
}
Expand description
A Kmer sequence with a statically know K. K will fill the underlying integer type.
Fields
storage: T
Implementations
Trait Implementations
impl<'de, T: PrimInt + FromPrimitive + IntHelp> Deserialize<'de> for IntKmer<T> where
T: Deserialize<'de>,
impl<'de, T: PrimInt + FromPrimitive + IntHelp> Deserialize<'de> for IntKmer<T> where
T: Deserialize<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Shift the base v into the left end of the kmer
Hamming distance between this kmer and another kmer
Construct a kmer from the given lexicographic rank of the kmer. If K > 32, the leads bases will be A’s. Read more
Return the rank of this kmer in an lexicographic ordering of all kmers E.g. ‘AAAA’ -> 0, ‘AAAT’ -> 1, etc. This will panic if K > 32. Read more
Add the base v
to the right side of the sequence, and remove the leftmost base
Add the base v
to the side of sequence given by dir
, and remove a base at the opposite side
Generate all the extension of this sequence given by exts
in direction Dir
Return the minimum of the kmer and it’s reverse complement, and a flag indicating if sequence was flipped
Test if this Kmer and it’s reverse complement are the same
Create a Kmer from the first K bytes of bytes
, which must be encoded as the integers 0-4.
Create a Kmer from the first K bytes of bytes
, which must be encoded as ASCII letters A,C,G, or T.
Generate vector of all kmers contained in str
encoded as 0-4.
Set a slice of bases in the kmer, using the packed representation in value. Sets n_bases, starting at pos. Bases must always be packed into the upper-most bits of the value.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl<T> RefUnwindSafe for IntKmer<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for IntKmer<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more