Construct blank SAMRecord with empty backing bam1_t
Construct SAMRecord from supplied bam1_t
Undocumented in source.
Create cigar from bam1_t record
Assign a cigar string
bitwise flag
get aligned coordinates per each cigar op
get aligned coordinates per each cigar op within range range is 0-based half open using chromosomal coordinates
get a range of aligned read and reference positions this is meant to recreate functionality from pysam: https://pysam.readthedocs.io/en/latest/api.html#pysam.AlignedSegment.get_aligned_pairs range is 0-based half open using chromosomal coordinates
get a range of aligned read and reference positions this is meant to recreate functionality from pysam: https://pysam.readthedocs.io/en/latest/api.html#pysam.AlignedSegment.get_aligned_pairs
Presumably Insert size, but is undocumented. Per samtools source, is measured 5' to 5' https://github.com/samtools/samtools/blob/bd1a409aa750d25d70a093405d174db8709a3f2c/bam_mate.c#L320
is read mapped?
is read mate mapped?
is read paired?
is read reversed? bool bam_is_rev(bam1_t *b) { return ( ((*b).core.flag & BAM_FREVERSE) != 0 ); }
is read secondary?
is read supplementary?
number of EXTRA trailing \0 in qname; 0 <= l_extranul <= 3, see l_qname. Never set directly.
length of query name. Terminated by 1-4 \0, see l_extranul. Never set directly.
query (and quality string) length
0-based leftmost coordinate of next read in template
is mate reversed? bool bam_is_mrev(bam1_t *b) { return( ((*b).core.flag & BAM_FMREVERSE) != 0); }
chromosome ID of next read in template, defined by bam_hdr_t
Get aux tag from bam1_t record and return a TagValue
Assign a tag key value pair
Assign a tag key array pair
0-based leftmost coordinate
Add qscore sequence given that it is the same length as the bam sequence
Return char array of the qscores see samtools/sam_view.c: get_quality
Add qscore sequence given that it is the same length as the bam sequence
mapping quality
auto bam_get_qname(bam1_t *b) { return (cast(char*)(*b).data); }
Set query name
Return char array of the sequence see samtools/sam_view.c: get_read
Assigns sequence and resets quality score
Return read strand + or - (as char)
chromosome ID, defined by bam_hdr_t
Undocumented in source.
Encapsulates a SAM/BAM/CRAM record, using the bam1_t type for memory efficiency, and the htslib helper functions for speed.