About
The Complexity project will be a home for various tools and libraries associated with
modelling complex systems.
Initially featured will be the Central Dogma suite of Gene Regulatory Network (GRN)
simulation tools and libraries, which have been recently released by the
Australian Research Council Centre in Bioinformatics.
Libraries
The following libraries are currently released:
|
Provides an abstract framework for quickly implementing simulations.
Currently includes a number of GRN related simulations.
|
|
Provides a high level networking library. Networks are able to be defined and manipulated in a simulation indepdenant manner.
Networks may be loaded and stored in either Pajek or XML format.
|
|
Provides a genome representation that can be manipulated in various ways.
This library is used by the simulation library to create artificial genomes and map artificial genes.
|
|
Provides an abstract layer for random number generation.
Currently includes an implementation of the Mercenne Twister algorithm.
|
librandom
provides an extensible random number generation facility that
currently supports the mercene twister algorithm.
Example
#include <imb/jsh/random/RandomNumberGenerator.h>
#include <cstdio>
using namespace imb::jsh::random;
// Generates a series of random numbers (each of which is printed to the
// screen) until one is found that is equal to or below 0.2.
int main( int argc, char** argv )
{
RandomNumberGenerator* number_generator = RandomNumberGenerator::getInstance();
if ( number_generator )
{
double rnum;
do
{
rnum = number_generator->randomRealNumber();
fprintf( stdout, "%f\n", rnum );
}
while ( rnum > 0.2 );
}
delete number_generator;
return 0;
}
libgenome
provides classes for representing genetic information.
These classes are currently used by the libnetwork
library to generate artificial
genomes, but also can be used for real genomic data.
Example
#include <openocl/base/String.h>
#include <imb/jsh/random/RandomNumberGenerator.h>
#include <imb/acb/genome/DNA.h>
#include <imb/acb/genome/NucleicAcid.h>
#include <cstdio>
using namespace openocl::base;
using namespace imb::jsh::random;
using namespace imb::acb::genome;
// Creates a DNA strand 1000 nucleotides long, then uses the random number
// generator to set the value of each nucleotide position. Finally prints
// the DNA sequence to the console.
int main( int argc, char** argv )
{
const int DNA_LENGTH = 1000;
RandomNumberGenerator* number_generator = RandomNumberGenerator::getInstance();
if ( number_generator )
{
DNA dna( DNA_LENGTH );
number_generator->seed( 5 );
for ( int i=0; i < DNA_LENGTH; i++ )
{
double rnum = number_generator->randomRealNumber();
if ( rnum < 0.25 )
{
dna.setNucleotide( i, NucleicAcid::A );
}
else if ( rnum < 0.50 )
{
dna.setNucleotide( i, NucleicAcid::T );
}
else if ( rnum < 0.75 )
{
dna.setNucleotide( i, NucleicAcid::G );
}
else
{
dna.setNucleotide( i, NucleicAcid::C );
}
}
{
String* str = dna.toString();
fprintf( stdout, "\n%s\n", str->getChars() );
delete str;
}
}
delete number_generator;
return 0;
}
The libnetwork
library provides classes for the high level manipulate of network objects.
Included are network parsers and encoders that support both the pajek format as well as an xml format.
Although not necessary, it is expected that people will subclass the network
class to
provide an optimized implementation for specific simulation scenarios.
Example
#include <openocl/base/FormattedString.h>
#include <openocl/base/String.h>
#include <imb/jsh/random/RandomNumberGenerator.h>
#include <imb/jsh/network/Edge.h>
#include <imb/jsh/network/Network.h>
#include <imb/jsh/network/Node.h>
using namespace openocl::base;
using namespace imb::jsh::random;
using namespace imb::acb::genome;
// Create a network
int main( int argc, char** argv )
{
const int MAX_NR_OF_EDGES = 100;
RandomNumberGenerator* number_generator = RandomNumberGenrator::getInstance();
number_generator->seed( 5 );
{
Network network;
for ( int i=0; i < 10; i++ )
{
Node* node = new Node( i );
node->setLabel( ForamttedString( "%i", i ) );
network.addNode( node );
}
int edges = number_generator->randomNumber() % MAX_NR_OF_EDGES;
int remaining_edges = edges;
while ( 0 < remaining_edges-- )
{
int source = number_generator->randomNumber() % edges;
int sink = number_generator->randomNumber() % edges;
Edge* edge = new Edge();
edge->source = source;
edge->sink = sink;
if ( 0.5 < number_generator->randomRealNumber() )
{
edge->weight = 1;
} else {
edge->weight = -1;
}
network.addEdge( edge );
}
network.writeXML( stdout );
}
delete number_generator;
return 0;
}
The libsimulation
library provides a number of classes related to the simulation of
Boolean networks such as Random Boolean Networks (RBNs) and Artificial Genome (AG) style networks.
Publications
J. Hallinan, D. Bradley, J. Mattick and J. Wiles (2006)
Effects of an RNA control layer on the state space of Boolean models of genetic regulatory networks.
2006 IEEE Congress on Evolutionary Computation (CEC), 16-21 July, 2551-2555.
Available from:
IEEE Xplore
J. Hallinan, D. Bradley and J. Wiles (2006)
Effects of Constitutive Gene Expression on the Dynamics of Random Boolean Networks.
2006 IEEE Congress on Evolutionary Computation (CEC), 16-21 July, 22355-2361.
Available from:
IEEE Xplore