Struct rust_htslib::bam::record::Record [−][src]
pub struct Record { pub inner: bam1_t, // some fields omitted }
Expand description
A BAM record.
Fields
inner: bam1_t
Implementations
Unset all flags.
Get insert size.
Set insert size.
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
.
Get reference to raw cigar string representation (as stored in BAM file).
Usually, the method Record::cigar
should be used instead.
Return unpacked cigar string. This will create a fresh copy the Cigar data.
Decode the cigar string and cache it inside the Record
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).
Look up an auxiliary field by its tag.
Only the first two bytes of a given tag are used for the look-up of a field.
See Aux
for more details.
Returns an iterator over the auxiliary fields of the record.
When an error occurs, the Err
variant will be returned
and the iterator will not be able to advance anymore.
Infer read pair orientation from record. Returns SequenceReadPairOrientation::None
if record
is not paired, mates are not mapping to the same contig, or mates start at the
same position.
Trait Implementations
Return contig name. Panics if record does not know its header (which happens if it has not been read from a file).
Return genomic range covered by alignment. Panics if Record::cache_cigar()
has not been called first or Record::pos()
is less than zero.
Return true if interval contains given locus.
fn aligned_blocks(&self) -> IterAlignedBlocksⓘNotable traits for IterAlignedBlocks
impl Iterator for IterAlignedBlocks type Item = [i64; 2];
fn aligned_blocks(&self) -> IterAlignedBlocksⓘNotable traits for IterAlignedBlocks
impl Iterator for IterAlignedBlocks type Item = [i64; 2];
iterator over start and end positions of aligned gapless blocks Read more
fn introns(&self) -> IterIntronsⓘNotable traits for IterIntrons
impl Iterator for IterIntrons type Item = [i64; 2];
fn introns(&self) -> IterIntronsⓘNotable traits for IterIntrons
impl Iterator for IterIntrons type Item = [i64; 2];
This scans the CIGAR for reference skips and reports their positions. It does not inspect the reported regions for actual splice sites. pysam: get_introns Read more
fn aligned_block_pairs(&self) -> IterAlignedBlockPairsⓘ
fn aligned_block_pairs(&self) -> IterAlignedBlockPairsⓘ
Iter over <([read_start, read_stop], [genome_start, genome_stop]) blocks of continously aligned reads. Read more
fn aligned_pairs(&self) -> IterAlignedPairsⓘNotable traits for IterAlignedPairs
impl Iterator for IterAlignedPairs type Item = [i64; 2];
fn aligned_pairs(&self) -> IterAlignedPairsⓘNotable traits for IterAlignedPairs
impl Iterator for IterAlignedPairs type Item = [i64; 2];
iter aligned read and reference positions on a basepair level Read more
fn aligned_pairs_full(&self) -> IterAlignedPairsFullⓘNotable traits for IterAlignedPairsFull
impl Iterator for IterAlignedPairsFull type Item = [Option<i64>; 2];
fn aligned_pairs_full(&self) -> IterAlignedPairsFullⓘNotable traits for IterAlignedPairsFull
impl Iterator for IterAlignedPairsFull type Item = [Option<i64>; 2];
iter list of read and reference positions on a basepair level. Read more
the number of nucleotides covered by each Cigar::* variant. Read more
the number of occurrences of each each Cigar::* variant Read more
iter over reference positions that this read aligns to Read more
iter over reference positions that this read aligns to Read more
left most aligned reference position of the read on the reference genome.
right most aligned reference position of the read on the reference genome.
infer the query length from the cigar string, optionally include hard clipped bases Read more
Auto Trait Implementations
Blanket Implementations
Mutably borrows from an owned value. Read more