Repository navigation
Conversation
The experiments package reads the flux files of several conditions, fixes the uptake of each condition and solves the model, and combines the carbon-weighted RMSE of the flux and max-growth conditions into one distance. The anaerobic switch, the change of the protein content and the solver call are functions that the caller passes. apply_flux_data_constraints sets the exchange bounds of a model from one condition.
repair_scipy_problem, switch_to_scipy, edit_on_fast_solver, optimize_model and constraint_shadow_prices work around the dense coefficient matrix, the stale variable map and the missing solution status of the scipy interface, next to set_raven_tolerance.
calculate_mw gives the molecular weight of a protein from its sequence. find_met_smiles fills the SMILES annotation of metabolites from PubChem, with a local cache file.
fit_maintenance fits NGAM from a maintenance coefficient and GAM from the substrate uptake of chemostats, with a study-weighted Huber loss and a bootstrap over studies. set_gam takes keep_offsets_of and get_gam reads the coefficient.
This was referenced Nov 20, 2026
Draft
This branch has not been deployed
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.
Generic functions that geckopy and the yeast-GEM maintenance fit need are in raven-toolbox, so that every model and the MATLAB side can use them. The MATLAB counterpart of the experiments package is in RAVEN (CompMetEng/RAVEN#28).
raven_toolbox.experiments: scores a model against measured growth rates and exchange fluxes.load_experiment_datareadsfluxData.tsv,maxGrowth.tsvandzeroFlux.tsvfrom a folder, andload_flux_dataparses one flux file into aFluxDatawith a per-conditionweight.simulate_conditionsfixes the uptake of each condition and solves the model. The anaerobic switch, the change of the protein content and the solver call are functions that the caller passes.compute_carbon_weightsandexperiment_distancecombine the carbon-weighted RMSE of the flux and max-growth conditions into one value.apply_flux_data_constraintssets the exchange bounds of a model from one condition (loose, or a percentage band).utils.solver: support for optlang's scipy (HiGHS) interface next toset_raven_tolerance:repair_scipy_problem,switch_to_scipy,edit_on_fast_solver,optimize_modelandconstraint_shadow_prices.utils.protein.calculate_mw: molecular weight of a protein from its sequence.annotation.find_met_smiles: fills the SMILES annotation of the metabolites from PubChem, with a local cache file.biomass.fit_maintenance: fits NGAM from a maintenance coefficient and GAM from the substrate uptake of chemostats, with a study-weighted Huber loss and a bootstrap over studies.set_gamtakeskeep_offsets_of, andget_gamreads the coefficient. It is used by feat: fit GAM and NGAM from retentostats and chemostats SysBioChalmers/yeast-GEM#433.The four commits are independent and can be reviewed one by one. geckopy uses the first three, and the PR for it waits for the release of this one.