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

fix: various minor fixes #530

Merged
merged 23 commits into from
Apr 26, 2024
Merged

fix: various minor fixes #530

merged 23 commits into from
Apr 26, 2024

Conversation

edkerk
Copy link
Member

@edkerk edkerk commented Feb 26, 2024

Main improvements in this PR:

  • fix:
    • simplifyModel with irreversible backwards-only reactions (solves bug: simplifyModel with irreversible backwards-only reactions #529)
    • writeYAMLmodel do not write lines with empty entries (e.g. reactions without subsystems)
    • getModelFromKEGG includes model.annotation.defaultLB and model.annotation.defaultUB fields
    • getGenesFromGrRules can handle genes with '|'
    • getModelFromHomology remove geneFrom field (solves Error in getModelFromHomology function #533)
    • getMinNrFluxes reduce default verbosity
    • writeYAMLmodel allow empty id and name fields, in line with https://github.com/SysBioChalmers/RAVEN/wiki/RAVEN-Model-Structure
    • ravenCobraWrapper prefers to use grRules in COBRA models if present (solves GECKO issue #367)
    • optimizeProb will throw error when trying to solve MILP with glpk (also if glpk is set via cobra)
    • writeYAMLmodel will throw an informative error if it cannot write the file to the intended directory
    • mapCompartments correct horizontal concatenation of cell array
  • feat:
    • randomSampling can run in parallel with MATLAB Parallel Computing Toolbox installed
    • setParam has an additional option, 'unc' if a reaction's lower and upper bound should be set as unconstrained. If available, this will use the default bounds in model.annotation (otherwise [-1000, 1000]), and considers reversibility (in which case lower bound = 0)
    • auxiliary parallelPoolRAVEN function to check if function should be running in parallel
    • use alternative ProgressBar, particularly in functions containing parfor calls
    • give execution rights in Terminal for new RAVEN functions

Instructions on merging this PR:

  • This PR has develop as target branch, and will be resolved with a squash-merge.
  • This PR has main as target branch, and will be resolved with a merge commit.

Copy link

github-actions bot commented Feb 26, 2024

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

 > Installing from location             /home/m/actions-runner/_work/RAVEN/RAVEN
> Checking RAVEN release DEVELOPMENT
> Checking MATLAB release 2020b
> Checking system architecture glnxa64
> Set RAVEN in MATLAB path Pass
> Save MATLAB path Pass
> Make binaries executable Pass

> Add Java paths for Excel format Pass
> Checking libSBML version 5.19.0
> Checking model import and export
> Import Excel format Pass
> Export Excel format Pass
> Import SBML format Pass
> Export SBML format Pass

> Checking for LP solvers
> glpk Pass
> gurobi Fail
> scip Fail
> cobra Pass
> Set RAVEN solver glpk

> Checking BLAST+ Pass
> Checking DIAMOND Pass
> Checking HMMER Pass

> Checking function uniqueness Pass

*** checkInstallation complete ***

Running blastPlusTests
.
Done blastPlusTests

Running cdhitTests
.
Done cdhitTests

Running checkTasksTests
.
Done checkTasksTests

Running diamondTests
.
Done diamondTests

Running fillGapsLargeTests

Error occurred in fillGapsLargeTests/testLargeGurobi and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using fillGapsLargeTests>testLargeGurobi (line 32)
Solver not working
.
Error occurred in fillGapsLargeTests/testLargeSCIP and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using setRavenSolver (line 35)
SCIP not found. RAVEN only provides the precompiled SCIP MEX binary for Windows. Instructions on how to compile the SCIP MEX file are found at
https://github.com/scipopt/MatlabSCIPInterface

Error in fillGapsLargeTests>testLargeSCIP (line 56)
setRavenSolver('scip');
.
Done fillGapsLargeTests

Running fillGapsSmallTests

Error occurred in fillGapsSmallTests/testSmallSCIP and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using setRavenSolver (line 35)
SCIP not found. RAVEN only provides the precompiled SCIP MEX binary for Windows. Instructions on how to compile the SCIP MEX file are found at
https://github.com/scipopt/MatlabSCIPInterface

Error in fillGapsSmallTests>testSmallSCIP (line 16)
setRavenSolver('scip');
.
Error occurred in fillGapsSmallTests/testSmallGurobi and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using fillGapsSmallTests>testSmallGurobi (line 67)
Solver not working
.
Done fillGapsSmallTests

Running hmmerTests
.
Done hmmerTests

Running importExportTests
....
Done importExportTests

Running mafftTests
.
Done mafftTests

Running miriamTests
.
Done miriamTests

Running modelAbilitiesTests
........
Done modelAbilitiesTests

Running modelConversionTests
.
Done modelConversionTests

Running modelCurationTests
.......... ........
Done modelCurationTests

Running modelSortingTests
..
Done modelSortingTests

Running solverTests
.
Error occurred in solverTests/testGurobi and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using solverTests>testGurobi (line 60)
Solver not working
.
Error occurred in solverTests/testSCIP and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using solverTests>testSCIP (line 77)
SCIP MEX binary not installed or not functional, test skipped
..
Done solverTests

Running tinitTests
.
Error occurred in tinitTests/testftINIT_T0001 and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using dispEM (line 49)
Failed to find good enough solution within the time frame. MIPGap: Inf


Error in ftINIT (line 281)
dispEM(['Failed to find good enough solution within the time frame. MIPGap: ' num2str(mipGap)]);

Error in tinitTests>testftINIT_T0001 (line 237)
[~,tst1ResModel1] = evalc('ftINIT(prepDataTest1,arrayData1.tissues{1},[],[],arrayData1,[],getINITSteps(),true,true,testParams,false);');
.
Error occurred in tinitTests/testftINIT_T0002 and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using dispEM (line 49)
Failed to find good enough solution within the time frame. MIPGap: Inf


Error in ftINIT (line 281)
dispEM(['Failed to find good enough solution within the time frame. MIPGap: ' num2str(mipGap)]);

Error in tinitTests>testftINIT_T0002 (line 277)
[~,tst1ResModel1] = evalc('ftINIT(prepDataTest1,arrayData1.tissues{1},[],[],arrayData1,[],getINITSteps(),true,true,testParams,false);');
.....
Error occurred in tinitTests/testftINIT_T0008 and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using dispEM (line 49)
Failed to find good enough solution within the time frame. MIPGap: Inf


Error in ftINIT (line 281)
dispEM(['Failed to find good enough solution within the time frame. MIPGap: ' num2str(mipGap)]);

Error in tinitTests>testftINIT_T0008 (line 377)
[~,tst1ResModel1] = evalc('ftINIT(prepDataTest1,arrayData1.tissues{1},[],[],arrayData1,[],getINITSteps(),true,true,testParams,false);');
..
Error occurred in tinitTests/testftINIT_T0050 and it did not run to completion.
---------
Error ID:
---------
''
--------------
Error Details:
--------------
Error using dispEM (line 49)
Failed to find good enough solution within the time frame. MIPGap: Inf


Error in ftINIT (line 281)
dispEM(['Failed to find good enough solution within the time frame. MIPGap: ' num2str(mipGap)]);

Error in tinitTests>testftINIT_T0050 (line 543)
[~,mres] = evalc('ftINIT(prepDataL,arrayDataL.tissues{1},[],[],arrayDataL,[],getINITSteps(),true,true,testParams,false);');
.
Done tinitTests

Failure Summary:

Name Failed Incomplete Reason(s)
===================================================================
fillGapsLargeTests/testLargeGurobi X X Errored.
-------------------------------------------------------------------
fillGapsLargeTests/testLargeSCIP X X Errored.
-------------------------------------------------------------------
fillGapsSmallTests/testSmallSCIP X X Errored.
-------------------------------------------------------------------
fillGapsSmallTests/testSmallGurobi X X Errored.
-------------------------------------------------------------------
solverTests/testGurobi X X Errored.
-------------------------------------------------------------------
solverTests/testSCIP X X Errored.
-------------------------------------------------------------------
tinitTests/testftINIT_T0001 X X Errored.
-------------------------------------------------------------------
tinitTests/testftINIT_T0002 X X Errored.
-------------------------------------------------------------------
tinitTests/testftINIT_T0008 X X Errored.
-------------------------------------------------------------------
tinitTests/testftINIT_T0050 X X Errored.

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

@edkerk edkerk changed the title fix: simplifyModel w/ backwards-only irrev rxns fix: various minor fixes Mar 8, 2024
@edkerk edkerk marked this pull request as draft March 27, 2024 16:06
@edkerk edkerk marked this pull request as ready for review March 27, 2024 17:41
works both when parfor is run in parallel or in serial, without any further changes to the code
@edkerk
Copy link
Member Author

edkerk commented Apr 26, 2024

Failing tests is likely due to invalid gurobi license on the CI server.

@edkerk edkerk merged commit 321a6f5 into develop Apr 26, 2024
1 check passed
@edkerk edkerk deleted the fix/simplifyModel branch April 26, 2024 11:44
edkerk added a commit that referenced this pull request Apr 26, 2024
fix: simplifyModel w/ backwards-only irrev rxns

fix: writeYAMLmodel do not write empty lines

fix: getModelFromKEGG essential fields

feat: printFluxes better error with empty fluxes

fix: getGenesFromGrRules if '|' in gene

fix: getGenesFromGrRules correct earlier fix

fix: getModelFromHomology remove geneFrom field

refactor: reduce default verbosity

fix: writeYAMLmodel allow empty id and name fields

doc: updateDocumentation

fix: ravenCobraWrapper prefers to use grRules

feat: optimizeProb error solving milp with glpk

fix: adjust tests to separate solvers

fix: writeYAMLmodel error if dir does not exist

feat: parallel randomSampling

and new progressbar2

feat: setParam has 'unc' as option

for unconstrained reactions

feat: parallelPoolRAVEN handles parallelization

feat: use alternative ProgressBar function

works both when parfor is run in parallel or in serial, without any further changes to the code

refactor: predictLocalization builtin randsample

fix: mapCompartments correct horizontal concatenation

also updated documentation

feat: give execution rights in Terminal for new RAVEN functions

doc: update GLPK readme file

feat: add GLPK compatibility with Apple Silicon
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.

2 participants