From e9aeeb30e9052a77cafebc9390be92b1c704b515 Mon Sep 17 00:00:00 2001 From: leungmanhin Date: Mon, 27 Apr 2020 17:50:17 +0800 Subject: [PATCH] Generate EvaluationLinks for OMIM and DrugBank IDs in the network --- tcmid.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tcmid.py b/tcmid.py index a353f9e..f89a7ba 100644 --- a/tcmid.py +++ b/tcmid.py @@ -189,9 +189,14 @@ def is_available(entry): full_name = "ChEBI:" + chebi_id if is_available(chebi_id) else "TCM:" + ingredient if is_available(uniprot_id): - uniprot_id_full = "Uniprot:" + uniprot_id - evalink("interacts_with", "MoleculeNode", "MoleculeNode", full_name, uniprot_id_full) + evalink("interacts_with", "MoleculeNode", "MoleculeNode", full_name, "Uniprot:" + uniprot_id) if is_available(gene): evalink("interacts_with", "MoleculeNode", "GeneNode", full_name, gene) + for omim in omim_ids: + if is_available(omim): + evalink("treats", "MoleculeNode", "ConceptNode", full_name, "OMIM:" + omim) + for drug in drug_ids: + if is_available(drug) and is_available(uniprot_id): + evalink("targets", "MoleculeNode", "MoleculeNode", "DrugBank:" + drug, "Uniprot:" + uniprot_id) out_fp.close()