Giter Site home page Giter Site logo

draeger-lab / sbscl Goto Github PK

View Code? Open in Web Editor NEW
20.0 9.0 13.0 242.25 MB

The Systems Biology Simulation Core Library (SBSCL) provides an efficient and exhaustive Java implementation of methods to interpret the content of models encoded in the Systems Biology Markup Language (SBML) and its numerical solution.

Home Page: https://draeger-lab.github.io/SBSCL/

License: GNU Lesser General Public License v3.0

Java 7.09% HTML 89.14% Shell 0.03% CSS 0.10% TeX 2.26% R 0.04% Mathematica 0.02% Rich Text Format 1.33% Batchfile 0.01%
simulation sbml java flux-balance-analysis fba ordinary-differential-equations solver numerical-simulations ode-solver time-series-analysis

sbscl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sbscl's Issues

SBML TestSuite failing test semantic/01488/01488 `java.lang.ArithmeticException: arcsech(0) undefined`

Test fails due to: java.lang.ArithmeticException: arcsech(0) undefined

java.lang.ArithmeticException: arcsech(0) undefined

	at org.sbml.jsbml.util.Maths.arcsech(Maths.java:145)
	at org.simulator.sbml.astnode.ASTNodeInterpreter.arcsech(ASTNodeInterpreter.java:727)
	at org.simulator.sbml.astnode.ASTNodeValue.computeDoubleValue(ASTNodeValue.java:408)
	at org.simulator.sbml.astnode.ASTNodeValue.compileDouble(ASTNodeValue.java:284)
	at org.simulator.sbml.astnode.ASTNodeInterpreter.functionDouble(ASTNodeInterpreter.java:192)
	at org.simulator.sbml.astnode.FunctionValue.computeDoubleValue(FunctionValue.java:121)
	at org.simulator.sbml.astnode.ASTNodeValue.compileDouble(ASTNodeValue.java:284)
	at org.simulator.sbml.astnode.ASTNodeInterpreter.functionDouble(ASTNodeInterpreter.java:190)
	at org.simulator.sbml.astnode.FunctionValue.computeDoubleValue(FunctionValue.java:121)
	at org.simulator.sbml.astnode.ASTNodeValue.compileDouble(ASTNodeValue.java:284)
	at org.simulator.sbml.astnode.RuleValue.processAssignmentVariable(RuleValue.java:128)
	at org.simulator.sbml.astnode.AssignmentRuleValue.processRule(AssignmentRuleValue.java:102)
	at org.simulator.sbml.SBMLinterpreter.processRules(SBMLinterpreter.java:2511)
	at org.simulator.sbml.SBMLinterpreter.init(SBMLinterpreter.java:1475)
	at org.simulator.sbml.SBMLinterpreter.<init>(SBMLinterpreter.java:564)
	at org.simulator.sbml.SBMLTestSuiteTest.testModel(SBMLTestSuiteTest.java:144)
	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Misinterpretation of function variables with parameters

This issue occurs when the bvars defined in the FunctionDefinition of the model are same as the defined ids for the parameters. The simulator misinterprets the function variables as the parameters and calculates the results by considering the values of the parameters.

This issue is encountered while running the SBML L3V2 model of the 1492 test case from the SBML Test Suite. Similar is the issue for the test case 1493.

In the test case 1492, function with id my_piecewise is defined as piecewise(x, y, z) where x, y, and z but simulator misinterprets them with the parameters defined with the same id.

Below is the screenshot of the result from the simulator for test case 1492 where z simply takes the value of parameter x (instead of some defined formula) as piecewise(x, y, z) => x if y > 0 else z.

Screenshot from 2020-06-17 00-13-15

Number of points in SED-ML simulations incorrect

From @matthiaskoenig on June 15, 2018 9:29

There must be an additional point in the time course simulations. This is some madness the original SED-ML editors thought of and everybody implements incorrectly.

The attribute numberOfPoints of type integer describes the number of points expected in the result. Software interpreting the uniformTimeCourse is expected to produce a first outputPoint at time outputStartTime and then numberOfPoints output points with the results of the simulation. Thus a total of numberOfPoints + 1 output points will be produced.

Copied from original issue: shalinshah1993#44

FBA tests fail on parallel testing

This issue occurs while testing the SBML models with FBC extension from the SBML Test Suite.

