ModelPolisher
ModelPolisher copied to clipboard
2.1 regression introduces invalid compartment and parameter references
This occurs on model https://www.ebi.ac.uk/biomodels/BIOMD0000000807
The error is very serious since it changes the mathematical interpretation of the model.
This method https://github.com/draeger-lab/ModelPolisher/blob/113b46764b2df15a0333e6a1244fa1215cee7c39/lib/src/main/java/de/uni_halle/informatik/biodata/mp/polishing/SpeciesPolisher.java#L84-L103
has two errors:
- It interprets the species ids
normalized_cancer_cell_a,normalized_cancer_cell_nandnormalized_cancer_cell_gas BiGG IDs and tries to create compartmentsa,nandg. This behaviour was preexisting. However, this is actually unwanted here, as the IDs do not in fact represent BiGG IDs.
i.e.
<species compartment="compartment" id="normalized_cancer_cell_a" [...]>
[...]
</species>
becomes
<species compartment="a" id="normalized_cancer_cell_a" [...]>
[...]
</species>
- Since a global parameter with id
aexists on the model, the method changes its id toa_non_compartment, but references to the parameter invariableattributes onassignmentRules are not updated. This behaviour is reckless and a regression that I introduced in the 2.1 branch.
i.e.
<parameter constant="false" id="a" metaid="COPASI32" name="a'" value="0">
[...]
</parameter>
becomes
<parameter constant="false" id="a_non_compartment" metaid="COPASI32" name="a'" value="0">
[...]
</parameter>
So two fixes are required here:
- we need to do better in detecting BiGG IDs
- we cannot change the IDs of non-compartment objects if a new compartment is created from a BiGG ID, but need to adapt the name of the new compartment instead