Cigar

Represents a CIGAR string as an array of CigarOps.

https://samtools.github.io/hts-specs/SAMv1.pdf §1.4.6

In many cases will represent a slice or reference to underlying cigar data in the bam record UNLESS it is copied with .dup or one of the assignment methods.

Constructors

this
this(Bam1 b)

Construct Cigar from SAMRecord

this
this(uint* cigar, uint length)

Construct Cigar from raw data

this
this(CigarOp[] ops)

Construct Cigar from an array of CIGAR ops

Members

Aliases

alignedLength
alias alignedLength = refBasesCovered

previous alignedLength function had a bug and it is just a duplicate of ref_bases_covered

ref_bases_covered
deprecated alias ref_bases_covered = refBasesCovered
Undocumented in source.

Functions

dup
auto dup()

copy cigar

is_null
bool is_null()

null CIGAR -- don't read!

length
auto length()

get length of cigar

length
void length(T len)

set length of cigar

opApply
int opApply(int delegate(ref CigarOp) dg)

allow foreach on Cigar

opAssign
auto opAssign(T value)

Assign a Cigar with a Cigar Note: this is not a deep copy

opAssign
auto opAssign(T value)

Assign a Cigar with a CigarOp slice Note: this is not a deep copy

opBinary
auto opBinary(Cigar rhs)

combine Cigars

opDollar
size_t opDollar()

use $ with Cigar slicing

opIndex
auto ref opIndex(ulong i)

Get a cigar op from a single position in the Cigar string

opIndexAssign
auto opIndexAssign(CigarOp value, size_t index)

Assign a cigar op at a single position in the Cigar string

opSlice
auto opSlice()

Get a Slice of cigar ops from a range in the Cigar string

opSlice
auto opSlice(T start, T end)

Get a Slice of cigar ops from a range in the Cigar string

opSliceAssign
auto opSliceAssign(CigarOp[] values, T start, T end)

Assign a range cigar ops over a range in the Cigar string

toString
string toString()

Format Cigar struct as CIGAR string in accordance with SAM spec

Properties

refBasesCovered
int refBasesCovered [@property getter]

return the alignment length expressed by this Cigar

Meta