def test_missing_monomer_condition(): stmts = [Activation(Agent('BRAF'), Agent('KRAS'))] model = tra_module.assemble_model(stmts) entity = Agent('HRAS') quantity = tra.MolecularQuantityReference('total', entity) condition = tra.MolecularCondition('multiple', quantity, 10) tra.apply_condition(model, condition)
def test_apply_condition_multiple(): model = _get_gk_model() lst = KQMLList.from_string('(:type "multiple" :value 2.5 ' + ':quantity (:type "total" ' + ':entity (:description %s)))' % clj_map2k1) mc = tra_module.get_molecular_condition(lst) tra.apply_condition(model, mc) assert model.parameters['MAP2K1_0'].value == 250
def test_apply_condition_decrease(): model = _get_gk_model() lst = KQMLList.from_string('(:type "decrease" ' + ':quantity (:type "total" ' + ':entity (:description %s)))' % clj_map2k1) mc = tra_module.get_molecular_condition(lst) pold = model.parameters['MAP2K1_0'].value tra.apply_condition(model, mc) assert model.parameters['MAP2K1_0'].value < pold
def test_apply_condition_exact(): model = _get_gk_model() lst = KQMLList.from_string( '(:type "exact" :value (:value 0 :type "number") ' ':quantity (:type "total" ' ':entity (:description %s)))' % clj_map2k1) mc = tra_module.get_molecular_condition(lst) tra.apply_condition(model, mc) assert model.parameters['MAP2K1_0'].value == 0 mc.value.value = 2000 tra.apply_condition(model, mc) assert model.parameters['MAP2K1_0'].value == 2000