[−][src]Struct rust_htslib::bam::record::Record
A BAM record.
Fields
inner: bam1_t
Implementations
impl Record
[src]
pub fn new() -> Self
[src]
Create an empty BAM record.
pub fn from_inner(from: *mut bam1_t) -> Self
[src]
pub fn from_sam(header_view: &HeaderView, sam: &[u8]) -> Result<Record>
[src]
pub fn set_header(&mut self, header: Rc<HeaderView>)
[src]
pub fn inner_mut(&mut self) -> &mut bam1_t
[src]
pub fn inner(&self) -> &bam1_t
[src]
pub fn tid(&self) -> i32
[src]
Get target id.
pub fn set_tid(&mut self, tid: i32)
[src]
Set target id.
pub fn pos(&self) -> i64
[src]
Get position (0-based).
pub fn set_pos(&mut self, pos: i64)
[src]
Set position (0-based).
pub fn bin(&self) -> u16
[src]
pub fn set_bin(&mut self, bin: u16)
[src]
pub fn mapq(&self) -> u8
[src]
Get MAPQ.
pub fn set_mapq(&mut self, mapq: u8)
[src]
Set MAPQ.
pub fn strand(&mut self) -> ReqStrand
[src]
Get strand information from record flags.
pub fn flags(&self) -> u16
[src]
Get raw flags.
pub fn set_flags(&mut self, flags: u16)
[src]
Set raw flags.
pub fn unset_flags(&mut self)
[src]
Unset all flags.
pub fn mtid(&self) -> i32
[src]
Get target id of mate.
pub fn set_mtid(&mut self, mtid: i32)
[src]
Set target id of mate.
pub fn mpos(&self) -> i64
[src]
Get mate position.
pub fn set_mpos(&mut self, mpos: i64)
[src]
Set mate position.
pub fn insert_size(&self) -> i64
[src]
Get insert size.
pub fn set_insert_size(&mut self, insert_size: i64)
[src]
Set insert size.
pub fn qname(&self) -> &[u8]
[src]
Get qname (read name). Complexity: O(1).
pub fn set_data(&mut self, new_data: &[u8])
[src]
Set the variable length data buffer
pub fn set(
&mut self,
qname: &[u8],
cigar: Option<&CigarString>,
seq: &[u8],
qual: &[u8]
)
[src]
&mut self,
qname: &[u8],
cigar: Option<&CigarString>,
seq: &[u8],
qual: &[u8]
)
Set variable length data (qname, cigar, seq, qual).
The aux data is left unchanged.
qual
is Phred-scaled quality values, without any offset.
NOTE: seq.len() must equal qual.len() or this method
will panic. If you don't have quality values use
let quals = vec![ 255 as u8; seq.len()];
as a placeholder that will
be recognized as missing QVs by samtools
.
pub fn set_qname(&mut self, new_qname: &[u8])
[src]
Replace current qname with a new one.
pub fn cigar_len(&self) -> usize
[src]
pub fn raw_cigar(&self) -> &[u32]
[src]
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]
Return unpacked cigar string. This will create a fresh copy the Cigar data.
pub fn cigar_cached(&self) -> Option<&CigarStringView>
[src]
pub fn cache_cigar(&mut self)
[src]
Decode the cigar string and cache it inside the Record
pub fn seq_len(&self) -> usize
[src]
pub fn seq(&self) -> Seq<'_>
[src]
Get read sequence. Complexity: O(1).
pub fn qual(&self) -> &[u8]
[src]
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]
Get auxiliary data (tags).
pub fn push_aux(&mut self, tag: &[u8], value: &Aux<'_>)
[src]
Add auxiliary data.
pub fn remove_aux(&mut self, tag: &[u8]) -> bool
[src]
pub fn is_paired(&self) -> bool
[src]
pub fn set_paired(&mut self)
[src]
pub fn unset_paired(&mut self)
[src]
pub fn is_proper_pair(&self) -> bool
[src]
pub fn set_proper_pair(&mut self)
[src]
pub fn unset_proper_pair(&mut self)
[src]
pub fn is_unmapped(&self) -> bool
[src]
pub fn set_unmapped(&mut self)
[src]
pub fn unset_unmapped(&mut self)
[src]
pub fn is_mate_unmapped(&self) -> bool
[src]
pub fn set_mate_unmapped(&mut self)
[src]
pub fn unset_mate_unmapped(&mut self)
[src]
pub fn is_reverse(&self) -> bool
[src]
pub fn set_reverse(&mut self)
[src]
pub fn unset_reverse(&mut self)
[src]
pub fn is_mate_reverse(&self) -> bool
[src]
pub fn set_mate_reverse(&mut self)
[src]
pub fn unset_mate_reverse(&mut self)
[src]
pub fn is_first_in_template(&self) -> bool
[src]
pub fn set_first_in_template(&mut self)
[src]
pub fn unset_first_in_template(&mut self)
[src]
pub fn is_last_in_template(&self) -> bool
[src]
pub fn set_last_in_template(&mut self)
[src]
pub fn unset_last_in_template(&mut self)
[src]
pub fn is_secondary(&self) -> bool
[src]
pub fn set_secondary(&mut self)
[src]
pub fn unset_secondary(&mut self)
[src]
pub fn is_quality_check_failed(&self) -> bool
[src]
pub fn set_quality_check_failed(&mut self)
[src]
pub fn unset_quality_check_failed(&mut self)
[src]
pub fn is_duplicate(&self) -> bool
[src]
pub fn set_duplicate(&mut self)
[src]
pub fn unset_duplicate(&mut self)
[src]
pub fn is_supplementary(&self) -> bool
[src]
pub fn set_supplementary(&mut self)
[src]
pub fn unset_supplementary(&mut self)
[src]
Trait Implementations
impl AbstractInterval for Record
[src]
pub fn contig(&self) -> &str
[src]
Return contig name. Panics if record does not know its header (which happens if it has not been read from a file).
pub fn range(&self) -> Range<Position>
[src]
Return genomic range covered by alignment. Panics if Record::cache_cigar()
has not been called first or Record::pos()
is less than zero.
impl BamRecordExtensions for Record
[src]
pub fn aligned_blocks(&self) -> IterAlignedBlocksⓘNotable traits for IterAlignedBlocks
impl Iterator for IterAlignedBlocks type Item = [i64; 2];
[src]
Notable traits for IterAlignedBlocks
impl Iterator for IterAlignedBlocks type Item = [i64; 2];
pub fn introns(&self) -> IterIntronsⓘNotable traits for IterIntrons
impl Iterator for IterIntrons type Item = [i64; 2];
[src]
Notable traits for IterIntrons
impl Iterator for IterIntrons type Item = [i64; 2];
pub fn aligned_block_pairs(&self) -> IterAlignedBlockPairsⓘ
[src]
pub fn aligned_pairs(&self) -> IterAlignedPairsⓘNotable traits for IterAlignedPairs
impl Iterator for IterAlignedPairs type Item = [i64; 2];
[src]
Notable traits for IterAlignedPairs
impl Iterator for IterAlignedPairs type Item = [i64; 2];
pub fn aligned_pairs_full(&self) -> IterAlignedPairsFullⓘNotable traits for IterAlignedPairsFull
impl Iterator for IterAlignedPairsFull type Item = [Option<i64>; 2];
[src]
Notable traits for IterAlignedPairsFull
impl Iterator for IterAlignedPairsFull type Item = [Option<i64>; 2];
pub fn cigar_stats_nucleotides(&self) -> HashMap<Cigar, i32>
[src]
pub fn cigar_stats_blocks(&self) -> HashMap<Cigar, i32>
[src]
pub fn reference_positions(&self) -> Box<dyn Iterator<Item = i64>>
[src]
pub fn reference_positions_full(&self) -> Box<dyn Iterator<Item = Option<i64>>>
[src]
pub fn reference_start(&self) -> i64
[src]
pub fn reference_end(&self) -> i64
[src]
pub fn seq_len_from_cigar(&self, include_hard_clip: bool) -> usize
[src]
impl Clone for Record
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Record
[src]
impl Default for Record
[src]
impl Drop for Record
[src]
impl Eq for Record
[src]
impl PartialEq<Record> for Record
[src]
pub fn eq(&self, other: &Record) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Send for Record
[src]
impl SequenceRead for Record
[src]
pub fn name(&self) -> &[u8]
[src]
pub fn base(&self, i: usize) -> u8
[src]
pub fn base_qual(&self, i: usize) -> u8
[src]
pub fn len(&self) -> usize
[src]
impl Sync for Record
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,