The main problem behind this seems to be due to the GLPK Solver.
@matthiaskoenig also pointed out this:

Like mentioned in the discussion, the GLPK can probably not be run in parallel via threads.
See http://glpk-java.sourceforge.net/usage.html:

The GLPK library is not thread safe. Never two threads should be running that access the GLPK library at the same time. When a new thread accesses the library it should call GLPK.glp_free_env(). When using an GlpkTerminalListener it is necessary to register GlpkTerminal again by calling GLPK.glp_term_hook(null, null).

The only reason why this works in the TestRunner is because it starts a separate Java program for every test.

Incorrect output curve for repressilator output #3

From @shalinshah1993 on July 18, 2018 21:48

Weirdly, SBSCL gives correct output curves for "pre-processing" and "time-course" simulations but not for "post-processing". The post-processing output has 3 different data references and it makes me confused as to how this should be implemented.

How can an output have 3 curves with different xDataGenerators? If the x-axis is different entities then they should all just be different graphs. For example, graph A has x-axis time, graph B has x-axis as species A population.

image

Copied from original issue: shalinshah1993#58

No output generated for osci-nested-pulse sedml example

From @shalinshah1993 on July 1, 2018 17:15

While testing oscli-nested-pulse example, SBSCL gives a warning about a data generator with a MathML element.

01.07 13:08:05 WARNS org.simulator.sedml.ProcessSedMLResults@236: Math could not be executed for data generator J0_v0_1

A similar error (or warning) is thrown with the repeated-scan-oscli example for one of its data generators.

01.07 13:19:50 WARNS org.simulator.sedml.ProcessSedMLResults@236: Math could not be executed for data generator S1_1

Copied from original issue: shalinshah1993#49

Remove org.simulator.examples folder

From @shalinshah1993 on July 11, 2018 20:21

Currently, the simulation library has some redundant code. All the early examples implemented to test features are in org.simulator.examples folder. However, they are redundant now since similar JUnit tests exist in src/test/java folder.

Copied from original issue: shalinshah1993#54

Update the project's website

The project's website does not properly describe the software anymore and needs to be updated:

  • The landing page does not mention constraint-based modeling (flux balance analysis)
  • CellML is highlighted as a supported format, but at the moment an implementation is lacking.
  • Instead, the library supports OMEX archives, which is not stated
  • Examples, particularly from the corresponding demo repository should be highlighted

In addition, we may think about removing the relatively prominent boxes surrounding the headlines and adjusting the style.

Add delay property to the rateOf function

Currently, whenever the rateOf is defined inside the delay tag for any of the SBML model then it does not take that delay into account and just provides the rateOf values as the time proceeds.

Issue found while simulating the model 1400, 1401 from SBML Test Suite.

Screenshot of simulation result for the model 1400:
Screenshot from 2020-06-17 00-36-35

Here, for the parameter with id P1, the assignment rule is defined to have a delay of 1 in calculating the rateOf while for the parameter with id P0; its only calculating rateOf with time. But the results show that P0 and P1 are just having the same values all the time, which means the delay is not considered here.

Improve the curation level on BioSimulators

The website biosimulators.org collects various simulation engine and stand-alone tools for simulation in systems biology. SBSCL is among them but currently with suboptimal curation level indication.

The curation level is calculated based on how much information is provided and whether that information has been verified.

  • 5: Containerized command-line interface that is consistent with SED-ML, KiSAO, COMBINE, and other conventions for simulation results, logs of simulations, command-line interfaces, Docker images, etc. Compatibility is verified by our test suite.
  • 4: Docker image which has not been verified or is not consistent with these conventions.
  • 3: Algorithm parameters are annotated.
  • 2: Algorithms are annotated.
  • 1: A record in the database.

Level 3 is easy to reach, and doesn't require any code. The easiest way to achieve level 5 is to use our Python library to build a consistent Python API and command-line program and then containerize this command-line program. This would entail implementing a callback function which can execute a single SED-ML task and return the results of the required observables as a dictionary of numpy arrays. This function could be implemented using a Python-Java bridge. All other SED-ML, KiSAO, COMBINE, etc. functionality would be handled by our library. For Java, Ion has also incorporated some of the same functionality into a fork of jLibSEDML.

Once a containerized command-line interface is submitted to BioSimulators, it would be available for simulation through runBioSimulations.

A contact person for working on this is @jonrkarr.

SED-ML FileResolver is broken

