Struct noodles_cram::data_container::Slice
source · pub struct Slice { /* private fields */ }
Expand description
A CRAM data container slice.
A slice contains a header, a core data block, and one or more external blocks. This is where the CRAM records are stored.
Implementations§
source§impl Slice
impl Slice
sourcepub fn records(
&self,
compression_header: &CompressionHeader
) -> Result<Vec<Record>>
pub fn records( &self, compression_header: &CompressionHeader ) -> Result<Vec<Record>>
Reads and returns a list of raw records in this slice.
§Examples
use noodles_cram as cram;
let data = [];
let mut reader = cram::io::Reader::new(&data[..]);
reader.read_header()?;
while let Some(container) = reader.read_data_container()? {
for slice in container.slices() {
let records = slice.records(container.compression_header())?;
// ...
}
}
sourcepub fn resolve_records(
&self,
reference_sequence_repository: &Repository,
header: &Header,
compression_header: &CompressionHeader,
records: &mut [Record]
) -> Result<()>
pub fn resolve_records( &self, reference_sequence_repository: &Repository, header: &Header, compression_header: &CompressionHeader, records: &mut [Record] ) -> Result<()>
Resolves records.
This resolves mates, read names, bases, and quality scores.
Trait Implementations§
source§impl PartialEq for Slice
impl PartialEq for Slice
impl Eq for Slice
impl StructuralPartialEq for Slice
Auto Trait Implementations§
impl !Freeze for Slice
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnwindSafe for Slice
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.