Given a variant, split the PileupCollection based on whether it the
        data supports the reference allele, the alternate allele, or neither.

        Parameters
        ----------
        variant : Variant
            The variant. Must have fields 'locus', 'ref', and 'alt'.

        Returns
        ----------
        A MatchingEvidence named tuple with fields (ref, alt, other),
        each of which is a string -> PileupCollection dict mapping alleles
        to the PileupCollection of evidence supporting them.

def group_by_match(self, variant):
        '''
        Given a variant, split the PileupCollection based on whether it the
        data supports the reference allele, the alternate allele, or neither.

        Parameters
        ----------
        variant : Variant
            The variant. Must have fields 'locus', 'ref', and 'alt'.

        Returns
        ----------
        A MatchingEvidence named tuple with fields (ref, alt, other),
        each of which is a string -> PileupCollection dict mapping alleles
        to the PileupCollection of evidence supporting them.
        '''
        locus = to_locus(variant)
        if len(variant.ref) != len(locus.positions):
            logging.warning(
                "Ref is length %d but locus has %d bases in variant: %s" %
                (len(variant.ref), len(locus.positions), str(variant)))

        alleles_dict = self.group_by_allele(locus)
        single_base_loci = [
            Locus.from_interbase_coordinates(locus.contig, position)
            for position in locus.positions
        ]
        empty_pileups = dict(
            (locus, Pileup(locus=locus, elements=[]))
            for locus in single_base_loci)
        empty_collection = PileupCollection(pileups=empty_pileups, parent=self)

        ref = {variant.ref: alleles_dict.pop(variant.ref, empty_collection)}
        alt = {variant.alt: alleles_dict.pop(variant.alt, empty_collection)}
        other = alleles_dict

        # TODO: consider end of read issues for insertions
        return MatchingEvidence(ref, alt, other)