From @matthiaskoenig on June 11, 2018 15:37

It seems to me that the SED-ML file resolver is not working correctly. When trying to resolve relative URIs for models it resolves them relative to the current working directory, but it should resolve relative to the SED-ML absolute path!

This breaks the following test, which relies on a model abc_1.xml located next to the SED-ML file sed1.xml.

@Test
public final void testBasicSEDMLExecutorForLocalFile() throws XMLException, IOException 

Copied from original issue: shalinshah1993#32

Refactor FERN classes to use SBSCL classes

@draeger, @matthiaskoenig, @zakharc, @shalinshah1993
This issue is created for discussion of making FERN use the classes from SBSCL for interpreting and processing the models to perform the stochastic simulation.

Here's the UML of classes related to the Network interface.
Screenshot from 2020-08-06 22-35-01

Here, it is seen that there are further classes extending the Network interface performing different things and to note the most important thing that PropensityCalculator class (using the Network) makes use of the MathTree class which creates an instance of SBMLinterpreter (each time it is invoked) for calculating the node values. So, I am quite confused about how to proceed for refactoring FERN to interpret the model using the SBMLinterpreter and pass it to the stochastic simulator as many things are interlinked currently.

In SBSCL, we just have one class SBMLinterpreter which is like access to everything (also we don't have any propensity calculation and other mechanisms which are needed for the stochastic simulations). On the other side in FERN, there is AmountManager for managing amounts, AnnotationManager for storing annotation for the network, its species and reactions, SBMLEventHandlerObserver for events, SBMLPropensityCalculator for calculating propensities and same for other things.

Also, adding FERN's structure for performing stochastic simulation
Screenshot from 2020-08-06 22-33-01

Update uni-rostock maven dependencies

From @niko-rodrigue on June 11, 2018 13:51

See the end of the page https://sems.bio.informatik.uni-rostock.de/2013/10/maven-repository/:

Update!
As of January 2018 we’re now releasing our software through Maven central. We also switched the group id. It is now de.uni-rostock.sbi – so update your POMs. But don’t worry, you don’t need to update all the package names, the classes are still packaged as de.unirostock.sems.*. Find our artifacts published under de.uni-rostock.sbi at Maven Central.

Moreover, our Maven repository has moved to mvn.bio.informatik.uni-rostock.de (we installed an HTTP redirect for the former URL).
However, since we’re now releasing through Maven Central there is no need to integrate our 3rd-party server anymore. So forget about the snippet above and just update the group ids of our tools ;-)

So we need to update our pom files to remove their repo and change the group ids for their dependencies.

Copied from original issue: shalinshah1993#29

SBML Version Support Documentation

First I'll just mention that this library is awesome! Thank you for all your hard work on it. We're currently using it to simulate patient physiology in a branch of our synthetic patient generator which will hopefully get pulled into a release in the near future.

So, to the issue at hand:

It would be helpful to know which version of the SBML specification this library supports.

I just attempted to use the min and max operators which appear to have been added in the current version of the SBML spec (level 3 version 2, section 3.4.1). What surprised me is that the simulation ran without errors, but the output table had NaN values for parameters assigned with min and max operators in the equations. We can workaround this issue by using piecewise elements, but it would have been nice to know beforehand that the library wouldn't handle max and min properly.

Of course, this is all assuming that the current release of SBSCL doesn't support SBML level 3 version 2. If it is supposed to support those functions, then consider this a bug report as well :).

The docs mention which version of the SBML test suite the library is evaluated against, but doesn't mention anything about which versions of the spec are supported. I recommend adding this information to the docs and the README.

Example SEDML L1V2 files have errors

From @shalinshah1993 on June 12, 2018 17:38

Example files from SED-ML L1V2 specification can be found here.

Example 1: The algorithm KIASO ID 0000282 isn't supported by SBSCL.

Example 2: Running this model gives following error:

 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: 
  The resource was found at 
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: https://sourceforge.net/p/libsedml/code/119/tree/trunk/Samples/models/oscli.xml?format=raw
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: ;
you should be redirected automatically.


 
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
12.06 13:34:59 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@252: Illegal character (NULL, unicode 0) encountered: not valid in any content
 at [row,col {unknown-source}]: [12,8]
