def mutation_type(alleles):
    """
    Is this mutation a transition (A <-> G and C <-> T) or a transversion (everything else).
    """
    alleles = set([a.upper() for a in alleles])
    assert len(alleles) == 2 and alleles.issubset({"A", "C", "G", "T", "N"})
    return "ts" if alleles in [{"A", "G"}, {"C", "T"}] else "tv"