Skip to content

Commit

Permalink
Add handling for multiple kegg ids to one molecule
Browse files Browse the repository at this point in the history
  • Loading branch information
kheal committed Feb 11, 2025
1 parent 73d8365 commit a4f4102
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,9 @@ def generate_metab_identifications(
# Prepare KEGG Compound ID as an alternative identifier
alt_ids = []
if not pd.isna(best_hit["Kegg Compound ID"]):
alt_ids.append("kegg:" + best_hit["Kegg Compound ID"])
kegg_ids = best_hit["Kegg Compound ID"].split(" | ")
for kegg_id in kegg_ids:
alt_ids.append("kegg:" + kegg_id)
alt_ids = list(set(alt_ids))

data_dict = {
Expand Down

0 comments on commit a4f4102

Please sign in to comment.