12.06 13:34:59 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@446: Simulation failed during execution: stepper with model: model1
[Fatal Error] :12:8: Content is not allowed in trailing section.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: 
  The resource was found at 
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: https://sourceforge.net/p/libsedml/code/119/tree/trunk/Samples/models/oscli.xml?format=raw
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: ;
you should be redirected automatically.


 
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
12.06 13:34:59 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@252: Illegal character (NULL, unicode 0) encountered: not valid in any content
 at [row,col {unknown-source}]: [12,8]
12.06 13:34:59 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@387: Simulation failed during execution: stepper with model: model1
Exception in thread "main" java.util.NoSuchElementException: No value present
	at java.util.Optional.get(Unknown Source)
	at org.simulator.sedml.SedMLSBMLSimulatorExecutor.run(SedMLSBMLSimulatorExecutor.java:402)
	at org.simulator.examples.SEDMLv2Example.main(SEDMLv2Example.java:45)

Example 3: The model source is E:\Users\fbergmann\Documents\sbml models\borisejb.xml.

Example 4: Running this model gives following error:

WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: 
  The resource was found at 
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: https://sourceforge.net/p/libsedml/code/119/tree/trunk/Samples/models/oscli.xml?format=raw
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: ;
you should be redirected automatically.


 
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
12.06 13:36:25 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@215: Illegal character (NULL, unicode 0) encountered: not valid in any content
 at [row,col {unknown-source}]: [12,8]
12.06 13:36:25 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@446: Simulation failed during execution: timecourse1 with model: model1
[Fatal Error] :12:8: Content is not allowed in trailing section.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: 302 Found
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: 
  The resource was found at 
 WARN (SBMLReader.java:1073) - Cannot find a parser for the  namespace
 WARN (SBMLReader.java:785) - Some characters cannot be read: https://sourceforge.net/p/libsedml/code/119/tree/trunk/Samples/models/oscli.xml?format=raw
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:785) - Some characters cannot be read: ;
you should be redirected automatically.


 
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
 WARN (SBMLReader.java:1301) - !!! event.isEndElement: there is a problem in your SBML file !!!!
 WARN (SBMLReader.java:1302) - This should never happen, there is probably a problem with the parsers used.
 Try to check if one needed parser is missing or if you are using a parser in development.
12.06 13:36:25 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@215: Illegal character (NULL, unicode 0) encountered: not valid in any content
 at [row,col {unknown-source}]: [12,8]
12.06 13:36:25 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@387: Simulation failed during execution: timecourse1 with model: model1
Exception in thread "main" java.util.NoSuchElementException: No value present
	at java.util.Optional.get(Unknown Source)
	at org.simulator.sedml.SedMLSBMLSimulatorExecutor.run(SedMLSBMLSimulatorExecutor.java:402)
	at org.simulator.examples.SEDMLv2Example.main(SEDMLv2Example.java:45)

Example 5: The model source is E:\Users\fbergmann\Documents\sbml models\borisejb.xml

Please give suggestions as to what changes should we make to these example files. Issue shalinshah1993#17 depends on this.

Copied from original issue: shalinshah1993#37

Remove old javadocs

From @shalinshah1993 on July 30, 2018 17:15

@draeger I think there is redundant old documentation https://github.com/shalinshah1993/SBSCL/tree/master/docs/javadoc which we should remove from the repo since maven automatically generates javadocs which we copy to docs/javadocs

Copied from original issue: shalinshah1993#62

Simulation of SBML models with changing compartment size

This issue is created to discuss the SBML Test Suite models where the values are dependent on the changing compartment size. Currently, the models are failing the tests with deviation in the results. Some of the models (from SBML Test Suite) with this issue are 1504-1514, 1198, 1478, 1498, and some others.

Discussing model 1504,
In this model, there is a compartment C1, species S1, and parameter x.
The rate rule defined for C1 is 0.2 and for S1 is 0.4 till the event with id _E0 is not triggered.

Now, here as the compartment is changing and the species are in concentration units, the derivative of species S1 will be calculated as below (replacing x by S1 in the image)

Screenshot from 2020-06-27 17-17-57

And, as the result requires the value of S1 in amount units, so the final S1 value will be

Note: P' -> shows the derivative of P

At t=0, the values are C1 = 0.5, S1 = 0.0, x = 0.0.

At t=1,
using the above equation,

So, the value of S1 should be (as the formula is given above)

But the results file from the SBML Test Suite gives S1 = 0.0208 at t = 0.1.

