Skip to content

createGeneProteinAssociation can lead to duplicate gene labels #23

@willigott

Description

@willigott

When I do

import cbmpy as cbm

mod = cbm.CBRead.readSBML3FBC('e_coli_core.xml.gz')

mod.getGene('G_b4395').setLabel('b4301')

I receive - as expected - a warning that the gene label already exists and it is therefore not set.

However, when I then do:

mod.createReaction('dummy')
mod.createGeneProteinAssociation('dummy', 'b4395')

two genes will exist with identical label:

[g for g in mod.getGeneIds() if 'b4395' in g]   # ['G_b4395', 'b4395']
[g for g in mod.getGeneLabels() if 'b4395' in g]  # ['b4395', 'b4395']

Export and import of the model works fine, however, if one uses the online validator it will return the error:

Error Line 10826 Column 47: (SBML Validation Rule #fbc-21205) The attribute 'fbc:label' on a must be unique among the set of all elements defined in the . Reference: L3V1 Fbc V2 Section 3.5 A GeneProduct with the label 'b4395' has already been declared.

Could this be fixed?!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions