Struct rust_htslib::bam::record::Record

source ·
pub struct Record {
    pub inner: *mut bam1_t,
    /* private fields */
}
Expand description

A BAM record.

Fields§

§inner: *mut bam1_t

Implementations§

Create an empty BAM record.

Get target id.

Set target id.

Get position (0-based).

Set position (0-based).

Get MAPQ.

Set MAPQ.

Get raw flags.

Set raw flags.

Unset all flags.

Get target id of mate.

Set target id of mate.

Get mate position.

Set mate position.

Get insert size.

Set insert size.

Get qname (read name). Complexity: O(1).

Set the variable length data buffer

Set variable length data (qname, cigar, seq, qual). Note: Pre-existing aux data will be invalidated if called on an existing record. For this reason, never call push_aux() before set().

Replace current qname with a new one. Unlike set(), this preserves all the variable length data including the aux.

Get reference to raw cigar string representation (as stored in BAM file). Usually, the method Record::cigar should be used instead.

Return unpacked cigar string. This will create a fresh copy the Cigar data.

Decode the cigar string and cache it inside the Record

Get read sequence. Complexity: O(1).

Get base qualities (PHRED-scaled probability that base is wrong). This does not entail any offsets, hence the qualities can be used directly without e.g. subtracting 33. Complexity: O(1).

Get auxiliary data (tags).

Add auxiliary data. push_aux() should never be called before set().

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.