def _parse_qblast_ref_page(handle):
    """Return tuple of RID, RTOE."""
    s = handle.read()
    i = s.find("RID =")
    j = s.find("\n", i)
    rid = s[i+len("RID ="):j].strip()

    i = s.find("RTOE =")
    j = s.find("\n", i)
    rtoe = s[i+len("RTOE ="):j].strip()
    return rid, int(rtoe)