def index_fasta( f ):
    """
    Makes a simple index for a FastA file
    :param f: an opened fasta file
    :return: a dict with the chromosomes as keys and the tell positions as values
    """
    lpos = f.tell()
    rval  = {}

    # for each line in the fasta
    l  = f.readline()
    while l != "" :
        # remove the endline
        l = l.rstrip()

        # add the previous tell to the dict if we found a new identifier
        if l[0] == '>':
            rval[ l[1:] ] = lpos

        # prepare for the next line
        lpos = f.tell()
        l = f.readline()

    # returns the index
    return rval