Struct rust_htslib::bam::record::Record [−][src]
A BAM record.
Fields
inner: *mut bam1_t
Methods
impl Record
[src]
impl Record
pub fn new() -> Self
[src]
pub fn new() -> Self
Create an empty BAM record.
pub fn from_inner(inner: *mut bam1_t) -> Self
[src]
pub fn from_inner(inner: *mut bam1_t) -> Self
pub fn from_sam(
header_view: &HeaderView,
sam: &[u8]
) -> Result<Record, ReadError>
[src]
pub fn from_sam(
header_view: &HeaderView,
sam: &[u8]
) -> Result<Record, ReadError>
pub fn inner_mut(&mut self) -> &mut bam1_t
[src]
pub fn inner_mut(&mut self) -> &mut bam1_t
pub fn inner(&self) -> &bam1_t
[src]
pub fn inner(&self) -> &bam1_t
pub fn tid(&self) -> i32
[src]
pub fn tid(&self) -> i32
Get target id.
pub fn set_tid(&mut self, tid: i32)
[src]
pub fn set_tid(&mut self, tid: i32)
Set target id.
pub fn pos(&self) -> i32
[src]
pub fn pos(&self) -> i32
Get position (0-based).
pub fn set_pos(&mut self, pos: i32)
[src]
pub fn set_pos(&mut self, pos: i32)
Set position (0-based).
pub fn bin(&self) -> u16
[src]
pub fn bin(&self) -> u16
pub fn set_bin(&mut self, bin: u16)
[src]
pub fn set_bin(&mut self, bin: u16)
pub fn mapq(&self) -> u8
[src]
pub fn mapq(&self) -> u8
Get MAPQ.
pub fn set_mapq(&mut self, mapq: u8)
[src]
pub fn set_mapq(&mut self, mapq: u8)
Set MAPQ.
pub fn flags(&self) -> u16
[src]
pub fn flags(&self) -> u16
Get raw flags.
pub fn set_flags(&mut self, flags: u16)
[src]
pub fn set_flags(&mut self, flags: u16)
Set raw flags.
pub fn unset_flags(&mut self)
[src]
pub fn unset_flags(&mut self)
Unset all flags.
pub fn mtid(&self) -> i32
[src]
pub fn mtid(&self) -> i32
Get target id of mate.
pub fn set_mtid(&mut self, mtid: i32)
[src]
pub fn set_mtid(&mut self, mtid: i32)
Set target id of mate.
pub fn mpos(&self) -> i32
[src]
pub fn mpos(&self) -> i32
Get mate position.
pub fn set_mpos(&mut self, mpos: i32)
[src]
pub fn set_mpos(&mut self, mpos: i32)
Set mate position.
pub fn insert_size(&self) -> i32
[src]
pub fn insert_size(&self) -> i32
Get insert size.
pub fn set_insert_size(&mut self, insert_size: i32)
[src]
pub fn set_insert_size(&mut self, insert_size: i32)
Set insert size.
pub fn qname(&self) -> &[u8]
[src]
pub fn qname(&self) -> &[u8]
Get qname (read name). Complexity: O(1).
pub fn set_data(&mut self, new_data: &[u8])
[src]
pub fn set_data(&mut self, new_data: &[u8])
Set the variable length data buffer
pub fn set(
&mut self,
qname: &[u8],
cigar: &CigarString,
seq: &[u8],
qual: &[u8]
)
[src]
pub fn set(
&mut self,
qname: &[u8],
cigar: &CigarString,
seq: &[u8],
qual: &[u8]
)
Set variable length data (qname, cigar, seq, qual). Note: Pre-existing aux data will be invalidated if called on an existing record. For this reason, never call push_aux() before set().
pub fn set_qname(&mut self, new_qname: &[u8])
[src]
pub fn set_qname(&mut self, new_qname: &[u8])
Replace current qname with a new one. Unlike set(), this preserves all the variable length data including the aux.
pub fn raw_cigar(&self) -> &[u32]
[src]
pub fn raw_cigar(&self) -> &[u32]
Get reference to raw cigar string representation (as stored in BAM file).
Usually, the method Record::cigar
should be used instead.
pub fn cigar(&self) -> CigarStringView
[src]
pub fn cigar(&self) -> CigarStringView
Get cigar string. Complexity: O(k) with k being the length of the cigar string.
pub fn seq(&self) -> Seq
[src]
pub fn seq(&self) -> Seq
Get read sequence. Complexity: O(1).
pub fn qual(&self) -> &[u8]
[src]
pub fn qual(&self) -> &[u8]
Get base qualities (PHRED-scaled probability that base is wrong). This does not entail any offsets, hence the qualities can be used directly without e.g. subtracting 33. Complexity: O(1).
pub fn aux(&self, tag: &[u8]) -> Option<Aux>
[src]
pub fn aux(&self, tag: &[u8]) -> Option<Aux>
Get auxiliary data (tags).
pub fn push_aux(&mut self, tag: &[u8], value: &Aux) -> Result<(), AuxWriteError>
[src]
pub fn push_aux(&mut self, tag: &[u8], value: &Aux) -> Result<(), AuxWriteError>
Add auxiliary data. push_aux() should never be called before set().
pub fn remove_aux(&self, tag: &[u8]) -> bool
[src]
pub fn remove_aux(&self, tag: &[u8]) -> bool
pub fn is_paired(&self) -> bool
[src]
pub fn is_paired(&self) -> bool
pub fn set_paired(&mut self)
[src]
pub fn set_paired(&mut self)
pub fn unset_paired(&mut self)
[src]
pub fn unset_paired(&mut self)
pub fn is_proper_pair(&self) -> bool
[src]
pub fn is_proper_pair(&self) -> bool
pub fn set_proper_pair(&mut self)
[src]
pub fn set_proper_pair(&mut self)
pub fn unset_proper_pair(&mut self)
[src]
pub fn unset_proper_pair(&mut self)
pub fn is_unmapped(&self) -> bool
[src]
pub fn is_unmapped(&self) -> bool
pub fn set_unmapped(&mut self)
[src]
pub fn set_unmapped(&mut self)
pub fn unset_unmapped(&mut self)
[src]
pub fn unset_unmapped(&mut self)
pub fn is_mate_unmapped(&self) -> bool
[src]
pub fn is_mate_unmapped(&self) -> bool
pub fn set_mate_unmapped(&mut self)
[src]
pub fn set_mate_unmapped(&mut self)
pub fn unset_mate_unmapped(&mut self)
[src]
pub fn unset_mate_unmapped(&mut self)
pub fn is_reverse(&self) -> bool
[src]
pub fn is_reverse(&self) -> bool
pub fn set_reverse(&mut self)
[src]
pub fn set_reverse(&mut self)
pub fn unset_reverse(&mut self)
[src]
pub fn unset_reverse(&mut self)
pub fn is_mate_reverse(&self) -> bool
[src]
pub fn is_mate_reverse(&self) -> bool
pub fn set_mate_reverse(&mut self)
[src]
pub fn set_mate_reverse(&mut self)
pub fn unset_mate_reverse(&mut self)
[src]
pub fn unset_mate_reverse(&mut self)
pub fn is_first_in_template(&self) -> bool
[src]
pub fn is_first_in_template(&self) -> bool
pub fn set_first_in_template(&mut self)
[src]
pub fn set_first_in_template(&mut self)
pub fn unset_first_in_template(&mut self)
[src]
pub fn unset_first_in_template(&mut self)
pub fn is_last_in_template(&self) -> bool
[src]
pub fn is_last_in_template(&self) -> bool
pub fn set_last_in_template(&mut self)
[src]
pub fn set_last_in_template(&mut self)
pub fn unset_last_in_template(&mut self)
[src]
pub fn unset_last_in_template(&mut self)
pub fn is_secondary(&self) -> bool
[src]
pub fn is_secondary(&self) -> bool
pub fn set_secondary(&mut self)
[src]
pub fn set_secondary(&mut self)
pub fn unset_secondary(&mut self)
[src]
pub fn unset_secondary(&mut self)
pub fn is_quality_check_failed(&self) -> bool
[src]
pub fn is_quality_check_failed(&self) -> bool
pub fn set_quality_check_failed(&mut self)
[src]
pub fn set_quality_check_failed(&mut self)
pub fn unset_quality_check_failed(&mut self)
[src]
pub fn unset_quality_check_failed(&mut self)
pub fn is_duplicate(&self) -> bool
[src]
pub fn is_duplicate(&self) -> bool
pub fn set_duplicate(&mut self)
[src]
pub fn set_duplicate(&mut self)
pub fn unset_duplicate(&mut self)
[src]
pub fn unset_duplicate(&mut self)
pub fn is_supplementary(&self) -> bool
[src]
pub fn is_supplementary(&self) -> bool
pub fn set_supplementary(&mut self)
[src]
pub fn set_supplementary(&mut self)
pub fn unset_supplementary(&mut self)
[src]
pub fn unset_supplementary(&mut self)
Trait Implementations
impl Send for Record
[src]
impl Send for Record
impl Sync for Record
[src]
impl Sync for Record
impl Clone for Record
[src]
impl Clone for Record
fn clone(&self) -> Self
[src]
fn clone(&self) -> Self
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for Record
[src]
impl PartialEq for Record
fn eq(&self, other: &Record) -> bool
[src]
fn eq(&self, other: &Record) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for Record
[src]
impl Eq for Record
impl Debug for Record
[src]
impl Debug for Record
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Drop for Record
[src]
impl Drop for Record