@staticmethod
def is_taggable(r):
    """
        Decide if a read should be the source of a tag.

        :param r: AlignedSegment
        :type r: pysam.Alignedread
        """
    return (not r.is_unmapped and not r.is_secondary and not r.
        is_supplementary and not r.is_qcfail)
