Skip to content

ENH: allow different annotation keys#50

Open
carrascomj wants to merge 4 commits intoEPFL-LCSB:devfrom
carrascomj:refactor-allow-alt-annotation
Open

ENH: allow different annotation keys#50
carrascomj wants to merge 4 commits intoEPFL-LCSB:devfrom
carrascomj:refactor-allow-alt-annotation

Conversation

@carrascomj
Copy link
Contributor

Description

Changing the annotation of the metabolites on the fly works but it is not scalable and hinders the use of alternative thermodynamic databases with other DB identifiers. Furthermore, it is usually the case that GEMs come with SEED annotations but with a different key, such as "seed.compound", "seed.id", etc. instead of seed_id, so it would be useful to allow the user to define which annotation key (as in cobra.Metabolite.annotation[key]) should be matched against the database during the preparation/conversion of the ThermoModel.

Implementation

  • The __init__() method of pytfa.thermo.ThermoModel now accepts an additional argument annotation_key used during preparation/conversion, which defaults to seed_id.
  • This additional argument was propagated to the relevant utility functions used on _prepare and _convert.
  • PROTON and WATER identifiers from different DBs were added instead of only the SEED variants.
  • A test was added to the test suite.

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

Successfully merging this pull request may close these issues.

1 participant