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);
pub fn set_reference_sequence_name_index(
self,
reference_sequence_name_index: usize
) -> Builder
pub fn set_reference_sequence_name_index(
self,
reference_sequence_name_index: usize
) -> Builder
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);