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

When reactions are deleted they are still part of groups and their IDs are still associated with genes. #22

Open
willigott opened this issue Oct 31, 2019 · 1 comment
Assignees
Milestone

Comments

@willigott
Copy link
Contributor

When I do

import cbmpy as cbm

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

print(mod.getAllProteinGeneAssociations()['G_b4395'])

mod.deleteReactionAndBounds('R_PGM')

print(mod.getAllProteinGeneAssociations()['G_b4395'])

cbm.CBWrite.writeSBML3FBCV2(mod, 'ecoli_mod.xml')

mod2 = cbm.CBRead.readSBML3FBC('ecoli_mod.xml')

the following will be printed:

['R_PGM']
Deleting reaction R_PGM and 2 associated bounds
['R_PGM']
...
Skipping group "g6" member "R_PGM", it is an incompatible type.

There are two issues with it, I think:

When a reaction is deleted, I would expect it to be also removed from all groups it is member of (now the ID will still be exported causing the "Skipping group..." part) and getAllProteinGeneAssociations() should then return an empty list for the associated gene (now it still returns the ID of the deleted reaction).

I guess both things are unintended behavior?!

@bgoli bgoli self-assigned this Nov 20, 2019
@bgoli bgoli added the bug label Nov 20, 2019
@bgoli bgoli added this to the Release 0.8.0 milestone Nov 20, 2019
@bgoli
Copy link
Member

bgoli commented Nov 20, 2019

Thanks, this is a know issue (see #21 ) I'm currently working on replacing them with lists of weak_refs which avoid circular references and at least throw exceptions when they dangle ... but also have their own issues.

@bgoli bgoli modified the milestones: Release 0.8.0, Release 0.8.1 Feb 2, 2021
@bgoli bgoli modified the milestones: Release 0.8.1, Release 0.8.2 Jul 21, 2021
@bgoli bgoli modified the milestones: Release 0.8.3, Release 0.8.5 Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants