According to the spec a template is "A DNA/RNA sequence part of which is sequenced on a sequencing machine or assembled from raw sequences." But what does that mean? The first field "QNAME" is explained as "Query template NAME." I know that usually means read name, so what does "template" have to do with it? Also from the spec, "RNEXT: Reference sequence name of the primary alignment of the NEXT read in the template. For the last read, the next read is the first read in the template. " Does template just me "file" then? But then a template can be "single-segment," in which case TLEN is set to 0. Try as I might, I can't make sense of that. Your explanation will be much appreciated.
<p>In most cases, templates are reads or pairs of them. However, you could imagine a case where you assembled reads into contigs and then aligned those against a reference genome. Then the template would be the contig.</p>

<p>RNEXT is the name of the chromosome or contig to which the next template in a pair (or larger group) aligns.</p>
