def get_motif_proteins(meme_db_file):
  """ Hash motif_id's to protein names using the MEME DB file """
  motif_protein = {}
  for line in open(meme_db_file):
    a = line.split()
    if len(a) > 0 and a[0] == 'MOTIF':
      if a[2][0] == '(':
        motif_protein[a[1]] = a[2][1:a[2].find(')')]
      else:
        motif_protein[a[1]] = a[2]
  return motif_protein