Skip to content

Commit

Permalink
Generate the EvaluationLinks for Uniprot and gene
Browse files Browse the repository at this point in the history
  • Loading branch information
leungmanhin committed Apr 21, 2020
1 parent 0029277 commit c6eccf4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tcmid.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,22 @@ def is_available(entry):

chebi_fp.close()

for line in lines:
print("--- Reading line: " + line)
if is_available(line):
contents = line.split("\t")
ingredient = contents[0].lower().strip()
chebi_id = chebi_dict.get(ingredient)
uniprot_id = contents[2]
gene = contents[3]
omim_ids = contents[4].split(";")
drug_ids = contents[5].split(";")

if is_available(chebi_id):
chebi_id_full = "ChEBI:" + chebi_id
if is_available(uniprot_id):
evalink("interacts_with", "MoleculeNode", "MoleculeNode", chebi_id_full, uniprot_id)
if is_available(gene):
evalink("interacts_with", "MoleculeNode", "GeneNode", chebi_id_full, gene)

out_fp.close()

0 comments on commit c6eccf4

Please sign in to comment.