def checkPrefix(mainList, inputGTParams):
    """ Compares two input GTs to see if they have the same prefix. Returns the index in the internal list of GTs of the match
    or -1 in case of no match. """
    if inputGTParams.find("_") == -1:
        raise Exception("Invalid GT name. It does not contain an _, it cannot be used for replacements.")
    prefix = inputGTParams.split("_")[0]
    for i in range(0, len(mainList)):
        if mainList[i].split("_")[0] == prefix:
            return i
    return -1