Struct debruijn::kmer::VarIntKmer[][src]

pub struct VarIntKmer<T: PrimInt + FromPrimitive + IntHelp, KS: KmerSize> {
    pub storage: T,
    pub phantom: PhantomData<KS>,
}
Expand description

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: Tphantom: PhantomData<KS>

Implementations

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Shift the base v into the left end of the kmer

Create a Kmer initialized to all A’s

K value for this concrete type.

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

Construct a kmer from the given lexicographic rank of the kmer. If K > 32, the leads bases will be A’s. 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

Return the minimum of the kmer and it’s reverse complement

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.

Return String containing Kmer sequence

Generate vector of all kmers contained in str encoded as 0-4.

Generate vector of all kmers contained in str, encoded as ASCII ACGT.

Get the letter at the given position.

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.

Return the reverse complement of this kmer

Length of DNA sequence

Set base at pos to 2-bit encoded base val

Count the number of A/T bases in the kmer

Count the number of G/C bases in the kmer

Iterate over the bases in the sequence

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.