def make_protein_index(proteins):
    """Indexes proteins
    """
    prot_index = {}
    skip = set(['sp', 'tr', 'gi', 'ref', ''])
    for i, p in enumerate(proteins):
        accs = p.accession.split('|')
        for acc in accs:
            if acc in skip:
                continue
            prot_index[acc] = i
    return prot_index