def hasPTC(sequence):
    """
    Determines whether a PTC exits in a sequence

    Arguments:
      sequence (str): IMGT gapped sequence in frame 1.

    Returns:
      int: negative if not PTCs, position of PTC if found.

    """
    ptcs = ("TAA", "TGA", "TAG", "TRA", "TRG", "TAR", "TGR", "TRR")
    for i in range(0, len(sequence), 3):
            if sequence[i:(i+3)] in ptcs:
                return i
    return -1