[][src]Struct bam::record::Flag

pub struct Flag(pub u16);

A wrapper around BAM/SAM flag.

You can check flag as record.flag().is_paired() or record.flag().0 | IS_PAIRED == 0. You can also modify the flag as record.flag_mut().set_paired(true) or record.flag_mut().0 |= IS_PAIRED.

Methods

impl Flag[src]

pub fn is_paired(&self) -> bool[src]

pub fn all_segments_aligned(&self) -> bool[src]

pub fn is_mapped(&self) -> bool[src]

pub fn mate_is_mapped(&self) -> bool[src]

pub fn is_reverse_strand(&self) -> bool[src]

pub fn mate_is_reverse_strand(&self) -> bool[src]

pub fn first_in_pair(&self) -> bool[src]

pub fn last_in_pair(&self) -> bool[src]

pub fn is_secondary(&self) -> bool[src]

pub fn fails_quality_controls(&self) -> bool[src]

Returns true if the record fails filters, such as platform/vendor quality controls.

pub fn is_duplicate(&self) -> bool[src]

Returns true if the record is PCR or optical duplicate.

pub fn is_supplementary(&self) -> bool[src]

pub fn set_paired(&mut self, paired: bool)[src]

Modifies the record flag. This function does not do any checks.

pub fn set_all_segments_aligned(&mut self, all_segments_aligned: bool)[src]

Modifies the record flag. This function does not do any checks.

pub fn set_mapped(&mut self, mapped: bool)[src]

Modifies the record flag. This function does not do any checks.

pub fn set_mate_mapped(&mut self, mate_mapped: bool)[src]

Modifies the record flag. This function does not do any checks and does not modify the mate record.

pub fn set_strand(&mut self, forward_strand: bool)[src]

Sets the record strand. Use true to set to forward strand, and false for the reverse strand.

pub fn set_mate_strand(&mut self, forward_strand: bool)[src]

Sets the strand of the mate. Use true to set to forward strand, and false for the reverse strand. This function does not do any checks and does not modify the mate record.

pub fn set_first_in_pair(&mut self, is_first: bool)[src]

Modifies the record flag. This function does not do any checks.

Use true to set the flag bit and false to unset.

pub fn set_last_in_pair(&mut self, is_last: bool)[src]

Modifies the record flag. This function does not do any checks.

Use true to set the flag bit and false to unset.

pub fn set_secondary(&mut self, is_secondary: bool)[src]

Modifies the record flag. This function does not do any checks.

Use true to set the flag bit and false to unset.

pub fn make_fail_quality_controls(&mut self, fails: bool)[src]

Sets the record flag to fail or pass filters, such as platform/vendor quality controls.

Use true to set the flag bit and false to unset.

pub fn set_duplicate(&mut self, is_duplicate: bool)[src]

Sets the record as PCR or optical duplicate.

pub fn set_supplementary(&mut self, is_supplementary: bool)[src]

Trait Implementations

impl Clone for Flag[src]

impl Copy for Flag[src]

impl Debug for Flag[src]

Auto Trait Implementations

impl Send for Flag

impl Unpin for Flag

impl Sync for Flag

impl UnwindSafe for Flag

impl RefUnwindSafe for Flag

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]