Run FBA tests on all BiGG models

From @matthiaskoenig on June 11, 2018 13:2

FBA simulations with all BiGG models should be performed and compared against reference solutions from cobrapy.
BiGG models are not part of the repository, but must be downloaded for testing in CI or locally. Access is via environment variable.

Copied from original issue: shalinshah1993#28

Remove repeated-steady-scan-oscli test

From @shalinshah1993 on July 1, 2018 17:27

This JUnit test needs to be removed since SBSCL doesn't support simulation algorithm with KIASO ID: 0000282. Currently, it throws an error for it.

01.07 13:34:31 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@418: Cannot simulate task task0 Either the simulation reference is corrupt or the simulation algorithm is not available.

Supported algorithms are: "KISAO:0000033","KISAO:0000030", "KISAO:0000087", "KISAO:0000088", "KISAO:0000019"

Copied from original issue: shalinshah1993#50

SBML TestSuite semantic/01592 takes 15-25 minutes to run

The test takes much too long to run. This creates a ton of problems. E.g. very long travis runtimes and also very long runtimes for the local tests. Tests should normally run < 100ms, upper bound is something of 1-5 seconds for very large and complicated tests. But minutes is too long.

This is most likely due to the delay in the model.

Cannot reach steadyState for repeated-steady-scan-oscli test

From @shalinshah1993 on July 3, 2018 15:5

On running this test, simulation-core cannot find a steadyState solution.

03.07 10:38:11 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@202: Required algorithm is not supported. Finding closest available match...
03.07 10:38:13 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@223: Running using KISAO:0000033 Rosenbrock method
Jul 03, 2018 10:53:38 AM org.simulator.math.odes.AbstractDESSolver steadystate
WARNING: Steady state could not be reached!

Copied from original issue: shalinshah1993#52

Support for FBA FROG analysis

SBSCL has a working FBA model solver. As part of the recent HARMONY we developed basic FROG guidelines. See also https://github.com/matthiaskoenig/fbc_curation/. SBSCL should support the generation of these files for a given FBA model. This would allow to check reproducibility easily between different solvers.
The biomodels database team would apply these guidelines for FBA model curation.

LPsolver not working on ubuntu linux (libglpkjni_x64.so: undefined symbol: lib_set_fault_hook)

From @matthiaskoenig on June 7, 2018 21:43

I added a simple test case for the solver in org.simulator.fba.CobraSolverTest.
When trying to run an optimization I get the following error:

org.simulator.fba.CobraSolverTest
/usr/lib/jvm/java-8-oracle/bin/java: symbol lookup error: /home/mkoenig/git/sbscl-shalin/libglpkjni_x64.so: undefined symbol: lib_set_fault_hook

Process finished with exit code 127

Do I need to install anything else? Copy glpk libraries somewhere?

Copied from original issue: shalinshah1993#24

Implement comp support

From @matthiaskoenig on June 12, 2018 7:38

Until now there is no comp support implemented! Only thing available is an example for a comp simulation. There must be a class which allows to simulate comp models which is called from the example.

Copied from original issue: shalinshah1993#34

Update the SBMLTestSuite Runner for L3V2

Update the SBMLTestSuiteRunner

  • to use latest test files
  • include SBML L3V2 tests
  • create parametrized tests (for every single test in the test runner to have a single test case)
  • refactor the test runner so collection of tests and running of a single test are separated
  • fail tests if they take > 60 seconds
  • allow to run test suite in parallel

see SBMLTestSuiteRunner, download_sbml-test-suite.sh

SBSCL expect one of the Output elements to be a time symbol

From @shalinshah1993 on June 15, 2018 0:40

On running repressilator.xml test, I found that it returns a NullPointerException when trying to execute the following plot2D output:

<plot2D id="postprocessing" name="Timecourse after post-processing">
      <listOfCurves>
        <curve id="plot_2__plot_2_0_0__plot_2_0_1" logX="false" logY="false" xDataReference="dg_2_0_0" yDataReference="dg_2_0_1"/>
        <curve id="plot_2__plot_2_1_0__plot_2_0_0" logX="false" logY="false" xDataReference="dg_2_1_0" yDataReference="dg_2_0_0"/>
        <curve id="plot_2__plot_2_0_1__plot_2_1_0" logX="false" logY="false" xDataReference="dg_2_0_1" yDataReference="dg_2_1_0"/>
      </listOfCurves>
    </plot2D>

