pub struct Builder { /* private fields */ }
Expand description
A tabix index builder.
Implementations
sourceimpl Builder
impl Builder
sourcepub fn set_header(self, header: Header) -> Self
pub fn set_header(self, header: Header) -> Self
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);
sourcepub 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 = [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);
sourcepub fn set_reference_sequences(
self,
reference_sequences: Vec<ReferenceSequence>
) -> Self
pub fn set_reference_sequences(
self,
reference_sequences: Vec<ReferenceSequence>
) -> Self
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);
sourcepub fn set_unmapped_read_count(self, unmapped_read_count: u64) -> Self
👎 Deprecated since 0.3.0: Use set_unplaced_unmapped_record_count
instead.
pub fn set_unmapped_read_count(self, unmapped_read_count: u64) -> Self
👎 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));
sourcepub fn set_unplaced_unmapped_record_count(
self,
unplaced_unmapped_record_count: u64
) -> Self
pub fn set_unplaced_unmapped_record_count(
self,
unplaced_unmapped_record_count: u64
) -> Self
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));
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more