pub struct Record(/* private fields */);
Expand description
A BAM record.
Implementations§
Source§impl Record
impl Record
Sourcepub fn reference_sequence_id(&self) -> Option<Result<usize>>
pub fn reference_sequence_id(&self) -> Option<Result<usize>>
Returns the reference sequence ID.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.reference_sequence_id().is_none());
Sourcepub fn alignment_start(&self) -> Option<Result<Position>>
pub fn alignment_start(&self) -> Option<Result<Position>>
Returns the alignment start.
This position is 1-based, inclusive.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.alignment_start().is_none());
Sourcepub fn mapping_quality(&self) -> Option<MappingQuality>
pub fn mapping_quality(&self) -> Option<MappingQuality>
Returns the mapping quality.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.mapping_quality().is_none());
Sourcepub fn flags(&self) -> Flags
pub fn flags(&self) -> Flags
Returns the flags.
§Examples
use noodles_bam as bam;
use noodles_sam::alignment::record::Flags;
let record = bam::Record::default();
assert_eq!(Flags::from(record.flags()), Flags::UNMAPPED);
Sourcepub fn mate_reference_sequence_id(&self) -> Option<Result<usize>>
pub fn mate_reference_sequence_id(&self) -> Option<Result<usize>>
Returns the mate reference sequence ID.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.mate_reference_sequence_id().is_none());
Sourcepub fn mate_alignment_start(&self) -> Option<Result<Position>>
pub fn mate_alignment_start(&self) -> Option<Result<Position>>
Returns the mate alignment start.
This position is 1-based, inclusive.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.mate_alignment_start().is_none());
Sourcepub fn template_length(&self) -> i32
pub fn template_length(&self) -> i32
Returns the template length.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert_eq!(i32::from(record.template_length()), 0);
Sourcepub fn name(&self) -> Option<&BStr>
pub fn name(&self) -> Option<&BStr>
Returns the read name.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.name().is_none());
Sourcepub fn cigar(&self) -> Cigar<'_>
pub fn cigar(&self) -> Cigar<'_>
Returns the CIGAR operations.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.cigar().is_empty());
Sourcepub fn sequence(&self) -> Sequence<'_>
pub fn sequence(&self) -> Sequence<'_>
Returns the sequence.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.sequence().is_empty());
Sourcepub fn quality_scores(&self) -> QualityScores<'_>
pub fn quality_scores(&self) -> QualityScores<'_>
Returns the quality scores.
§Examples
use noodles_bam as bam;
let record = bam::Record::default();
assert!(record.quality_scores().is_empty());
Trait Implementations§
Source§impl Record for Record
impl Record for Record
Source§fn reference_sequence_id<'r, 'h: 'r>(
&'r self,
_: &'h Header,
) -> Option<Result<usize>>
fn reference_sequence_id<'r, 'h: 'r>( &'r self, _: &'h Header, ) -> Option<Result<usize>>
Returns the reference sequence ID.
Source§fn mapping_quality(&self) -> Option<Result<MappingQuality>>
fn mapping_quality(&self) -> Option<Result<MappingQuality>>
Returns the mapping quality.
Source§fn mate_reference_sequence_id<'r, 'h: 'r>(
&'r self,
_: &'h Header,
) -> Option<Result<usize>>
fn mate_reference_sequence_id<'r, 'h: 'r>( &'r self, _: &'h Header, ) -> Option<Result<usize>>
Returns the mate reference sequence ID.
Source§fn mate_alignment_start(&self) -> Option<Result<Position>>
fn mate_alignment_start(&self) -> Option<Result<Position>>
Returns the mate alignment start. Read more
Source§fn template_length(&self) -> Result<i32>
fn template_length(&self) -> Result<i32>
Returns the template length.
Source§fn quality_scores(&self) -> Box<dyn QualityScores + '_>
fn quality_scores(&self) -> Box<dyn QualityScores + '_>
Returns the quality scores.
Source§fn reference_sequence<'h>(
&self,
header: &'h Header,
) -> Option<Result<(&'h BStr, &'h Map<ReferenceSequence>), Error>>
fn reference_sequence<'h>( &self, header: &'h Header, ) -> Option<Result<(&'h BStr, &'h Map<ReferenceSequence>), Error>>
Returns the associated reference sequence.
Source§fn mate_reference_sequence<'h>(
&self,
header: &'h Header,
) -> Option<Result<(&'h BStr, &'h Map<ReferenceSequence>), Error>>
fn mate_reference_sequence<'h>( &self, header: &'h Header, ) -> Option<Result<(&'h BStr, &'h Map<ReferenceSequence>), Error>>
Returns the associated mate reference sequence.
impl Eq for Record
impl StructuralPartialEq for Record
Auto Trait Implementations§
impl Freeze for Record
impl RefUnwindSafe for Record
impl Send for Record
impl Sync for Record
impl Unpin for Record
impl UnwindSafe for Record
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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.