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 an empty sequence.

Creates a new sequence from text representation.

Clears sequence but does not touch capacity.

Shrinks inner vector.

Pushes a single nucleotide to the end.

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 full length of the sequence, O(1).

Returns true, if the sequence is present.

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.

Returns an iterator over a subsequence.

Returns an iterator over a subsequence using only nucleotides A, C, G, T and N.

Returns an iterator over a reverse complement of a subsequence.

Returns an iterator over a reverse complement of a subsequence using only nucleotides A, C, G, T and N.

Writes in human readable format. Writes * if empty.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.