Repository navigation
Document all parameters, align eleven functions with RAVEN, add parity oracles - #189
Merged
Merged
Conversation
… `set_exchange_bounds` annotation, `--big-m` in the sweep script - Every public function exported through `__all__` documents all its parameters (117 functions, 565 parameters), with `Returns` and `Raises` sections where the code returns a structure or raises. - Comments and the `_NON_DNF_REASON` string state the current behaviour: the `prove_abs_gap` measurements of `ftinit`, the case handling of template ids, the flagged form of a rule that is not in disjunctive normal form. - `set_exchange_bounds` is annotated `list[str | Metabolite]`: it returns the entries of `mets` as supplied. - `scripts/analyze_init_params.py` takes `--big-m` (default: the `ftinit` default of 1000), and its sweep cache is keyed on `big_m`.
fill_tasks restores MIPGap and MIPGapAbs. The essentials cache is JSON and
checkpoint_every below 1 raises. hpa_gene_scores uses the default level scores
for an empty mapping, and rna_gene_scores matches the tissue case-insensitively
and takes the highest TPM over names that differ in case. predict_localization
returns a copy when no gene has a score. assign_compartments derives its
default floor from biomass_reaction. organisms_in_domain raises for an empty
domain. load_condition returns {} for an empty file. reporter_metabolites leaves
a gene without a fold change out of both subsets. constrain_reversible_reactions
catches AttributeError only.
The oracle generator records reporter_metabolites with fold changes and an
empty condition file; the recorded oracles are committed.
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.
Documents all parameters of the public functions, aligns eleven functions with RAVEN, replaces comments that contradicted the corrected docstrings (#188) and removes the hard-coded
big_m=100from the sweep script.Documentation
__all__has aParametersentry for each argument (117 functions, 565 parameters), withReturnsandRaisessections where the code returns a structure or raises. Defaults equal the signature defaults.prove_abs_gapmeasurements offtinit, the case handling of template ids, the "RAVEN MILP" wording ofget_min_nr_fluxes, the reason in_NON_DNF_REASON.set_exchange_boundsis annotatedlist[str | Metabolite], andcompare_modelsacceptsos.PathLikefortasks.scripts/analyze_init_params.pytakes--big-m(default: theftinitdefault of 1000) and keys its sweep cache onbig_m.Behaviour
init.fill_tasks(resolve_ties=True, Gurobi)MIPGapandMIPGapAbsofreference_modelafter each gap-fill.tasks.find_task_essential_reactionscache_pathas JSON. A file that is not a JSON cache of the current version, such as a pickle, is ignored with a warning.checkpoint_everybelow 1 raisesValueError.init.hpa_gene_scoreslevel_scoresmapping uses the default level scores.init.rna_gene_scorestissueis compared case-insensitively; the highest TPM over tissue names that differ in case is used, as inscoreModel.localization.predict_localization(apply=True)localization.assign_compartmentsbiomass_reaction.reconstruction.kegg.organisms_in_domaindomainraisesValueError.conditions.load_condition{}, whichapply_conditionapplies as a condition without steps, as RAVEN'sparseYAMLandapplyConditiondo.analysis.reporter_metabolitesgene_fold_changesis in neither the"up"nor the"down"subset.manipulation.constrain_reversible_reactionsParamsattribute.gapfilling.connect_blocked_reactionsRuntimeErrorfor a non-optimal MILP names the MILP.The parity generator
scripts/parity/generate_oracles.mrecordsreporterMetaboliteswith fold changes and an empty condition file. The recorded oracles are intests/data/parity/oracles/, with the RAVEN commit inPROVENANCE.md.CHANGELOG.mdhas an entry for each change.