pub struct BitArrayKmer<const K: usize, AlphabetType: Alphabet, BitArrayType = usize>where
BitArrayType: BitViewSized + BitStore,{ /* private fields */ }Expand description
A k-mer stored as array of minimum-bit characters.
Trait Implementations§
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Clone for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Clone for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Debug + Alphabet, BitArrayType> Debug for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Debug + Alphabet, BitArrayType> Debug for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> FromIterator<<AlphabetType as Alphabet>::CharacterType> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> FromIterator<<AlphabetType as Alphabet>::CharacterType> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§fn from_iter<T: IntoIterator<Item = AlphabetType::CharacterType>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = AlphabetType::CharacterType>>( iter: T, ) -> Self
Creates a value from an iterator. Read more
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> GenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> GenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§fn as_genome_subsequence(
&self,
) -> &BitVectorSubGenome<AlphabetType, BitArrayType>
fn as_genome_subsequence( &self, ) -> &BitVectorSubGenome<AlphabetType, BitArrayType>
Get a reference to this genome as its subsequence type.
Source§fn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Returns true if this genome is valid, i.e. it contains no invalid characters.
Source§fn reverse_complement_iter(
&self,
) -> ReverseComplementIterator<Self::Iterator<'_>, AlphabetType>
fn reverse_complement_iter( &self, ) -> ReverseComplementIterator<Self::Iterator<'_>, AlphabetType>
Returns an iterator over the reverse complement of this genome.
Panics if the iterator his an invalid character (see not valid).
Source§fn cloned_k_mer_iter<const K: usize, KmerType: OwnedKmer<K, AlphabetType, GenomeSubsequence>>(
&self,
) -> OwnedKmerIterator<'_, Self, KmerType>
fn cloned_k_mer_iter<const K: usize, KmerType: OwnedKmer<K, AlphabetType, GenomeSubsequence>>( &self, ) -> OwnedKmerIterator<'_, Self, KmerType>
Returns an iterator over the k-mers of this genome.
The k-mers are cloned from this genome.
Source§fn convert_with_reverse_complement<ReverseComplementSequence: OwnedGenomeSequence<AlphabetType, ReverseComplementSubsequence>, ReverseComplementSubsequence: GenomeSequence<AlphabetType, ReverseComplementSubsequence> + ?Sized>(
&self,
) -> ReverseComplementSequence
fn convert_with_reverse_complement<ReverseComplementSequence: OwnedGenomeSequence<AlphabetType, ReverseComplementSubsequence>, ReverseComplementSubsequence: GenomeSequence<AlphabetType, ReverseComplementSubsequence> + ?Sized>( &self, ) -> ReverseComplementSequence
Returns an owned copy of the reverse complement of this genome.
Panics if this genome is not valid.
Source§fn convert<ResultSequence: OwnedGenomeSequence<AlphabetType, ResultSubsequence>, ResultSubsequence: GenomeSequence<AlphabetType, ResultSubsequence> + ?Sized>(
&self,
) -> ResultSequence
fn convert<ResultSequence: OwnedGenomeSequence<AlphabetType, ResultSubsequence>, ResultSubsequence: GenomeSequence<AlphabetType, ResultSubsequence> + ?Sized>( &self, ) -> ResultSequence
Returns an owned copy of this genome.
Source§fn is_canonical(&self) -> bool
fn is_canonical(&self) -> bool
Returns true if the genome is canonical.
A canonical genome is lexicographically smaller or equal to its reverse complement.
Source§fn is_self_complemental(&self) -> bool
fn is_self_complemental(&self) -> bool
Returns true if the genome is self-complemental.
A self-complemental genome is equivalent to its reverse complement.
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Hash for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Hash for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Index<Range<usize>> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Index<Range<usize>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Index<usize> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Index<usize> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Ord for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Ord for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> OwnedGenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> OwnedGenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§fn clone_as_reverse_complement(&self) -> Self
fn clone_as_reverse_complement(&self) -> Self
Returns the reverse complement of this genome.
Panics if this genome is not valid.
Source§fn from_iter_u8<T: IntoIterator<Item = u8>>(
iter: T,
) -> Result<Self, AlphabetError>
fn from_iter_u8<T: IntoIterator<Item = u8>>( iter: T, ) -> Result<Self, AlphabetError>
Constructs an owned genome sequence from an
IntoIter over ASCII characters.
If any character is not part of the alphabet, then None is returned.Source§fn from_slice_u8(slice: &[u8]) -> Result<Self, AlphabetError>
fn from_slice_u8(slice: &[u8]) -> Result<Self, AlphabetError>
Constructs an owned genome sequence from a slice of ASCII characters.
If any character is not part of the alphabet, then
None is returned.Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> OwnedKmer<K, AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> OwnedKmer<K, AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> PartialEq for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> PartialEq for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> PartialOrd for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> PartialOrd for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Sequence<<AlphabetType as Alphabet>::CharacterType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> Sequence<<AlphabetType as Alphabet>::CharacterType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Source§type Iterator<'a> = BitVectorSubGenomeIterator<'a, AlphabetType, BitArrayType>
where
Self: 'a,
AlphabetType::CharacterType: 'a
type Iterator<'a> = BitVectorSubGenomeIterator<'a, AlphabetType, BitArrayType> where Self: 'a, AlphabetType::CharacterType: 'a
The iterator type of the sequence.
Source§fn prefix(&self, len: usize) -> &Subsequence
fn prefix(&self, len: usize) -> &Subsequence
Returns a prefix with length
len of this sequence.
Panics if len >= self.len().Source§fn suffix(&self, len: usize) -> &Subsequence
fn suffix(&self, len: usize) -> &Subsequence
Returns a suffix with length
len of this sequence.
Panics if len >= self.len().Source§fn is_proper_subsequence_of(&self, other: &Self) -> boolwhere
Item: Eq,
fn is_proper_subsequence_of(&self, other: &Self) -> boolwhere
Item: Eq,
Returns true if this is a proper subsequence of the given sequence.
Proper means that the sequences are not equal.
Source§fn contains(&self, item: &Item) -> boolwhere
Item: Eq,
fn contains(&self, item: &Item) -> boolwhere
Item: Eq,
Returns true if this sequence contains the given item.
Source§fn forward_merge_iter_assume_mergeable<'a>(
&'a self,
suffix: &'a Self,
) -> Chain<Self::Iterator<'a>, Skip<Self::Iterator<'a>>>where
Item: Eq,
fn forward_merge_iter_assume_mergeable<'a>(
&'a self,
suffix: &'a Self,
) -> Chain<Self::Iterator<'a>, Skip<Self::Iterator<'a>>>where
Item: Eq,
Returns an iterator over this sequence merged before the given other sequence under the assumption that the sequences can be merged this way.
A merge is possible if a non-empty suffix of this sequence equals a non-empty prefix of the other sequence. Read more
Source§fn backward_merge_iter_assume_mergeable<'a>(
&'a self,
suffix: &'a Self,
) -> Chain<Self::Iterator<'a>, Skip<Self::Iterator<'a>>>where
Item: Eq,
fn backward_merge_iter_assume_mergeable<'a>(
&'a self,
suffix: &'a Self,
) -> Chain<Self::Iterator<'a>, Skip<Self::Iterator<'a>>>where
Item: Eq,
Returns an iterator over this sequence merged after the given other sequence under the assumption that the sequences can be merged this way.
A merge is possible if a non-empty prefix of this sequence equals a non-empty suffix of the other sequence. Read more
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + Copy> Copy for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore> Eq for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> OwnedSequence<<AlphabetType as Alphabet>::CharacterType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>
Auto Trait Implementations§
impl<const K: usize, AlphabetType, BitArrayType> Freeze for BitArrayKmer<K, AlphabetType, BitArrayType>where
BitArrayType: Freeze,
impl<const K: usize, AlphabetType, BitArrayType> RefUnwindSafe for BitArrayKmer<K, AlphabetType, BitArrayType>where
AlphabetType: RefUnwindSafe,
BitArrayType: RefUnwindSafe,
impl<const K: usize, AlphabetType, BitArrayType> Send for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType, BitArrayType> Sync for BitArrayKmer<K, AlphabetType, BitArrayType>
impl<const K: usize, AlphabetType, BitArrayType> Unpin for BitArrayKmer<K, AlphabetType, BitArrayType>where
AlphabetType: Unpin,
impl<const K: usize, AlphabetType, BitArrayType> UnwindSafe for BitArrayKmer<K, AlphabetType, BitArrayType>where
AlphabetType: UnwindSafe,
BitArrayType: UnwindSafe,
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.