def onebp_substitutions(seq):
    """Generate all 1bp substitutions of the sequence.

    Assumes unambiguous IUPAC codes A, C, G, T only.
    """
    seq = seq.upper()
    variants = set()
    for i in range(len(seq)):
        for s in 'ACGT':
            variants.add(seq[:i] + s + seq[i + 1:])
    variants.remove(seq)
    return variants
