def read_phage_locations(locf, verbose=False):
    """
    Read the phage locations. Expects tab separated text of contig, start, stop, number of genes
    :param locf: the locations file
    :param verbose: more output
    :return: a dict of all the contigs that have prophages, and then tuples of [start, stop, number of genes]
    """

    contigs = {}
    with open(locf, 'r') as f:
        for l in f:
            p=l.strip().split("\t")
            if p[1] == 'Start':
                continue
            if p[1] > p[2]:
                (p[1], p[2]) = (p[2], p[1])
            if p[0] not in contigs:
                contigs[p[0]] = []
            contigs[p[0]].append((int(p[1]), int(p[2]), p[3]))
    return contigs