Struct noodles::tabix::index::Header [−][src]
pub struct Header { /* fields omitted */ }
Expand description
A tabix index header.
Implementations
Creates a tabix index header builder.
Examples
use noodles_tabix as tabix;
let builder = tabix::index::Header::builder();
Returns the format.
Examples
use noodles_tabix::{self as tabix, index::header::Format};
let header = tabix::index::Header::builder()
.set_format(Format::Vcf)
.build();
assert_eq!(header.format(), Format::Vcf);
Returns the reference sequence name field index.
This index is 1-based.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_reference_sequence_name_index(1)
.build();
assert_eq!(header.reference_sequence_name_index(), 1);
Returns the start position field index.
This index is 1-based.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_start_position_index(4)
.build();
assert_eq!(header.start_position_index(), 4);
Returns the end position field index.
This index is 1-based. It is not set if the format does not have a column for the end position.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_end_position_index(Some(5))
.build();
assert_eq!(header.end_position_index(), Some(5));
Returns the line comment prefix.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_line_comment_prefix(b'#')
.build();
assert_eq!(header.line_comment_prefix(), b'#');
Returns the number of lines to skip.
Examples
use noodles_tabix as tabix;
let header = tabix::index::Header::builder()
.set_line_skip_count(0)
.build();
assert_eq!(header.line_skip_count(), 0);
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Header
impl UnwindSafe for Header
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.