GenomeSequence

Trait GenomeSequence 

Source
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§

Source

fn is_valid(&self) -> bool

Returns true if this genome is valid, i.e. it contains no invalid characters.

Source

fn clone_as_vec(&self) -> Vec<u8>

Copies this genome string into a Vec.

Source

fn as_genome_subsequence(&self) -> &GenomeSubsequence

Get a reference to this genome as its subsequence type.

Source

fn as_string(&self) -> String

Returns the genome as nucleotide string.

Source

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>

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

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

Returns an owned copy of this genome.

Source

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

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.

Implementors§

Source§

impl<AlphabetType: Alphabet> GenomeSequence<AlphabetType, SliceSubGenome<AlphabetType>> for SliceSubGenome<AlphabetType>

Source§

impl<AlphabetType: Alphabet> GenomeSequence<AlphabetType, SliceSubGenome<AlphabetType>> for VectorGenome<AlphabetType>

Source§

impl<AlphabetType: Alphabet, BitStoreType: BitStore> GenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitStoreType>> for BitVectorGenome<AlphabetType, BitStoreType>

Source§

impl<AlphabetType: Alphabet, BitStoreType: BitStore> GenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitStoreType>> for BitVectorSubGenome<AlphabetType, BitStoreType>

Source§

impl<const K: usize, AlphabetType: Alphabet> GenomeSequence<AlphabetType, SliceSubGenome<AlphabetType>> for ArrayKmer<K, AlphabetType>

Source§

impl<const K: usize, AlphabetType: Alphabet, BitArrayType: BitViewSized + BitStore + BitView<Store = BitArrayType>> GenomeSequence<AlphabetType, BitVectorSubGenome<AlphabetType, BitArrayType>> for BitArrayKmer<K, AlphabetType, BitArrayType>