biosimulators / Biosimulators_PySCeS

PySCeS biochemical network simulation program via BioSimulators-compliant command-line interface and Docker container
https://docs.biosimulators.org/Biosimulators_PySCeS
MIT License
1 stars 0 forks source link

Record values of other observables #5

Open jonrkarr opened 3 years ago

jonrkarr commented 3 years ago
jmrohwer commented 2 years ago

Assignment rules can now be tracked. See https://github.com/PySCeS/pysces/issues/57#issuecomment-1128605118. Fixed in latest PySCeS Release (1.0.2).

jmrohwer commented 4 months ago

This continues the discussion from here where certain model outputs are not recorded.

The unrecorded variables are all assignment rules. In fact they are recorded by PySCeS, so it is a wrapper issue. Staying with Biomodels 297. I've had a brief look at the wrapper code. The wrapper records the simulation results here: https://github.com/biosimulators/Biosimulators_PySCeS/blob/2d97929994747fd30b5684393bb850839955b5eb/biosimulators_pysces/core.py#L158

@luciansmith I have verified that this array contains all the simulation data including the assignment rules, in fact it is the same data as in the model.sim DataFrame (refer here), just presented as a numpy array with or without labels.

It therefore has to do with filtering of the model attributes which as far as I can see happens here: https://github.com/biosimulators/Biosimulators_PySCeS/blob/2d97929994747fd30b5684393bb850839955b5eb/biosimulators_pysces/core.py#L309-L310

The rules are not part dynamic_ids nor fixed_ids as far as I can tell. I know too little about the wrapper implementation in general to be able to tell how this is generally done, or what would need to change for them to be recorded.

The assignment and rate rules are in a dictionary mod.__rules__ where the ID of each rule is the key. For each key (rule) the value is another dictionary with the following keys:

Hopefully this will give you sufficient info to track this down further. Unfortunately I don't have time in the coming weeks to work on this myself.