README.md 5.38 KB
Newer Older
ysard's avatar
ysard committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
CADBIOM (Computer Aided Design of Biological Models) is an open source modelling software.
Based on Guarded transition semantic, it gives a formal framework to help the modelling of
biological systems such as cell signaling network.


# Installation

## System requirements

CADBIOM is mainly developed in Python 2.7.
Before running Cadbiom, the following system packages have to be installed from
the distribution packages library (or similar, depending on your operating system):

* python-gtksourceview2
* python2.7-dev
* libxml2-dev
* libxslt1-dev
* libgraphviz-dev
* pkg-config (fix errors when installing pygraphviz and when config is not loaded...)
* python-glade2
* python-gtk2

You can install these dependencies with the following command (on Debian systems):

    sudo apt-get install python-gtksourceview2 python2.7-dev libxml2-dev libxslt1-dev libxslt1-dev libgraphviz-dev pkg-config python-glade2 python-gtk2


## Python requirements

Before using `cadbiom` library, the following Python packages
have to be installed from pypi repository:

* lxml
* networkx
* pygraphviz
* pycryptosat

Note: Cadbiom software requires a SAT solver which is
proposed as a Python wrapper by an independant library (pycryptosat).


For the library itself:

* From Python Package Index:

    pip install cadbiom_cmd


* From the current repository

    cd library && make install
    cd ../command_line && make install


For the command line tool:


* From Python Package Index:

    pip install cadbiom_cmd


* From the current repository

    cd library && make install
    cd ../command_line && make install


For the GUI:

* From Python Package Index:

    pip install cadbiom_gui


* From the current repository

    cd library && make install
    cd ../gui && make install


# Structure of packages

The library contains the cadbiom folder with 4 modules:

    antlr3 (folder)
    bio_models (folder)
    models (folder)

The command line tool exposes the command `cadbiom_cmd` to the current context.

The gui package exposes the command `cadbiom` to the current context.


# Utilization

## Command line

ysard's avatar
ysard committed
99
### General:
ysard's avatar
ysard committed
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

    $ cadbiom_cmd -h

    usage: cadbiom_cmd [-h] [-vv [VERBOSE]]
                        {compute_macs,sort_solutions,parse_trajectories,merge_cams}
                        ...

    optional arguments:
    -h, --help            show this help message and exit
    -vv [VERBOSE], --verbose [VERBOSE]

    subcommands:
    {compute_macs,sort_solutions,parse_trajectories,merge_cams}
        compute_macs        Parse arguments and launch Cadbiom search of MACs
                            (Minimal Activation Conditions). - If there is no
                            input file, there will be only one process. - If an
                            input file is given, there will be 1 process per line
                            (per logical formula on each line). - all_macs: Solver
                            will try to search all macs with 0 to the maximum of
                            steps allowed. - continue: If there is a mac file from
                            a previous work, last frontier places will be
                            reloaded.
        sort_solutions      Parse a solution file and sort all frontier places in
                            alphabetical order.
        parse_trajectories  Parse a complete solution file and make a
                            representation of trajectories.
                            The output is in graphml file format and is exported
                            in 'graphs' directory. .. note:: Requires the
                            model file.
        merge_cams          Merge solutions to a csv file. .. note:: CSV file:
                            <Final property formula>;<cam>


ysard's avatar
ysard committed
133
### compute_macs:
ysard's avatar
ysard committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157

    usage: cadbiom_cmd compute_macs [-h] [--input_file [INPUT_FILE]]
                                    [--combinations] [--steps [STEPS]]
                                    [--all_macs] [--continue]
                                    [--start_prop [START_PROP]]
                                    [--inv_prop [INV_PROP]] [--output [OUTPUT]]
                                    chart_file [final_prop]

    positional arguments:
    chart_file
    final_prop

    optional arguments:
    -h, --help            show this help message and exit
    --input_file [INPUT_FILE]
    --combinations
    --steps [STEPS]
    --all_macs
    --continue
    --start_prop [START_PROP]
    --inv_prop [INV_PROP]
    --output [OUTPUT]


ysard's avatar
ysard committed
158
### parse_trajectories:
ysard's avatar
ysard committed
159
160
161
162
163
164
165
166

    usage: cadbiom_cmd parse_trajectories [-h] chart_file sol_file

    positional arguments:
    chart_file
    sol_file

<br>
ysard's avatar
ysard committed
167
* Result:
ysard's avatar
ysard committed
168
169
170

[image](examples/graph_example_with_legend.png)

ysard's avatar
ysard committed
171
* Cytoscape styles:
ysard's avatar
ysard committed
172
173
174
175

[file](examples/styles.xml)


ysard's avatar
ysard committed
176
### sort_solutions:
ysard's avatar
ysard committed
177
178
179
180
181
182
183

    usage: cadbiom_cmd sort_solutions [-h] sol_file

    positional arguments:
    sol_file


ysard's avatar
ysard committed
184
### merge_cams:
ysard's avatar
ysard committed
185
186
187
188
189
190
191
192
193
194
195
196
197
198

    usage: cadbiom_cmd merge_cams [-h] [--output [OUTPUT]] [solutions_directory]

    positional arguments:
    solutions_directory


## Graphical User Interface

Usage:

    $ cadbiom


ysard's avatar
ysard committed
199
200
201
202
203
204
205
206
207
## Logging

Logs are stored in the system temporary dictory:

* On Windows, the directories C:\TEMP, C:\TMP, \TEMP, and \TMP, in that order.
* On all other platforms, the directories /tmp, /var/tmp, and /usr/tmp, in that order.
* As a last resort, the current working directory.


ysard's avatar
ysard committed
208
209
210
# License

CADBIOM is freely available on cadbiom.genouest.org,
ysard's avatar
ysard committed
211
and distributed under the terms of the GNU General Public License.