Struct noodles_cram::record::Record
source · [−]pub struct Record { /* private fields */ }
Expand description
A CRAM record.
Implementations
sourceimpl Record
impl Record
sourcepub fn try_from_alignment_record<R>(header: &Header, record: &R) -> Result<Self> where
R: AlignmentRecord + ?Sized,
pub fn try_from_alignment_record<R>(header: &Header, record: &R) -> Result<Self> where
R: AlignmentRecord + ?Sized,
Converts an alignment record to a CRAM record.
sourcepub fn try_into_sam_record(&self, header: &Header) -> Result<Record>
pub fn try_into_sam_record(&self, header: &Header) -> Result<Record>
Converts this CRAM record to a SAM record.
This assumes this record is fully resolved.
sourceimpl Record
impl Record
sourcepub fn cram_flags(&self) -> Flags
pub fn cram_flags(&self) -> Flags
Returns the CRAM flags.
This is also called the CRAM bit flags or compression bit flags.
sourcepub fn reference_sequence_id(&self) -> Option<usize>
pub fn reference_sequence_id(&self) -> Option<usize>
Returns the reference sequence ID.
This is also called the reference ID. It is the position of the reference sequence in the SAM header.
sourcepub fn read_length(&self) -> usize
pub fn read_length(&self) -> usize
Returns the read length.
sourcepub fn read_group_id(&self) -> Option<usize>
pub fn read_group_id(&self) -> Option<usize>
Returns the read group ID.
This is also simply called the read group. It is the position of the read group in the SAM header.
sourcepub fn next_mate_flags(&self) -> NextMateFlags
pub fn next_mate_flags(&self) -> NextMateFlags
Returns the next mate flags.
This is also call the next mate bit flags.
sourcepub fn next_fragment_reference_sequence_id(&self) -> Option<usize>
pub fn next_fragment_reference_sequence_id(&self) -> Option<usize>
Returns the reference sequence ID of the next fragment.
It is the position of the reference sequence in the SAM header.
sourcepub fn next_mate_alignment_start(&self) -> Option<Position>
pub fn next_mate_alignment_start(&self) -> Option<Position>
Returns the alignment start position of the next mate.
This value is 1-based.
sourcepub fn template_size(&self) -> i32
pub fn template_size(&self) -> i32
Returns the template size.
sourcepub fn distance_to_next_fragment(&self) -> Option<usize>
pub fn distance_to_next_fragment(&self) -> Option<usize>
Returns the distance to the next fragment.
This is the number of records to the next fragment within a slice.
Returns the tag dictionary.
Trait Implementations
sourceimpl AlignmentRecord for Record
impl AlignmentRecord for Record
sourcefn reference_sequence<'rs>(
&self,
reference_sequences: &'rs ReferenceSequences
) -> Option<Result<&'rs ReferenceSequence>>
fn reference_sequence<'rs>(
&self,
reference_sequences: &'rs ReferenceSequences
) -> Option<Result<&'rs ReferenceSequence>>
Returns the associated reference sequence.
sourcefn alignment_start(&self) -> Option<Position>
fn alignment_start(&self) -> Option<Position>
Returns the start position.
sourcefn alignment_span(&self) -> usize
fn alignment_span(&self) -> usize
Calculates the alignment span over the reference sequence.
sourcefn mapping_quality(&self) -> Option<MappingQuality>
fn mapping_quality(&self) -> Option<MappingQuality>
Returns the mapping quality.
sourcefn mate_reference_sequence<'rs>(
&self,
reference_sequences: &'rs ReferenceSequences
) -> Option<Result<&'rs ReferenceSequence>>
fn mate_reference_sequence<'rs>(
&self,
reference_sequences: &'rs ReferenceSequences
) -> Option<Result<&'rs ReferenceSequence>>
Returns the associated reference sequence of the mate.
sourcefn mate_alignment_start(&self) -> Option<Position>
fn mate_alignment_start(&self) -> Option<Position>
Returns the start position of the mate.
sourcefn template_length(&self) -> i32
fn template_length(&self) -> i32
Returns the template length.
sourcefn quality_scores(&self) -> &QualityScores
fn quality_scores(&self) -> &QualityScores
Returns the quality scores.
sourcefn alignment_end(&self) -> Option<Position>
fn alignment_end(&self) -> Option<Position>
Calculates the end position. Read more
impl StructuralPartialEq for Record
Auto Trait Implementations
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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<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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more