You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I stumbled on a surprising interaction that I wanted to show.
I'm using a model generated with AutoKeggRec and the way the model is constructed leads to mergem to consider a H2O metabolite as "calcein am".
AutoKeggRec constructs a model where metabolites have names like "C00001[c]" (notice the KEGG ID with compartments in square brackets). In addition to this ID, the metabolites usually contain a single annotation for pubchem.
For water, the annotation is {pubchem:"3303"} which overlaps with another notation from chebi, chebi:3303, leading to a bad ID matching.
# Code to reproduce it.
# I tried to narrow it down as much as possible to show how AutoKeggRec creates the metabolite.
# The exchange reaction was added just to get a minimal model.
from cobra import Model, Reaction, Metabolite
import mergem
met = Metabolite("C00001[c]", name="H2O; Water", compartment="c")
met.annotation["pubchem"] = "3303"
reac = Reaction("EX_h2o", name="Water Source")
reac.add_metabolites({ met: +1 })
model = Model('mini')
model.add_reactions([ reac ])
mr = mergem.merge( input_models=[model], extend_annot=True )
print( mr["merged_model"].name )
print( mr["merged_model"].metabolites[0].annotation )
# Mergem of mini (mergem v1.1.0)
# {'pubchem': '3303', 'kegg.compound': 'C11257', 'metanetx.chemical': 'MNXM45204', 'seed.compound': 'cpd08120', 'chebi': 'CHEBI:3303', 'inchikey': ['BQRGNLJZBFXNCZ-UHFFFAOYSA-N'], 'sbo': 'SBO:0000247'}
Just wanted to bring this to attention as this affects models generated with AutoKeggRec. It's a pretty narrow edge case due to how AutoKeggRec writes their compartment inside the ID and due to having a pubchem annotation.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. We are working on improving the compartment handling in mergem and we will make sure this case also works. We'll keep you posted when it is fixed.
Hello, I stumbled on a surprising interaction that I wanted to show.
I'm using a model generated with AutoKeggRec and the way the model is constructed leads to mergem to consider a H2O metabolite as "calcein am".
AutoKeggRec constructs a model where metabolites have names like "C00001[c]" (notice the KEGG ID with compartments in square brackets). In addition to this ID, the metabolites usually contain a single annotation for pubchem.
For water, the annotation is
{pubchem:"3303"}
which overlaps with another notation from chebi,chebi:3303
, leading to a bad ID matching.Just wanted to bring this to attention as this affects models generated with AutoKeggRec. It's a pretty narrow edge case due to how AutoKeggRec writes their compartment inside the ID and due to having a pubchem annotation.
The text was updated successfully, but these errors were encountered: