@@ -0,0 +1,865 @@
+from indra.databases import chebi_client%0Afrom indra.ontology.standardize import standardize_db_refs%0A%0A%0Aminerva_to_indra_map = %7B%0A    'UNIPROT': 'UP',%0A    'REFSEQ': 'REFSEQ_PROT',%0A    'ENTREZ': 'EGID',%0A    'INTERPRO': 'IP',%0A%7D%0A%0A%0Adef fix_id_standards(db_ns, db_id):%0A    if db_ns == 'CHEBI':%0A        if not db_id.startswith('CHEBI:'):%0A            db_id = f'CHEBI:%7Bdb_id%7D'%0A        db_id = chebi_client.get_primary_id(db_id)%0A    elif db_ns == 'HGNC' and db_id.startswith('HGNC:'):%0A        db_id = db_id%5B5:%5D%0A    return db_ns, db_id%0A%0A%0Adef indra_db_refs_from_minerva_refs(refs):%0A    db_refs = %7B%7D%0A    for db_ns, db_id in refs:%0A        db_ns = minerva_to_indra_map%5Bdb_ns%5D %5C%0A            if db_ns in minerva_to_indra_map else db_ns%0A        db_nbs, db_id = fix_id_standards(db_ns, db_id)%0A        db_refs%5Bdb_ns%5D = db_id%0A    db_refs = standardize_db_refs(db_refs)%0A    return db_refs%0A

Move relevant parts of ID mapping from covid-19