This is because none of the x or y data references are time symbols.

This is understandable since originally SBSCL was complete command line library and therefore plot2D wasn't supported.

@draeger What do you recommend, when working with SED-ML files the output need not be MultiTable?

Copied from original issue: shalinshah1993#42

Event triggers before the mentioned condition

The issue occurs when the time csymbol is used in the condition to trigger an event.

While running the SBML L3V2 test case 1444 from the SBML Test Suite, I see that the event should trigger at the time t >= 5 but in results, the event is triggered at the time t = 4.

A similar issue occurs for test cases 1445, 1446, 1447, and 1448.

Here is the screenshot of the result from the SBML Test Runner (for test case 1444)
Whenever the slope of the plot changes, at that time the event is triggered. (As per the model, it should trigger at t = 5)

Screenshot from 2020-06-14 23-52-26

Note: Left one is the predefined result from the SBML Test Suite while the right one is the SBSCL simulator's result.

Simulation of models with reaction without reactants and products

As the new SBML Level 3 Version 2 models now allow for reactions without reactants and products, this support has to be added to the SBSCL simulator. Currently, the simulation fails with a warning by giving NaN values in results.

The result after simulating the test case 1300 from SBML Test Suite:

 WARN (SBMLCoreParser.java:477) - The reaction 'J0' does neither contain any reactants nor products.
[Time] [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0], [p1], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN], [NaN]]

A similar problem exists for test case 1301 and 1302.

Example OMEX file contains wrong model file name

The SED-ML file repressilator-sedml.xml within the OMEX archive /src/test/resources/omex/12859_2014_369_MOESM1_ESM.zip contains an invalid reference to the model:

<model id="model1" name="Repressilator-regular oscillations" 
  language="urn:sedml:language:sbml.level-2.version-3"
  source="./BIOMD0000000012,xml" >

The exectution of the archive is therefore compromised.

Incorrect graphical output for some sedml tests

From @shalinshah1993 on July 23, 2018 15:9

The tests that do not give correct answers:

  • osci-nested-pulse
  • repeated-scan-osci
  • repeated-steady-scan
  • repeated-stochastic-scan
  • param-scan-2D

The graphical outputs are exactly the same for all the repeated tasks i.e. the individual iterations don't apply changes from the listOfChanges sedml element.

Copied from original issue: shalinshah1993#60

Postprocessing function for SED-ML files not working any more

From @matthiaskoenig on June 11, 2018 15:33

Somehow the post-processing for SED-ML is broken.
This can be seen with the following failing test:

    @Test
    public final void testBasicSEDMLExecutorForMiriamURNDefinedModel() throws XMLException, 

