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

downloading P expansum model #1

Open
Rotembartuv opened this issue Jan 24, 2023 · 7 comments
Open

downloading P expansum model #1

Rotembartuv opened this issue Jan 24, 2023 · 7 comments

Comments

@Rotembartuv
Copy link

Hi,

I'm trying to download the Pexpansum model and read it using cobrapy.
I'm getting an error on cobrapy that the sbml model is not valid.
do your models works with cobrapy?

@syprigen
Copy link
Collaborator

Hi,

Even though Cobraby is rising warnings on the SId not being valid and "discouraged" uses in the sbml format, it should still read the models correctly by translating the ids (mainly "-" being transformed to "42", "+" to "43" and "." to "46")
but for clarity, I will update the files within the week.

@Rotembartuv
Copy link
Author

Ok
Waiting for your update! Thank you very much!!

@syprigen
Copy link
Collaborator

You should now be able to use the files in the "xml_cobraCompliantIds" folder without any warnings.

@Rotembartuv
Copy link
Author

tnx

when Im trying to read the model in cobrapy I get only 8 reaction

Pexpansum.summary()
Objective

1.0 bmOUT = 0.8398830785672777

Uptake

               Metabolite                         Reaction      Flux  C-Number C-Flux

ALPHA-GLUCOSE_CCO-BOUNDARY EX_ALPHA-GLUCOSE_CCO-BOUNDARY 20 0 0.00%
AMMONIA_CCO-BOUNDARY EX_AMMONIA_CCO-BOUNDARY 25.63 0 0.00%
CPD-205_CCO-BOUNDARY EX_CPD-205_CCO-BOUNDARY 8.399E-05 0 0.00%
Elemental-Sulfur_CCO-BOUNDARY EX_Elemental-Sulfur_CCO-BOUNDARY 0.1084 0 0.00%
FE+2_CCO-BOUNDARY EX_FE+2_CCO-BOUNDARY 0.000168 0 0.00%
OXYGEN-MOLECULE_CCO-BOUNDARY EX_OXYGEN-MOLECULE_CCO-BOUNDARY 20 0 0.00%
PPI_CCO-BOUNDARY EX_PPI_CCO-BOUNDARY 4.385 0 0.00%
THIAMINE_CCO-BOUNDARY EX_THIAMINE_CCO-BOUNDARY 8.399E-05 0 0.00%

Secretion

Metabolite Reaction Flux C-Number C-Flux
BIOMASSb EX_BIOMASSb -0.8399 0 0.00%

@syprigen
Copy link
Collaborator

model = read_sbml_model("Pexpansum.xml")
print(len(model.reactions))
2614

There is 2614 reactions in this model. To know how to use cobrapy, please refer to https://cobrapy.readthedocs.io/en/latest/

@Rotembartuv
Copy link
Author

The number of the reaction is correct, but the secrition in the summary showed nothing.

@zoey-rw
Copy link

zoey-rw commented Jan 26, 2024

I think the cobra-compliant SBML files appear to have lost their compartments within each metabolite ID. Then, when imported and re-saved by cobra, the compartments are considered "unused" and removed entirely by cobra.io.write_sbml_model.

I tried reading in the original SBMLs and re-saving with the argument "f_replace={}", but the compartments are still removed by cobra even when the metabolite IDs are left alone.

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

3 participants