#13 GSoC’18 – OMEX archive support

Since the entire Systems Biology community is moving towards supporting OMEX files, one of the features I proposed was to add support to read OMEX files in SBSCL. OMEX files are archives which contain all the necessary information required to run a simulation. The official definition of OMEX files described in the original publications is:

OMEX is the basis of the COMBINE Archive, a single file that supports the exchange of all the information necessary for a modeling and simulation experiment in biology. An OMEX file is a ZIP container that includes a manifest file, listing the content of the archive, an optional metadata file adding information about the archive and its content, and the files describing the model.

Adding OMEX support:

There are several Java libraries available to work with the omex archive. After discussing with my mentors, we decided to work with CombineArchive SEMS package. Using this package, I can read an omex file, extract the required information from the metadata file such as the location of SED-ML file, SBML model etc. Once I have the location for SED-ML and SBML, the rest of the process is simply handled by existing routines of the simulation library. A simple example code to do this should look as follows:

// read omex archive from location file
OMEXArchive archive = new OMEXArchive(new File(file));
if(archive.containsSBMLModel() && archive.containsSEDMLDescp()) {
// Execute SED-ML file and run simulations
	SEDMLDocument doc = Libsedml.readDocument(archive.getSEDMLDescp());
	SedML sedml = doc.getSedMLModel();

	Output wanted = sedml.getOutputs().get(0);
	SedMLSBMLSimulatorExecutor exe = new SedMLSBMLSimulatorExecutor(sedml, wanted, null);

	Map<AbstractTask, IRawSedmlSimulationResults> res = exe.runSimulations();
	if ((res == null) || res.isEmpty() || !exe.isExecuted()) {
		fail ("Simulatation failed: " + exe.getFailureMessages().get(0).getMessage());
	for (IRawSedmlSimulationResults re: res.values()) {
		// do something with results
// close the file object

In addition to a simple example, a JUnit test to check the feature was also added in src/test/java.

Let me know if any questions.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s