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::io::writer::Builder;
use noodles_fasta as fasta;
let repository = fasta::Repository::default();
let builder = 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::io::writer::Builder;
let builder = 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::io::writer::Builder;
let builder = 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::{data_container::BlockContentEncoderMap, io::writer::Builder};
let block_content_encoder_map = BlockContentEncoderMap::default();
let builder = Builder::default()
.set_block_content_encoder_map(block_content_encoder_map);
Sourcepub fn build_from_path<P>(self, dst: P) -> Result<Writer<File>>
pub fn build_from_path<P>(self, dst: P) -> Result<Writer<File>>
Builds a CRAM writer from a path.
§Examples
use noodles_cram::io::writer::Builder;
let writer = Builder::default().build_from_path("out.cram")?;
Sourcepub fn build_with_path<P>(self, dst: P) -> Result<Writer<File>>
👎Deprecated since 0.68.0: Use Builder::build_from_path
instead.
pub fn build_with_path<P>(self, dst: P) -> Result<Writer<File>>
Builder::build_from_path
instead.Builds a CRAM writer from a path.
Sourcepub fn build_from_writer<W>(self, writer: W) -> Writer<W>where
W: Write,
pub fn build_from_writer<W>(self, writer: W) -> Writer<W>where
W: Write,
Builds a CRAM writer from a writer.
§Examples
use noodles_cram::io::writer::Builder;
let writer = Builder::default().build_from_writer(Vec::new());
Sourcepub fn build_with_writer<W>(self, writer: W) -> Writer<W>where
W: Write,
👎Deprecated since 0.68.0: Use Builder::build_from_writer
instead.
pub fn build_with_writer<W>(self, writer: W) -> Writer<W>where
W: Write,
Builder::build_from_writer
instead.Builds a CRAM writer from a writer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
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