Trait compact_genome::interface::sequence::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.

Object Safety§

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>