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

fix: inconsistency in the gene name storage in SBML files #950

Open
Tracked by #218
BenjaSanchez opened this issue Apr 23, 2020 · 1 comment
Open
Tracked by #218

fix: inconsistency in the gene name storage in SBML files #950

BenjaSanchez opened this issue Apr 23, 2020 · 1 comment
Assignees
Labels
SBML Related to reading and writing SBML models.

Comments

@BenjaSanchez
Copy link
Contributor

Problem description

As noted in SysBioChalmers/yeast-GEM#216, currently there's an inconsistency with how cobratoolbox and cobrapy store gene names in the xml file: cobratoolbox uses the fbc:label field, whereas cobrapy uses fbc:name. The latter is used by cobratoolbox to store protein information.

Code Sample

cobrapy:

model.reactions[0].gene_reaction_rule = "b3845"
model.genes.get_by_id("b3845").name = "fadA"
cobra.io.write_sbml_model(model,"test.xml")

cobratoolbox:

model = addGenes(model, {'b3845'}, 'proteins', {'P21151'}, 'geneNames', {'fadA'});
writeCbModel(model,"test.xml")

Actual Output

cobrapy:

<fbc:geneProduct fbc:id="G_b3845" fbc:name="fadA" fbc:label="G_b3845"/>

cobratoolbox:

<fbc:geneProduct metaid="G_b3845" fbc:id="G_b3845" fbc:name="P21151" fbc:label="fadA"/>

Expected Output

Ideally both packages should save the model in the same way, to allow opening an xml file with either and without loosing any info. I'm not sure if it makes more sense to change the cobratoolbox or cobrapy convention: name sounds more reasonable for a gene name, but as @Midnighter pointed out, label is a required field by SBML whereas name is not.

Dependency Information

System Information

OS Windows
OS-release 10
Python 3.7.7

Package Versions

cobra 0.17.1
depinfo 1.5.3
future 0.18.2
numpy 1.18.3
optlang 1.4.4
pandas 1.0.3
pip 20.0.2
python-libsbml-experimental 5.18.0
ruamel.yaml 0.16.10
setuptools 46.1.3.post20200330
six 1.14.0
swiglpk 4.65.1
wheel 0.34.2

@cdiener
Copy link
Member

cdiener commented Apr 24, 2020

Pinging @matthiaskoenig and @draeger for guidance. Thanks!

@cdiener cdiener added the SBML Related to reading and writing SBML models. label Apr 24, 2020
@matthiaskoenig matthiaskoenig self-assigned this May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SBML Related to reading and writing SBML models.
Projects
None yet
Development

No branches or pull requests

3 participants