noodles_csi::binning_index::index

Struct Builder

Source
pub struct Builder<I> { /* private fields */ }
Expand description

A binning index builder.

Implementations§

Source§

impl<I> Builder<I>
where I: Index,

Source

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);
Source

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);
Source

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));
Source

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);
Source

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));
Source

pub fn build(self) -> Index<I>

Builds a binning index.

§Examples
use noodles_csi as csi;
let index = csi::Index::builder().build();

Trait Implementations§

Source§

impl<I> Default for Builder<I>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.