Allows modification of the read in-place even if it's slice-backed.
Comparison function for 'coordinate' sorting order (returns whether first read is 'less' than second)
Comparison function for 'queryname' sorting order (return whether first read is 'less' than second)
Comparison function for 'queryname' sorting order setting mates of the same alignments adjacent with the first mate coming before the second mate
Comparison function for 'queryname' sorting order as in Samtools (returns whether first read is 'less' than second in a 'mixed' order, i.e. numbers inside the strings are compared by their integer value)
Comparison function for 'queryname' sorting order as in Samtools setting mates of the same alignments adjacent with the first mate coming before the second mate
Lazy tag storage.
BAM record representation.
BamRead wrapper which precomputes end_position = position + basesCovered().
Allows modification of the read in-place even if it's slice-backed.
import std.conv; ... assert(!read.is_unmapped); // check flag assert(read.ref_id != -1); // access field int edit_distance = to!int(read["NM"]); // access tag read["NM"] = 0; // modify tag read["NM"] = null; // remove tag read["NM"] = null; // no-op foreach (tag, value; read) // iterate over tags writeln(tag, " ", value); // and print their keys and values read.sequence = "AGCAGACTACGTGTGCATAC"; // sets base qualities to 255 assert(read.base_qualities[0] == 255); read.is_unmapped = true; // set flag read.ref_id = -1; // set field
BamRead type provides convenient interface for working with SAM/BAM records.
All flags, tags, and fields can be accessed and modified.