pub struct Builder { /* private fields */ }
Expand description
An indexed CRAM reader 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::indexed_reader::Builder;
use noodles_fasta as fasta;
let reference_sequence_repository = fasta::Repository::default();
let builder = Builder::default()
.set_reference_sequence_repository(reference_sequence_repository);
Sourcepub fn set_index(self, index: Index) -> Self
pub fn set_index(self, index: Index) -> Self
Sets an index.
§Examples
use noodles_cram::{crai, io::indexed_reader::Builder};
let index = crai::Index::default();
let builder = Builder::default().set_index(index);
Sourcepub fn build_from_path<P>(self, src: P) -> Result<IndexedReader<File>>
pub fn build_from_path<P>(self, src: P) -> Result<IndexedReader<File>>
Builds an indexed CRAM reader from a path.
If no index is set, this will attempt to read an associated index at <src>.crai
.
§Examples
use noodles_cram::io::indexed_reader::Builder;
let builder = Builder::default().build_from_path("sample.cram")?;
Sourcepub fn build_from_reader<R>(self, reader: R) -> Result<IndexedReader<R>>where
R: Read,
pub fn build_from_reader<R>(self, reader: R) -> Result<IndexedReader<R>>where
R: Read,
Builds an indexed CRAM reader from a reader.
§Examples
use noodles_cram::{crai, io::indexed_reader::Builder};
let index = crai::Index::default();
let builder = Builder::default()
.set_index(index)
.build_from_reader(io::empty())?;
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