Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping through delimited IDs into inner models #765

Closed
stelmo opened this issue Feb 24, 2023 · 2 comments
Closed

Mapping through delimited IDs into inner models #765

stelmo opened this issue Feb 24, 2023 · 2 comments

Comments

@stelmo
Copy link
Collaborator

stelmo commented Feb 24, 2023

We do not currently have a good way to map through delimited IDs to the underlying ID and call the correct accessor on it. For example:

julia> rid = "ecoli1#PFK#forward#1"
"ecoli1#PFK#forward#1"

julia> rid2 = "PFK#forward#1"
"PFK#forward#1"

julia> reaction_subsystem(gm, rid2)
ERROR: KeyError: key "PFK#forward#1" not found
Stacktrace:
 [1] getindex
   @ C:\Users\stelmo\.julia\packages\OrderedCollections\PRayh\src\ordered_dict.jl:380 [inlined]
 [2] reaction_subsystem(model::COBREXA.Types.ObjectModel, id::String)
   @ COBREXA.Types C:\Users\stelmo\Documents\GitHub\pkgs\COBREXA.jl\src\types\models\ObjectModel.jl:135
 [3] reaction_subsystem(model::COBREXA.Types.EnzymeConstrainedModel, rid::String)
   @ COBREXA.Accessors C:\Users\stelmo\Documents\GitHub\pkgs\COBREXA.jl\src\types\accessors\ModelWrapper.jl:20
 [4] top-level scope
   @ REPL[186]:1

julia> rid3 = "PFK"
"PFK"

julia> reaction_subsystem(gm, rid3)
"Glycolysis/Gluconeogenesis"
@exaexa
Copy link
Collaborator

exaexa commented Dec 7, 2023

Kinda obsoleted by ConstraintTrees. I'll leave this open so that we check if this will work.

@exaexa
Copy link
Collaborator

exaexa commented May 14, 2024

aaaaaaaaand it worked.

@exaexa exaexa closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants