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
sourceimpl 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::Reader::new(&data[..]);
reader.read_file_definition()?;
reader.read_file_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
impl Eq for Slice
impl StructuralEq for Slice
impl StructuralPartialEq for Slice
Auto Trait Implementations
impl RefUnwindSafe for Slice
impl Send for Slice
impl Sync for Slice
impl Unpin for Slice
impl UnwindSafe for Slice
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more