Struct bam::record::sequence::Sequence [−][src]
pub struct Sequence { /* fields omitted */ }Expand description
Wrapper around raw sequence, stored as an [u8; (len + 1) / 2]. Each four bits encode a
nucleotide in the following order: =ACMGRSVTWYHKDBN.
Implementations
Creates a new sequence from text representation.
Shrinks inner vector.
pub fn extend_from_text<I: IntoIterator<Item = u8>>(
&mut self,
nucleotides: I
) -> Result<(), String>
pub fn extend_from_text<I: IntoIterator<Item = u8>>(
&mut self,
nucleotides: I
) -> Result<(), String>
Extends sequence from the text representation.
Clears sequence and fills from a raw stream. new_len represents the number of nucleotides,
not the number of bytes.
Returns raw data.
Returns transformed data, each byte represents a single nucleotde, O(n).
Returns transformed data using only nucleotides A, C, G, T and N, all other values are transformed into N, each byte represents a single nucleotde, O(n).
Returns a nucleotide at the position index, represented by a single byte, O(1).
Returns a nucleotide at the position index, represented by a single byte, O(1).
If the nucleotide is not A, C, G or T, the function returns N.
Returns a nucleotide, complement to the nucleotide at the position index, O(1).
Returns a nucleotide, complement to the nucleotide at the position index, O(1).
If the nucleotide is not A, C, G or T, the function returns N.
pub fn subseq<'a, R: RangeBounds<usize>>(&'a self, range: R) -> SubseqIter<'a>ⓘNotable traits for SubseqIter<'a>impl<'a> Iterator for SubseqIter<'a> type Item = u8;
pub fn subseq<'a, R: RangeBounds<usize>>(&'a self, range: R) -> SubseqIter<'a>ⓘNotable traits for SubseqIter<'a>impl<'a> Iterator for SubseqIter<'a> type Item = u8;
impl<'a> Iterator for SubseqIter<'a> type Item = u8;Returns an iterator over a subsequence.
pub fn subseq_acgtn_only<R: RangeBounds<usize>>(
&self,
range: R
) -> SubseqIterAcgtn<'_>ⓘNotable traits for SubseqIterAcgtn<'a>impl<'a> Iterator for SubseqIterAcgtn<'a> type Item = u8;
pub fn subseq_acgtn_only<R: RangeBounds<usize>>(
&self,
range: R
) -> SubseqIterAcgtn<'_>ⓘNotable traits for SubseqIterAcgtn<'a>impl<'a> Iterator for SubseqIterAcgtn<'a> type Item = u8;
impl<'a> Iterator for SubseqIterAcgtn<'a> type Item = u8;Returns an iterator over a subsequence using only nucleotides A, C, G, T and N.
pub fn rev_compl<R: RangeBounds<usize>>(&self, range: R) -> RevComplIter<'_>ⓘNotable traits for RevComplIter<'a>impl<'a> Iterator for RevComplIter<'a> type Item = u8;
pub fn rev_compl<R: RangeBounds<usize>>(&self, range: R) -> RevComplIter<'_>ⓘNotable traits for RevComplIter<'a>impl<'a> Iterator for RevComplIter<'a> type Item = u8;
impl<'a> Iterator for RevComplIter<'a> type Item = u8;Returns an iterator over a reverse complement of a subsequence.
pub fn rev_compl_acgtn_only<R: RangeBounds<usize>>(
&self,
range: R
) -> RevComplIterAcgtn<'_>ⓘNotable traits for RevComplIterAcgtn<'a>impl<'a> Iterator for RevComplIterAcgtn<'a> type Item = u8;
pub fn rev_compl_acgtn_only<R: RangeBounds<usize>>(
&self,
range: R
) -> RevComplIterAcgtn<'_>ⓘNotable traits for RevComplIterAcgtn<'a>impl<'a> Iterator for RevComplIterAcgtn<'a> type Item = u8;
impl<'a> Iterator for RevComplIterAcgtn<'a> type Item = u8;Returns an iterator over a reverse complement of a subsequence using only nucleotides A, C, G, T and N.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sequence
impl UnwindSafe for Sequence
Blanket Implementations
Mutably borrows from an owned value. Read more
