pub trait GenomeSequence<AlphabetType: Alphabet, GenomeSubsequence: GenomeSequence<AlphabetType, GenomeSubsequence> + ?Sized>: Sequence<AlphabetType::CharacterType, GenomeSubsequence> {
// Provided methods
fn is_valid(&self) -> bool { ... }
fn clone_as_vec(&self) -> Vec<u8> ⓘ { ... }
fn as_genome_subsequence(&self) -> &GenomeSubsequence { ... }
fn as_string(&self) -> String { ... }
fn reverse_complement_iter(
&self,
) -> ReverseComplementIterator<Self::Iterator<'_>, AlphabetType> { ... }
fn cloned_k_mer_iter<const K: usize, KmerType: OwnedKmer<K, AlphabetType, GenomeSubsequence>>(
&self,
) -> OwnedKmerIterator<'_, Self, KmerType> { ... }
fn convert_with_reverse_complement<ReverseComplementSequence: OwnedGenomeSequence<AlphabetType, ReverseComplementSubsequence>, ReverseComplementSubsequence: GenomeSequence<AlphabetType, ReverseComplementSubsequence> + ?Sized>(
&self,
) -> ReverseComplementSequence { ... }
fn convert<ResultSequence: OwnedGenomeSequence<AlphabetType, ResultSubsequence>, ResultSubsequence: GenomeSequence<AlphabetType, ResultSubsequence> + ?Sized>(
&self,
) -> ResultSequence { ... }
fn is_canonical(&self) -> bool { ... }
fn is_self_complemental(&self) -> bool { ... }
}Expand description
A genome sequence.
Provided Methods§
Sourcefn is_valid(&self) -> bool
fn is_valid(&self) -> bool
Returns true if this genome is valid, i.e. it contains no invalid characters.
Sourcefn clone_as_vec(&self) -> Vec<u8> ⓘ
fn clone_as_vec(&self) -> Vec<u8> ⓘ
Copies this genome string into a Vec.
Sourcefn as_genome_subsequence(&self) -> &GenomeSubsequence
fn as_genome_subsequence(&self) -> &GenomeSubsequence
Get a reference to this genome as its subsequence type.
Sourcefn 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).
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Sourcefn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.