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

A CRAM writer builder.

Implementations§

source§

impl Builder

source

pub fn set_reference_sequence_repository( self, reference_sequence_repository: Repository ) -> Self

Sets the reference sequence repository.

Examples
use noodles_cram as cram;
use noodles_fasta as fasta;

let repository = fasta::Repository::default();
let builder = cram::writer::Builder::default()
    .set_reference_sequence_repository(repository);
source

pub fn preserve_read_names(self, value: bool) -> Self

Sets whether to preserve read names.

If false, read names are discarded.

The default is true.

Examples
use noodles_cram as cram;
let builder = cram::writer::Builder::default().preserve_read_names(false);
source

pub fn encode_alignment_start_positions_as_deltas(self, value: bool) -> Self

Sets whether to encode alignment start positions as deltas.

If false, record alignment start positions are written with their actual values.

The default is true.

Examples
use noodles_cram as cram;
let builder = cram::writer::Builder::default()
    .encode_alignment_start_positions_as_deltas(false);
source

pub fn set_block_content_encoder_map(self, map: BlockContentEncoderMap) -> Self

Sets the block content-encoder map.

Examples
use noodles_cram::{self as cram, data_container::BlockContentEncoderMap};

let block_content_encoder_map = BlockContentEncoderMap::default();
let builder = cram::writer::Builder::default()
    .set_block_content_encoder_map(block_content_encoder_map);
source

pub fn build_with_writer<W>(self, writer: W) -> Writer<W>where W: Write,

Builds a CRAM writer.

Examples
use noodles_cram as cram;
let writer = cram::writer::Builder::default().build_with_writer(Vec::new());

Trait Implementations§

source§

impl Default for Builder

source§

fn default() -> Builder

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

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more