Struct noodles_csi::binning_index::index::Builder
source · pub struct Builder<I> { /* private fields */ }
Expand description
A binning index builder.
Implementations§
source§impl<I> Builder<I>where
I: Index,
impl<I> Builder<I>where
I: Index,
sourcepub fn set_min_shift(self, min_shift: u8) -> Self
pub fn set_min_shift(self, min_shift: u8) -> Self
Sets a min shift.
§Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::builder().set_min_shift(13).build();
assert_eq!(index.min_shift(), 13);
sourcepub fn set_depth(self, depth: u8) -> Self
pub fn set_depth(self, depth: u8) -> Self
Sets a max depth.
§Examples
use noodles_csi::{self as csi, BinningIndex};
let index = csi::Index::builder().set_depth(8).build();
assert_eq!(index.depth(), 8);
sourcepub fn set_header(self, header: Header) -> Self
pub fn set_header(self, header: Header) -> Self
Sets a tabix header.
§Examples
use noodles_csi::{self as csi, binning_index::index::Header, BinningIndex};
let header = Header::default();
let index = csi::Index::builder().set_header(header.clone()).build();
assert_eq!(index.header(), Some(&header));
sourcepub fn set_reference_sequences(
self,
reference_sequences: Vec<ReferenceSequence<I>>
) -> Self
pub fn set_reference_sequences( self, reference_sequences: Vec<ReferenceSequence<I>> ) -> Self
Sets reference sequences.
§Examples
use noodles_csi::{self as csi, binning_index::index::ReferenceSequence};
let reference_sequences = vec![ReferenceSequence::new(Default::default(), Default::default(), None)];
let index = csi::Index::builder()
.set_reference_sequences(reference_sequences.clone())
.build();
assert_eq!(index.reference_sequences(), &reference_sequences);
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::{self as csi, BinningIndex};
let index = csi::Index::builder().set_unplaced_unmapped_record_count(21).build();
assert_eq!(index.unplaced_unmapped_record_count(), Some(21));
Trait Implementations§
Auto Trait Implementations§
impl<I> Freeze for Builder<I>
impl<I> RefUnwindSafe for Builder<I>where
I: RefUnwindSafe,
impl<I> Send for Builder<I>where
I: Send,
impl<I> Sync for Builder<I>where
I: Sync,
impl<I> Unpin for Builder<I>where
I: Unpin,
impl<I> UnwindSafe for Builder<I>where
I: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more