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

feat: updates related to tutorials #319

Merged
merged 37 commits into from
Jun 26, 2023
Merged

feat: updates related to tutorials #319

merged 37 commits into from
Jun 26, 2023

Conversation

edkerk
Copy link
Member

@edkerk edkerk commented Jun 20, 2023

Main improvements in this PR:

  • refactor:
    • tutorials renamed to full_ecModel and light_ecModel
  • feat:
    • full_ecModel:
      • more detailed discussions around kcat curation, protein usage etc.
      • plotCrabtree makes plot that demonstrates Crabtree effect in ecModels
      • plotlightVSfull makes plot comparing flux distribution in light and full ecModels
    • light_ecModel:
      • minimum code to make a light ecModel
      • distribute a modified human-GEM 1.15.0 in yml format, together with uniprotConversion.tsv and spontaneousReactions.tsv as derived from files on the Human-GEM GitHub repository, to avoid dependency on having that repo installed. See HumanGEMAdapter with explanation on how the files were obtained.
    • various functions show progress bar that indicates estimated remaining time.
    • reportEnzymeUsage can make report of top-10 used enzymes.
    • loadConventionalGEM can load yaml model files.
    • enzymeUsage reports as positive values.
    • flexibilizeProtConcs also keeps track of the ratio of protein concentration change.
    • fillProtConcs allows for selection of column from protData, if it contains multiple datasets.
    • setKcatForReactions can directly modify a kcat for all associated reactions, useful for manual curation on existing ecModels.
    • getReactionsFromEnzyme gives which reactions are catalyzed by a particular enzyme, from a provided Uniprot ID.
  • fix:
    • ecFVA goes through the correct list of mapped reactions and deals with failing simulations.
    • ModelAdapterManager does not save ecModel paths to the MATLAB path, as this would be persistent.

Note: #320 should be merged to develop before this PR. done.

I hereby confirm that I have:

  • Selected develop as a target branch (top left drop-down menu)

@github-actions
Copy link

github-actions bot commented Jun 20, 2023

