Struct bam::header::Header[][src]

pub struct Header { /* fields omitted */ }
Expand description

BAM/SAM Header.

You can modify it by pushing new lines using push_entry, push_comment and push_line.

You cannot remove lines, but you can create a new header and push there only a subset of lines.

Implementations

Creates an empty header.

Iterator over lines.

pub fn push_entry(&mut self, entry: HeaderEntry) -> Result<(), String>

Pushes a new header entry.

Returns an error if the same reference appears twice or @SQ line has an incorrect format.

Pushes a new comment.

Pushes a lines to the header.

Write header in SAM format.

Writes header in an uncompressed BAM format.

Parse uncompressed BAM header, starting with magic b"BAM\1".

Returns the number of reference sequences in the BAM file.

Returns the name of the reference with ref_id (0-based). Returns None if there is no such reference

Returns the length of the reference with ref_id (0-based). Returns None if there is no such reference

Returns reference id from its name, if possible.

Returns reference names.

Returns reference names.

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.