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);
pub fn set_reference_sequence_names(
self,
reference_sequence_names: ReferenceSequenceNames
) -> Self
pub fn set_reference_sequence_names(
self,
reference_sequence_names: ReferenceSequenceNames
) -> Self
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.
👎 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));