def make_tag(template, r):
    """Return namedtuple of read attributes."""
    return template(tid=r.tid,
                    reference_start=r.reference_start,
                    cigar=r.cigar,
                    is_reverse=r.is_reverse,
                    mapq=r.mapping_quality,
                    query_alignment_start=r.query_alignment_start,
                    query_alignment_end=r.query_alignment_end)