Struct noodles_cram::writer::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A CRAM writer builder.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_reference_sequence_repository(
self,
reference_sequence_repository: Repository
) -> Self
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);
sourcepub fn preserve_read_names(self, value: bool) -> Self
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);
sourcepub fn encode_alignment_start_positions_as_deltas(self, value: bool) -> Self
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);
sourcepub fn set_block_content_encoder_map(self, map: BlockContentEncoderMap) -> Self
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);
sourcepub fn build_with_writer<W>(self, writer: W) -> Writer<W>where
W: Write,
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§
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§
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