Repository navigation
Conversation
…ops (lanl#1366) The actions after a BNGL file's generate_network are dropped as the author's experiment. When some of them set a parameter or a concentration the first simulate or parameter_scan starts from, and the loaded model holds another value, a ConversionWarning now names them. The scan follows save/reset as BNG2.pl does; each change is judged in the model's own arithmetic, so a setConcentration to the species' declared amount is not named. The loading docs and from_bngl docstring now say which actions before generate_network apply, and the benchmark README says the suites run each network from its seed state, not the published protocol.
…d no BNG2.pl (lanl#1366) On a runner without BioNetGen the twelve network tests skipped, and took the Ubuntu leg's skip count past its ceiling (227 > 225). The judging needs only a network: a hand-written .net of the same model serves. The three tests that go through from_bngl itself still need BNG2.pl.
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.
Addresses #1366, items 1, 3 and 4. Item 2, replaying the protocols in the suites, is a maintainers' call and needs #1364 (#1377) first, so it is not in this PR.
What #1366 asks, and what this does
Model.from_bngldrops a BNGL file's actions aftergenerate_networkas the author's experiment (intended, documented). The issue asks whether loading such a file should say so when it matters (3), whether the docs describe it right (4), and whether the benchmark READMEs should say what the suites simulate (1).3, the warning. A
ConversionWarningnow names the dropped actions that set a parameter or a concentration the firstsimulateorparameter_scanstarts from, where the loaded model holds another value._bngl_loader.state_changes_before_first_run):generate_network, wheregeneration_sourcecuts;save/resetConcentrationsandsave/resetParametersas BNG2.pl does.dropped_state_changes):setParameterto the parameter's own value is not named;setConcentrationto the species' own amount, the value evaluated in the model's own arithmetic, so"Ag_tot_1"compares as the number it is;addConcentrationof 0;protocol=Truereturns the actions instead, without the warning.Why the second step. The text scan alone flags 95 of the repo's 1,068
.bnglfiles. Of the 94 that load, 53 set everything to what the model already holds:setConcentration("Ag(DNP)","Ag_tot_1")on a species seeded withAg_tot_1,setParameter("ART",0)on anARTdeclared 0. A warning on those would be wrong more often than right. The 41 that warn hold 56 actions that change a value by the model's own numbers. Five of them are species written with their components in another order than the network's canonical name (LPS(MD2,TLR4,CD14,LPS)forLPS(CD14,LPS,MD2,TLR4)), which the check matches.This corrects the issue's table. Two of the six "first simulated state differs" files do not differ:
egfr_pathdeclaresEGF 0, so itssetConcentration("EGF",0)is a no-op. The run that matters is the opposite: it addsEGF_totonly after equilibrating, so the ODE suite's 120 segfr_pathrun has no ligand. 3 of its 18 species move (Grb2 and Sos settle); withEGF_totadded, all 18 do.mwcdeclarescoopRTandcoopB0, the values its actions set.egfr_net_red(egf(r)0 before equilibrating) andwofsy_goldstein(alpha0.01 → 0.1; itsbetais already 0.01) do differ, and warn.4, the docs.
loading-models.mdand thefrom_bngldocstring said onlygenerate_networkruns. Actions before it are applied, as BNG2.pl applies them, except runs and file writes. Both now say so, and describe the warning.1, the benchmark README. A paragraph in
benchmarks/README.md's Benchmarking section says the suites run each network from its seed state over the suite's horizon, not the published protocol. It explains why parity and timing still compare like with like, and gives theegfr_pathcase.Tests (
test_bngl_dropped_state_changes.py, 19).net, no BNG2.pl)addConcentrationof 5 is named; controls, not named: a parameter to its value, a species to its amount, to the expression it was seeded from, with its components in another order, adding 0; only the changing actions are named; an unnamed species counts as a changefrom_bngl(3, need BNG2.pl)protocol=True;protocol=Truedoes not warn;wofsy_goldsteinwarns onalphaand notbeta, andegfr_pathdoes not warnBefore this PR,
from_bnglgave no warning at all, so each test that expects one fails on main (K1 below).Mutations
resetConcentrationsignoredaddConcentrationnever namedMeasured
.bnglfiles, the scan flags 95. 94 of those load (one generates no network), and 41 warn. Inbenchmarks/models/bngl(103 files), 3 warn: bothegfr_net_redandwofsy_goldstein.test_loads_a_corpus_model_and_simulatesloadingegfr_net_red.bngl, a true one.pre-commit run --all-files(new files staged) andsphinx -Ware clean.