feat: export model.ec to Excel (ENZYMES and ENZRXNS sheets)#641
Merged
Conversation
b8bb86e to
5843483
Compare
Function test results202 tests 178 ✅ 36s ⏱️ Results for commit dc92276. ♻️ This comment has been updated with latest results. |
347116b to
8640c4f
Compare
exportToExcelFormat now writes the contents of the model.ec structure of enzyme-constrained (GECKO) models to two additional sheets: ENZYMES (one row per enzyme: ID, GENE, MW, SEQUENCE, CONC) and ENZRXNS (one row per ec-reaction: ID, KCAT, SOURCE, NOTE, EC-NUMBER, ENZYMES). The ENZRXNS ENZYMES column encodes the subunit stoichiometry from model.ec.rxnEnzMat as 'enzyme:count' pairs (e.g. 'P12345:1;P67890:2'). Export-only: importExcelModel does not read these sheets back; the YAML format remains the round-trippable format for ecModels. NaN molecular weights/concentrations are written as empty cells. writeSheet gains column widths for the two new sheets.
8640c4f to
dc92276
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main improvements in this PR:
exportToExcelFormatnow writes the contents of themodel.ecstructure of enzyme-constrained (GECKO) models to two additional sheets:ID(UniProt),GENE,MW,SEQUENCE,CONCID,KCAT,SOURCE,NOTE,EC-NUMBER,ENZYMESwriteSheetgains column widths for the two new sheets.The ENZRXNS ENZYMES column encodes the subunit stoichiometry from
model.ec.rxnEnzMatasenzyme:countpairs (e.g.P12345:1;P67890:2), capturing the enzyme-reaction coupling in readable per-row form rather than as a separate matrix.These sheets are export-only:
importExcelModeldoes not read them back. The YAML format (writeYAMLmodel/readYAMLmodel) remains the round-trippable format for ecModels.NaNmolecular weights / concentrations are written as empty cells; thekcat == 0"unassigned" sentinel is kept.A test (
tIO/exportToExcelFormatWritesEcSheets) attaches a minimalmodel.ecto the e. coli test model, exports it, and verifies the two sheets exist and carry the expected content (including theenzyme:countENZYMES column).The Python counterpart (raven-toolbox
export_to_excel) is SysBioChalmers/raven-toolbox#38, and the ecModel-build fix that motivated this is SysBioChalmers/geckopy#32.Instructions on merging this PR:
develop3as target branch, and will be resolved with a squash-merge.mainas target branch, and will be resolved as descriped here.