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

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

A tabix index builder.

Implementations

Sets a header.

Examples

use noodles_tabix as tabix;
let header = tabix::index::Header::default();
let index = tabix::Index::builder().set_header(header.clone()).build();
assert_eq!(index.header(), &header);

Sets reference sequence names.

Examples

use noodles_tabix::{self as tabix, index::ReferenceSequenceNames};

let reference_sequence_names: ReferenceSequenceNames = vec![String::from("sq0")]
    .into_iter()
    .collect();

let index = tabix::Index::builder()
    .set_reference_sequence_names(reference_sequence_names.clone())
    .build();

assert_eq!(index.reference_sequence_names(), &reference_sequence_names);

Sets reference sequences.

Examples

use noodles_csi::BinningIndex;
use noodles_tabix::{self as tabix, index::ReferenceSequence};

let reference_sequences = vec![ReferenceSequence::new(Vec::new(), Vec::new(), None)];

let index = tabix::Index::builder()
    .set_reference_sequences(reference_sequences)
    .build();

assert_eq!(index.reference_sequences().len(), 1);
👎 Deprecated since 0.3.0:

Use set_unplaced_unmapped_record_count instead.

Sets an unmapped read count.

Examples

use noodles_tabix as tabix;

let index = tabix::Index::builder()
    .set_unmapped_read_count(21)
    .build();

assert_eq!(index.unmapped_read_count(), Some(21));

Sets an unplaced, unmapped record count.

Examples

use noodles_csi::BinningIndex;
use noodles_tabix as tabix;

let index = tabix::Index::builder()
    .set_unplaced_unmapped_record_count(21)
    .build();

assert_eq!(index.unplaced_unmapped_record_count(), Some(21));

Builds a tabix index.

Examples

use noodles_tabix as tabix;
let index = tabix::Index::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.