This PR has been automatically tested with GH Actions. Here is the output of the tests:

 
[�Warning: Cannot find RAVEN Toolbox in the MATLAB path, or the version is too old (before v2.8.3). Make sure you have installed RAVEN in accordance to the following instructions,
including running 'checkInstallation()': https://github.com/SysBioChalmers/RAVEN/wiki/Installation]�
[�> In GECKOInstaller.checkRAVENversion (line 77)
In GECKOInstaller.install (line 13)]�

Note: In the case of multiple test runs, this post will be edited.

@mihai-sysbio
Copy link
Member

I was about to get started on the light Human-GEM but it looks like you've had some great progress. I'll happily review this when ready.

@mihai-sysbio mihai-sysbio self-requested a review June 21, 2023 01:18
@mihai-sysbio
Copy link
Member

mihai-sysbio commented Jun 21, 2023

  • distribute a modified human-GEM 1.15.0 in yml format

I want to remember a discussion around providing ec models as part of this repository - that this should either be avoided, or restricted to a couple of exceptions; I couldn't find this written down anywhere though.

Some other notes:

@Yu-sysbio Yu-sysbio self-requested a review June 21, 2023 03:04
@edkerk
Copy link
Member Author

edkerk commented Jun 21, 2023

  • distribute a modified human-GEM 1.15.0 in yml format

I want to remember a discussion around providing ec models as part of this repository - that this should either be avoided, or restricted to a couple of exceptions; I couldn't find this written down anywhere though.

This is to have a functional tutorial, the discussion was whether we should distribute production-ready/curated ecModels, but for that we'll use the ecModels repo.

Some other notes:

To this aim, I removed yeast-GEM and human-GEM from the tutorial names and folders. IMHO, adding tutorial_ will not have a drastic impact, more important would be to mention the non-production-ready state in the protocol.m and model adapter files. This can probably be strengthened (particularly in model adapter).

Copy link
Member

@mihai-sysbio mihai-sysbio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will have to a be a partial review since I got stuck at step 14 of the light model. Overall, things are looking great!

Excellent job with the progress bars, really nice way to inform the user while keeping the console clean 🤩

In addition to the specific suggestions, I also have the following very minor comments:

  • it would have been simpler with separate smaller PRs, this one feels hard to review
  • I had updated RAVEN in the runner to 2.8.2, and will do that again for 2.8.3
  • tutorials/full_ecModel/data/ contains a mix of TSV and CSV files; it would have been nicer with consistency, if possible
  • DLKcat generated a different output file that the one stored for the light tutorial, should the file be updated?

tutorials/light_ecModel/protocol.m Show resolved Hide resolved
tutorials/light_ecModel/protocol.m Outdated Show resolved Hide resolved
tutorials/light_ecModel/protocol.m Outdated Show resolved Hide resolved
tutorials/light_ecModel/protocol.m Outdated Show resolved Hide resolved
tutorials/light_ecModel/protocol.m Show resolved Hide resolved
GECKOInstaller.m Outdated Show resolved Hide resolved
@mihai-sysbio
Copy link
Member

My review of the light model is finished - I'll re-review once the final part of the protocol is finished.
There are some comments for the full version of the tutorial. Once those are resolved I will also have a go through that tutorial.

Copy link
Collaborator

@ae-tafur ae-tafur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think now is ready.

Copy link
Member

@mihai-sysbio mihai-sysbio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am re-running both tutorials - it will take a while. My expectation is that there will be no major changes, so how about we merge the PR as-is, and transfer all remaining items to a new issue?

Comment on lines +141 to +143

% TODO: LAST FEW STEPS

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it has become urgent to merge this PR. For this outstanding addition here, I propose to create a separate issue, thus resulting in a small PR that will be easier to diff and review.

Suggested change
% TODO: LAST FEW STEPS

@edkerk edkerk merged commit c30c7a7 into develop Jun 26, 2023
1 check passed
@edkerk edkerk deleted the feat/ecYeastGEM branch June 26, 2023 17:38
edkerk added a commit that referenced this pull request Jul 3, 2023
* fix: getStandardKcat with multiple subSystems

* Bug: Fix compatibility running ecFSEOF with GECKO3 models (#301)

* reverse: simulateGrowth for ecFSEOF

* fix: consistency in terminology

* refactor: fluxes for a target

* refactor: compatibility to GECKO3 ecFlux_scanning

* refactor: add compatibility to GECKO3

* fix: typo

* fix: save file type file

* fix: filter tolerance

* fix: if not carbon uptake have been defined

* fix: add toleracne to protein pool

* refactor: spaces instead of tabs

* fix: function input description

* Update src/geckomat/utilities/ecFSEOF/run_ecFSEOF.m

---------

Co-authored-by: edkerk <eduardk@chalmers.se>

* feat: user defined proteins to ignore in tunning kcats (#306)

* fix: applyCustomKcats with customKcats structure input (#304)

* fix: applyCustomKcats should allow struct as input

* fix: applyCustomKcats correct parse default param

* fix: applyCustomKcats

* applyCustomKcats doc and tests

* refactor: reduce command window output testss

* Apply suggestions from code review

Co-authored-by: Albert Tafur Rangel <39610893+ae-tafur@users.noreply.github.com>

---------

Co-authored-by: Albert Tafur Rangel <39610893+ae-tafur@users.noreply.github.com>

* doc: updateProtPool and flexibilizeProtConcs (#297)

* fix: updateProtPool avoid correctinf for f twice

* doc: flexibilizeProtConcs explain overconstraining

* fix: loadProtData measuredProt if NaN exist

* doc: protocol.m describe updateProtPool input

* fix: updateProtPool simplified new pool calculation

* chore: update protocol for updateProtPool

---------

Co-authored-by: Mihail Anton <mihail.anton@chalmers.se>

* feat: a function that creates a the project structure an adapter class (#312)

* feat: create structure project

* feat: include empty .keep files

---------

Co-authored-by: edkerk <eduardk@chalmers.se>

* feat: currencyMets and pseudoreactions handling (#313)

* fix: writeDLKcatInput currencyMets handling

* fix: filter out pseudoreactions makeEcModel

* fix: makeEcModel find pseudoreactions

* chore: restructure tutorials (#310)

* chore: rename userData to tutorials

* chore: move protocol and adapters

* chore: keep original in full under blankExample

* chore: compact adapters for human and yeast

* chore: cleanup protocol for yeast

* feat: add a model adapter under blankExample

* chore: rename adapter

* feat: copy protocol from yeast to human

* fix: typo

* fix: new folder names in adapters

* fix: update paths to tutorials

* refactor: model adapter expects full adapter path and extension

* fix: file paths for yeast-GEM tutorial

* style: protocol in tutorial prints step

* chore: rm doc

* feat: compress outputs about downloading complexes

* fix: full path to adapter in test

* fix: full paths for adapters in tests

* fix: undo bad path change

* chore: remove blankExample, use startGECKOproject

* chore: restore yeast-GEM protocol.m content

* chore: run through yeast-GEM protocol

* feat: simplify ModelAdapterManager commands

* fix: allow to set empty default adapter

* fix: tests refer to test adapter

---------

Co-authored-by: edkerk <eduardk@chalmers.se>

* feat: add manually-generated doc for online use

* feat: updateGECKOdoc function

* chore: update documentation

by running updateGECKOdoc()

* fix: getStandardKcat and applyKcatConstraints (#320)

* fix: getStandardKcat light model standard enzyme

In light ecModels, even if standard enzyme is not a pseudo-substrate (it will always use prot_pool instesad), standard enzyme should still be in ecModel.ec.enzyme (and .rxnEnzMat etc.), to calculate MW/kcat.

* refactor: applyKcatConstraints simplify light

* refactor: getStandardKcat

* fix: applyKcatConstraints zero-kcats light ecModel

* feat: copyECtoGEM function

* fix: minor bugs identified (#316)

* fix: use logical vector to construct equations

* fix: increase default tolerance

* style: typo

* style: use standard input names

* fix: adaptar default method name

* fix: set values under solver tol to zero

* feat: run_ecFSEOF check alphaLims parameter

---------

Co-authored-by: Eduard Kerkhoven <eduardk@chalmers.se>

* feat: updates related to tutorials (#319)

* feat: new/updated functions around enzyme usage

* feat: install and adapter manager

* feat: Crabtree plot and data

* feat: updated protocol and model file

* refactor: rename tutorials full_ and light_ecModel

* feat: loadConventionalGEM can load YAML

* feat: use progressbar to give time estimates

* fix: ecFVA correct number of simulations

* feat: sensitivityTuning reports eccodes

* feat: fillProtConcs select column from protData

* feat: flexibilizeProtConcs sort by highest ratio

* feat: plotCrabtree plus graphs

* feat: plot light vs full ecModel analysis

* feat: GECKOInstaller checks RAVEN version

* feat: update of full_ecModel protocol

moved progressbar to RAVEN 2.8.2

* fix: getStandardKcat light model standard enzyme

In light ecModels, even if standard enzyme is not a pseudo-substrate (it will always use prot_pool instesad), standard enzyme should still be in ecModel.ec.enzyme (and .rxnEnzMat etc.), to calculate MW/kcat.

* refactor: applyKcatConstraints simplify light

* refactor: getStandardKcat

* feat: light_ecModel tutorial overhaul

* fix: plot light vs full

* fix: applyKcatConstraints zero-kcats light ecModel

* feat: copyECtoGEM function

* chore: updateDocumentation

* fix: full_ecModel/protocol.m step 13

* full_ecModel misc small fixes

* fix: full_ecModel/protocol.m step 15

* fix: full_ecModel/protocol.m install instructions

* fix: findMetSmiles report success and handle prot_

* fix: full_ecModel customKcat non-funct. protein

* fix: plotCrabtree avoid flux minimalization

* fix: full_ecModel various minor changes

* fix: GECKOInstaller RAVEN dep version bump

* fix: full_ecModel and light_ecModel from review

* fix: remove unused functions

* feat: rerun light_ecModel pipeline

* refactor: change vanHoek1998.csv to .tsv

* fix: full_ecModel tutorial ecFVA (#321)

* fix: remake ecFVA plot with generic plot function

* fix: GECKOInstaller ignore doc subfolder

* chore: updateGECKOdoc

* fix: remove old ecFVA.tsv

no purpose to write this file

* refactor: speedup fuzzyKcatMatching & getECfromGEM

* feat: saveEcModel more logical input

* refactor: swap TIFF for PDF

* refactor: applyComplexData (#323)

* refactor: speed increase applyComplexData

* feat: applyComplexData progressbar + code comments

* feat: light_ecModel tutorial getSubsetEcModel (#322)

* fix: remake ecFVA plot with generic plot function

* fix: GECKOInstaller ignore doc subfolder

* chore: updateGECKOdoc

* fix: remove old ecFVA.tsv

no purpose to write this file

* fix: getStandardKcat no standard gene in light-ec

* fix: light_ecModel until step 29

* feat: getSubsetEcModel + tutorial

* feat: parameters format, phylDist.mat file and yeast-GEM.yml (#325)

* refactor: rename KEGG params to param.kegg.

to param.kegg.geneID

* refactor: rename Complex params to param.complex

* refactor: rename UniProt params to param.uniprot.

* fix: remove unused obj.params entries

remnants of GECKO2

* refactor: add _id to uniprot taxonomy

* refactor: use taxonomicID from complex portal

easier to find than precise species name

* feat: use RAVEN's phylDist.mat

from RAVEN 2.8.3 includes species names

* feat: tutorial yeast-GEM as yaml

* feat: yeast-GEM file is for tutorial only

* fix: remove unused manualModifications

* fix: small fixes

* docs: add link to tutorials in README

* docs: skip mentioning the required RAVEN version, since it is checked at installation

* feat: compare light vs full ecModel (#328)

* chore: rerun full_ecModel tutorial

* feat: light vs full ecModel comparison

* doc: swap step 29 and 30

* chore: rerun light_ecModel tutorial (#331)

* chore: rerun full_ecModel tutorial

* feat: light vs full ecModel comparison

* doc: swap step 29 and 30

* chore: rerun light_ecModel tutorial

* refactor: consistent use of isozyme

In agreement with manuscript

* chore: updateDocumentation

* doc: format of warning messages

* fix: plotlightVSfull.m handle use of alt solvers

* fix: consistent cutoff for low fluxes

---------

Co-authored-by: Albert Tafur Rangel <39610893+ae-tafur@users.noreply.github.com>
Co-authored-by: Mihail Anton <mihail.anton@chalmers.se>
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.

None yet

4 participants