Skip to content

Commit

Permalink
Update ELNs_to_KG_modules.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AleSteB committed Feb 3, 2024
1 parent 5aac39d commit 64c2c39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ELNs_to_KG_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,13 +629,15 @@ class {}(onto.search_one(iri = '*PhysChemProcessingModule')):
enz_id = eln_dict["substances"][prop_key]["hasEnzymeML_ID"]
except:
enz_id = ''


combined_ind_uuid = "PFD_" + str(uuid.uuid4()).replace("-","_")
combined_ind_name = proc_mod + '_' + prop_key

# Add dataProperties of subdictionaries, mostly containing material streams of the substances
for key in list(PFD_dict[proc_mod][prop_key].keys()):
onto = datProp_from_str(key, onto)

#TODO: Alex
# Add individual for each proc+substance and connect it to individuals
codestring = """with onto:
proc_indv = onto.search_one(iri = "*{}")
Expand All @@ -648,7 +650,7 @@ class {}(onto.search_one(iri = '*PhysChemProcessingModule')):
proc_subst_indv.RO_0002473.append(subst_indv)
proc_subst_indv.BFO_0000050.append(proc_indv)
""".format(uuid_dict[proc_mod],prop_key,enz_id,combined_ind_name,combined_ind_name)
""".format(uuid_dict[proc_mod],prop_key,enz_id,combined_ind_uuid,combined_ind_name)

# add data properties for newly created individual
for key in list(PFD_dict[proc_mod][prop_key].keys()):
Expand Down

0 comments on commit 64c2c39

Please sign in to comment.