Struct noodles::tabix::index::header::Builder[][src]

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

A tabix index header builder.

Implementations

Creates a builder that targets the BED format.

Examples

use noodles_tabix as tabix;
let builder = tabix::index::header::Builder::bed();

Creates a builder that targets the GFF format.

Examples

use noodles_tabix as tabix;
let builder = tabix::index::header::Builder::gff();

Creates a builder that targets the SAM format.

Examples

use noodles_tabix as tabix;
let builder = tabix::index::header::Builder::sam();

Creates a builder that targets the VCF format.

Examples

use noodles_tabix as tabix;
let builder = tabix::index::header::Builder::vcf();

Sets a 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);

Sets a reference sequence name index.

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);

Sets a start position index.

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);

Sets an end position index.

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));

Sets a 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'#');

Sets a line skip count.

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);

Builds a tabix index header.

Examples

use noodles_tabix as tabix;
let index = tabix::index::Header::builder().build();

Trait Implementations

Returns the “default value” for a type. 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.

Should always be Self

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.