Installation
Build from source
To build SBNE from its source code you need to:
Build libSBML from source (with enabled layout and render packages)
As SBNE depends on libSBML, first, it is required to build the latest version of libSBML from its source. In doing so, this video and instruction page can come in handy for you. As, for SBNE, we need to build libSBML with its Layout and Render extensions, while following these instructions, you must remember to check ENABLE_LAYOUT and ENABLE_RENDER boxes in CMake-gui configuration of libSBML.
Build SBNE from source
The steps to build SBNE from its source code are as follows:
Create a directory for your entire SBNE project. This directory has to be placed in somewhere not admin-blocked and is recommended to have the following file structure:
<root directory> ├── build ├── install ├── source
Clone or download SBNE source to <root directory>/source.
Download and Install CMake and then open CMake-gui.
Select
<root directory>/source/sbne-main(where the top-levelCMakeLists.txtis located) as the source directory.Select
<root directory>/buildas the build (binary) directory.Click “Configure” button and choose your compiler.
Note
At this step, CMake requires you to set the value of
sbml_DIRorlibsbml_DIR(depneding on your operationg system) to the directory wheresbml-config.cmakeorlibsbml-config.cmakeis located under the install directory of libSBML.Set
CMAKE_INSTALL_PREFIXto<root directory>/install.Check
USE_GRAPHVIZbox if you want your SBNE to layout the network of models by Graphviz layout algorithms.Note
To integrate graphivz libraries into SBNE, you must have already installed Graphviz development tools. If you have done so, you can check
USE_GRAPHVIZbox at this step, and then CMake requires you to set the value ofGRAPHVIZ_PREFIXto the root directory where graphviz is installed on your machine.Check
WITH_PYTHONbox if you want to build the language bindings for Python.Note
If you check
WITH_PYTHONbox at this step, CMake will provide you withPYTHON_INSTALL_IN_PREFIXandPYTHON_INSTALL_WITH_SETUPoptions later. By checking the box associated with the former option, Python binidngs are installed in<root directory>/install/lib/pyhton[version]/site-packages/libsbneand by checking the box associated with the latter one they will be installed to the standard location for third-party Python modules.Check
WITH_GUIbox if you want to build SBNE-GUI.Note
To build SBNE-GUI, Qt5 development tools are needed to be already installed on your machine. In that case, if you check
WITH_GUIbox at this step, CMake requires you later to set the value ofQt5_DIRto the directory whereQt5Config.cmakeand other Qt dependencies are located.Click “Configure” button time and again until no red variable row remains.
Click “Generate” button.
Now that you have figured out all the configuration settings, all you need is building the project as follows:
On Windows, you can either click on “Open Project” button on CMake-gui or open the generated
.slnfile in<root directory>/buildin Visual Studio. Once Visual Studio is launched, change the configuration to “Release”, and buildALL-BUILDandINSTALL.On macOS and Linux, simply go to
<root directory>/buildand runmakeand thenmake installon terminal.
Install Python package
The Python bindings of SBNE API can be installed using a “pip install” as a collection of pip packages (currently on TestPyPI):
$ pip install -i https://test.pypi.org/simple/ libsbne
Download SBNE binaries
Installation with precompiled binaries is provided for users who intend to use SBNE without changing its source code. Using Qt Installer Framework, we have created installers for Microsoft Windows (.exe), macOS (.dmg), and Linux (.run) platforms, which are available in the Releases page of the repository on GitHub.