The distribution mentioned above comes with pre-compiled binaries (executables) for the ODE, SSA and PLA engines. However, developers can compile their own binaries assuming they have appropriate compilation tools (autoconf, etc).
First, you'll need to pull in or update the git submodules (currently NFsim and atomizer). To do this, enter the following at the terminal:
git submodule init
git submodule update
At a terminal, type the following to build NFsim and atomizer:
cd <bngpath>
make
Make sure you have Ninja and CMake. For more detailed information, please see the NFsim repo. From a PowerShell prompt, type the following:
cd ../../nfsim_src
mkdir build
cd build
cmake -G "Ninja" ..
ninja
If you have Windows, try Strawberry Perl, (see http://strawberryperl.com/). Perl is also available for Windows users within the Cygwin environment.
Make sure Cygwin used is for the appropriate Windows architecture (32/64 bit).
Make sure Cygwin has developer tools installed (Select Devel when installing
Cygwin). Extract folders cvode-2.6.0
and muparser_v2_2_4
to
<bngpath>\Network3
from archives in <bngpath>\libsource
. In the Cygwin
terminal:
cd <bngpath>\Network3
autoreconf --no-recursive --install
./configure --disable-shared --prefix=<bngpath>
make
make install
make clean
Using BioNetGen from the Windows command prompt can throw Missing DLL errors.
These DLLs are specific to the Cygwin version used and found in Cygwin\bin.
Copy them to <bngpath>\bin
to resolve these errors. The required DLLs for the
64-bit version are:
- cygwin1.dll
- cygstdc++-6.dll
- cygz.dll
- cyggcc_s-seh-1.dll.
Developers preparing a new distribution can simply run the following command:
cd <bngpath>
make dist
This will create a tarball called '/BioNetGen-.tgz'.
Example models are provided in the Models2 folder. To run them, go to the Models2 directory, and type:
../BNG2.pl <model>.bngl
where is one of the models found in the Models2 directory.
To validate the BioNetGen installation:
- run the Perl script
<bngpath>/Validate/validate_examples.pl
. - if any tests fail, look at the log files for more information.
PLEASE NOTE: Stochastic simulation tests rely on statistical validation. Occasionally a validation will fail due to outliers. The current validation script only reports stochastic validation failures if they occur TWICE in a row. Therefore, if this occurs there is a good chance that something is wrong. To confirm, we suggest rerunning the validation script at least once. Single tests may be run by passing the model basename as an argument.