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

Problem with wc_lang_io.Reader unit checking #142

Open
artgoldberg opened this issue Nov 20, 2020 · 1 comment
Open

Problem with wc_lang_io.Reader unit checking #142

artgoldberg opened this issue Nov 20, 2020 · 1 comment

Comments

@artgoldberg
Copy link
Contributor

Model dfba_test_model_RateLaw_Units_cannot_be_defined.xlsx has good rate units, '1 / second' or 's^-1'.
But wc_lang.io.Reader().run('dfba_test_model_RateLaw_Units_cannot_be_defined.xlsx', validate=True) reports a validation error:

E      ValueError: The model cannot be loaded because it fails to validate:
E        RateLaw:
E          r1-backward:
E            'units':
E              Units must be defined
E          r1-forward:
E            'units':
E              Units must be defined
E          r2-backward:
E            'units':
E              Units must be defined
E          r2-forward:
E            'units':
E              Units must be defined
E          r3-forward:
E            'units':
E              Units must be defined
E          r4-forward:
E            'units':
E              Units must be defined

Using current version of wc_lang.

Cannot find a way to satisfy the validation. Possible, but unlikely, hint: Excel tip says "Rate units", not "Units".
dfba_test_model_RateLaw_Units_cannot_be_defined.xlsx

@artgoldberg
Copy link
Contributor Author

Using this wc_lang.cfg:

[wc_lang]
    EXTRACELLULAR_COMPARTMENT_ID = 'e'

    [[io]]
        strict = False
        validate = True

    [[dfba]]
        exchange_reaction_id_template = '__dfba_ex_{}_{}_{}'
        exchange_reaction_name_template = 'dFBA exchange ({}, {}, {})'

        [[[flux_bounds]]]
            min_reversible = -1000
            min_irreversible = 0
            max = 1000
            ex_carbon = 1.000e-6 # M s^-1
            ex_no_carbon = 1.667e-6 # M s^-1

    [[validation]]
        validate_element_charge_balance = False

artgoldberg added a commit to KarrLab/wc_sim that referenced this issue Dec 2, 2020
…tions were split by SplitReversibleReactionsTransform in PrepForWcSimTransform; enables great simplification of determine_bounds(); simplify by not bounding individual reactions to stop species populations from going negative in the next time step -- just use separate constraints that prevent this; ensure that all reactions are irreversible; unify treatment of pseudo-reactions; set correct reversible attributes for rxns in dfba_test_model.xlsx; skip exception from Validator errors until KarrLab/wc_lang#142 is resolved for fixtures/dfba_test_model.xlsx; simplify by making/using dict. of all wc_lang.DfbaObjReactions; stop warning when exchange reactions don't have the form 's ->'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant