C++ version of GeneNetWeaver
See also http://sourceforge.net/projects/gnw/
To simulate time series with constant input, add
GnwSettings::Instance()->generateTsConstantInput(true);
in main.cpp, otherwise keep this flag false.
-
Generate network topology by the
generate_graphfunction inpython/network.py, implemented with theNetworkXlibrary. Within the script, one can specify the size of the network, the number of networks and the directory to save the edge list.tsvfile. For example, start a python console byipythonwithin thepython/directory, thenfrom network import generate_graph generate_graph('scalefree') -
Use GNW to generate the time series. To submit the job to the SGE queueing system, use the
gnw.shscript, or for examplefor i in `seq 1 50`;do qsub -t 1-100 gnw.sh scalefree2 $i;doneHere the
-toption ofqsubspecifies the range of the array job, i.e. the same job is submitted in parallel withSGE_TASK_IDranging from 1 to 100, which is the index of different network topologies.scalefree2is the name of the network, and the second argument$iruns from 1 to 50, which is the index of different perturbations in this case.For the simulation of only one network, the equivalent is
qsub -t 1 gnw.sh scalefree2 1Use
watch qstatto monitor the progress of all jobs. -
Convert the GNW output to proper format.
python/gnw_parser.pyconverts the time series (*multifactorial_timeseries.tsv) to format that is readable by thehitmdstool and save it in themds/subdirectory, to run in parallelqsub -t 1-100 python/fnet.sh scalefree2 50The array job range 1-100 defines the number of unique network topologies, and the last argument 50 is the number of different perturbations.
In order to convert the sbml parameter file to a plain text file readable by R, use the
python/param_loader.pyscript. One can open up the script in any text editor and go to the line withif __name__ == '__main__':, which is the main function. In general, the python script loops through all sbml files generated by different topologies and spits out 3 files (*_delta.csv, *_k.csv, *_n.csv) saving the decay rate (delta), dissociation concentration (k) and Hill coefficient (n) respectively. -
Run MDS. Code is located in the
github/mdsrepository, see the documentation there or in a nutshell, one can submit the job to the queueing system byfor i in `seq 1 100`;do qsub -t 1-50 mds.sh scalefree2 $i;doneNotice that the syntax is similar to the
gnw.shscript, but the network and perturbation index are interchanged, such that the array job index 1-50 denote different perturbations and the loop index 1-100 denote different topologies. -
Convert MDS coordinates to p-values with
github/mds/R/response.R. Currently this R script cannot be submitted to the queueing system and therefore only runs on the head node. If one has multiple networks, one can use the bash scriptgithub/mds/R/response_loop.sh, which is basically a sequential loop.