Getting Started

From Allosteric Network Compiler
Jump to: navigation, search

Getting started with ANC

General Support

If you have any questions or need help using ANC and creating models, only simply have feedback, please contact julien.ollivier AT

For help on installation, please ask your system's administrator or someone knowledgeable. If this does not resolve the problem, feel free to contact us.


Systems administrator privileges may be required to install some of the components below, in particular the CPAN Perl modules.

Ask your systems administrator for help if you experience difficulties with the installation.


ANC relies on the Facile network compiler to export compiled networks to a form suitable for simulation in Matlab or other tools.

The official download site and installation instructions for Facile is:

Facile is also available for download on the ANC website


ANC is straightforward to install and use on any UNIX-like platform that provides the Perl interpreter (version 5.8 or higher), a suitable shell (e.g. bash), and standard UNIX tools and commands, such as tar, make and gcc. The instructions below assume such a setup.

On OS-X, you will need to install the Xcode tools which provide these utilities. Xcode is supplied with the OSX installation disks or available on the following website:


On Windows XP, the easiest solution to provide UNIX compatibility is to install Cygwin, which provides a bash shell and many standard UNIX commands and applications. When installing, include the make, gcc, tar and perl packages. Once Cygwin is running, ANC can be installed by following the instructions below for UNIX environments.

On Windows 7 (64-bit), we have found that installation of the gcc4 Cygwin package was also required to correctly install CPAN modules (see below). If the gcc compiler reports errors about unknown compiler switches, installing gcc4 is likely to resolve the problem.

Windows Vista may also require gcc4 but we have not had the opportunity to test this.

Download/Unpack ANC

The ANC installation tarball can be downloaded from

Having downloaded ANC, the next step is to select an installation directory. Let's assume this is the directory ~/toolbox. Then execute the following commands:

mkdir -p ~/toolbox
cd ~/toolbox
tar -pxvzf <download_path>/anc_RELEASE_1V00.tar.gz

Environment Setup

The ANC_HOME environment variables should point to the installation directory, and an alias for ANC should be created. It is recommended to add the following lines to your ~/.bashrc file:

export ANC_HOME=~toolbox/anc_RELEASE_0V22
alias  anc='$ANC_HOME/'

You will have to start a new shell for these changes to take effect.

The rest of this manual assumes that is aliased as anc.

CPAN modules

CPAN is an internet database of Perl modules. ANC and Facile use several of them and they must be installed prior to use. You will need system administrator priviledges to install these modules. You should run the following commands on each system used:

sudo cpan -i Class::Std
sudo cpan -i Class::Std::Storable
sudo cpan -i WeakRef
sudo cpan -i String::CRC32


If you would like ANC to generate diagrams of the reaction network and species, you must install the GraphViz package on your system ( Executing the command

dot -V

will tell you whether Graphviz is already installed. If not, refer to the GraphViz website for installation instructions. Installation is usually straightforward; for example, on Ubuntu or Debian you use the apt-get command:

apt-get install graphviz

Regardless of which operating system you use, the following CPAN module is also required to use the GraphViz-related features:

sudo cpan -i GraphViz

Test installation

Test your installation by running Facile and ANC without any arguments:


An error will be reported if any of the required modules are still missing. Simply run CPAN again to install the missing module.

You can also test the aliases defined above by typing anc and facile.

Creating a Model

Any text file editor is adequate to create ANC models. To get started, first create a working directory somewhere then copy the example generic adaptor model file (corresponding to the adaptor of Figure 1 of the ANC paper) to the working directory. All examples are distributed as read-only files, and so need to be made writeable. You can then open your preferred text editor (e.g. xemacs) to edit the model as desired. In summary:

mkdir -p ~/adaptor
cd ~/adaptor
cp $ANC_HOME/examples/adaptor/adaptor_generic.mod .
chmod +w adaptor_generic.mod
xemacs adaptor_generic.mod

Compiling and Simulating

Compilation is straightforward (n.b. omit the --graphviz option if you didn’t install GraphViz):

anc --graphviz=canonical adaptor_generic.mod

This generates the file adaptor_generic.eqn. To generate scripts for simulation in Matlab, we use the Facile program:

facile -m -P adaptor_generic.eqn

This generates several Matlab .m files, including the adaptor_genericDriver.m and adaptor_generic.m files which contain a script to run the simulation and the system ODEs, respectively. Assuming Matlab is installed, we can simulate the system as follows:

matlab -r "run adaptor_genericDriver";

Finally, the following Matlab command plots the concentration of ligated adaptor proteins (i.e. AY) against time (n.b. this will only work if you used Facile’s -P option as indicated above):

plot (t, RESPONSE);