Open TlexCypher opened 10 months ago
The trick here is that CCn/A1 needs to be in parentheses in the jsbml version of the formula:
i.e. instead of:
CCn/A1^a
it needs to produce:
(CCn/A1)^a
(It could produce the 'pow' version instead, if that's simpler.)
@luciansmith Yes, that is what i wanna say! jsbml-1.6.1 can't parse this formula correctly, I think.
You are correct! Thanks for reporting the issue; hopefully the jsbml team will be able to get to it soon.
I'm gonna to try fix this bug!
Good luck! Feel free to post here with questions if you have any.
Hey, all. I used jsbml-1.6.1, current latest version of jsbml, but I found the method, ASTNode.toFormula() fails to parse the formula. To be specific, for testcase, I downloaded BIOMD0000000022.xml from BioModels(https://www.ebi.ac.uk/biomodels/search?query=BIOMD0000000022&domain=biomodels), and I wrote the program in C with libsbml.5.18.0 and java with jsbml-1.6.1. I attached the both result as libsbml-formula.txt and jsbml-formula.txt, so I wanna you'll check these, then you should compare the first line.
libsbml-formula.txt of first line
jsbml-formula.txt of first line
They are completely different. And I checked the related report(Robust oscillations within the interlocked feedback model of Drosophila circadian rhythm., but in this report, result by libsbml is correct.
And, I also checked core/src/org/sbml/jsbml/ASTNode.java.newASTNode, this file was revised 2 years ago, but jsbml-1.6.1 was released in Oct 2022. So even in latest version, jsbml has the bug around ASTNode.toFormula().
Any help, please.
libsbml-formula.txt jsbml-formula.txt