Which calls the following for post-processing which was commented out. Where is the postprocessing code now?

	/**
	 * Process raw data from simulations and return a output MultiTable which contains wanted Output
	 * @param wanted
	 * @param res
	 * @return MultiTable
	 */
	public MultiTable processSimulationResults(Output wanted,
			Map<AbstractTask, List<IRawSedmlSimulationResults>> res) {
		
//		// Check for nulls
//		if (sedml == null || wanted == null || res == null) {
//            throw new IllegalArgumentException();
//        }
//		if(wanted.getAllDataGeneratorReferences().isEmpty()) {
//			LOGGER.warn("Data generator list is empty!");
//			throw new NullPointerException();
//		}
//		// Check that required output exisits in sedml
//		boolean found = false;
//        for (Output o : sedml.getOutputs()) {
//            if (o.getId().equals(wanted.getId())) {
//                found = true;
//            }
//        }
//        if (!found) {
//            throw new IllegalArgumentException("Output [" + wanted.getId()
//                    + "] does not belong the SED-ML object. ");
//        }
//        // calculate total number of rows in all the results
//        int numRows = 0;
//        for (AbstractTask t : res.keySet()) {
//        	List<IRawSedmlSimulationResults> result = res.get(t);
//        	for(IRawSedmlSimulationResults curRes: result) {
//        		numRows += curRes.getNumDataRows();
//        	}
//        }
//        
//        // Iterate over all the data generators and to process results
//        List<double[]> processed = new ArrayList<double[]>();
//        IXPathToVariableIDResolver variable2IDResolver = new SBMLSupport();
//        for (String dgId : wanted.getAllDataGeneratorReferences()) {
//        	double[] mutated = new double[numRows];
//            processed.add(mutated);
//            DataGenerator dg = sedml.getDataGeneratorWithId(dgId);
//            if (dg == null) {
//                LOGGER.warn("Empty data generator recevied. Correct SED-ML!");
//                return null;
//            }
//            
//            List<Variable> vars = dg.getListOfVariables();
//            List<Parameter> params = dg.getListOfParameters();
//            Map<String, String> Var2Model = new HashMap<String, String>();
//            Map<String, IRawSedmlSimulationResults> var2Result = new HashMap<String, IRawSedmlSimulationResults>();
//            Map<String, double[][]> var2Data = new HashMap<String, double[][]>();
//            String timeID = "";
//            // map varIds to result, based upon task reference
//            for (Variable variable : vars) {
//            	String modelID;
//
//                if (variable.isVariable()) {
//                    // get the task from which this result variable was generated.
//                    modelID = variable2IDResolver.getIdFromXPathIdentifer(variable.getTarget());
//                    String taskRef = variable.getReference();
//                    AbstractTask t = sedml.getTaskWithId(taskRef);
//
//                    // get results list for this task. If it is repeatedTask then multiple results
//                    List<IRawSedmlSimulationResults> resList = res.get(t);
//                    // set up lookups to results, raw data and model ID
//                    var2Result.put(variable.getId(), res);
//                    var2Data.put(variable.getId(), rawTask2Results.get(t));
//                    Var2Model.put(variable.getId(), modelID);
//                    // it's a symbol
//                } else if (variable.isSymbol()
//                        && variable.getSymbol().equals(VariableSymbol.TIME)) {
//                    timeID = variable.getId();
//                    var2Data.put(variable.getId(), rawTask2Results.values().iterator()
//                            .next());
//                    Var2Model.put(variable.getId(), variable.getId());
//
//                }
//            }
//        	
//        }		
        return null;
	}

Copied from original issue: shalinshah1993#31

Build icon in README links to incorrect page

The tests are currently failing for the latest commits, but the build icon links to another repository in the README which is passing

[![Build Status](https://travis-ci.org/shalinshah1993/SBSCL.svg?branch=master&style=plastic)](https://travis-ci.org/shalinshah1993/SBSCL)

Build Status
This is confusing and incorrect. Link to correct travis results page.

SBML L3V2 tests failing with no identified reason yet

Currently, for the SBML L3V2 models from the SBML Test Suite, about 69 tests are failing (ignoring the comp models). Some of them are failing due to some reasons (issues are opened for them separately), but this issue contains the test cases for which there is currently no reason for failing (deviating from the pre-defined results of the SBML Test Suite).

Here's the list (test case number of the models from the SBML Test Suite develop branch):

1208, 1454, 1480 (Seems to be a delay issue here also but not sure), 1520 (Seems trigger issue but not sure), 1575, 1583, 1589, 1626, 1754, 1758, 1759.

All the above models can be found here. (just provide the test case number)

I see that most models failing contains either delay or trigger or rateRule.

Remove repeated-stochastic-runs test

From @shalinshah1993 on July 1, 2018 17:38

This JUnit test needs to be removed since SBSCL doesn't support simulation algorithm with KIASO ID: 0000241. Currently, it throws an error for it.

01.07 13:34:31 WARNS org.simulator.sedml.SedMLSBMLSimulatorExecutor@418: Cannot simulate task task0 Either the simulation reference is corrupt or the simulation algorithm is not available.

Supported algorithms are: "KISAO:0000033","KISAO:0000030", "KISAO:0000087", "KISAO:0000088", "KISAO:0000019"

Copied from original issue: shalinshah1993#51

Add support for nested repeated tasks

From @shalinshah1993 on July 12, 2018 18:51

Currently, if an SED-ML file contains nested repeated tasks, simulation library will throw a warning Warning! Nested repeated task found and ignored!

At some point, this feature needs to be added to the simulation library. This issues thread serves as a discussion point.

Copied from original issue: shalinshah1993#55

Add support for rateOf csymbol

A new rateOf csymbol has been introduced to the SBML Level 3 Version 2. Support for rateOf needs to be added to SBSCL which can be done by creating a function calculating a rate of any particular variable that needs to be added in the ASTNodeInterpreter class of SBSCL. Currently the SBML L3V2 models containing rateOf symbol outputs NaN values as results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.