Skip to content

Commit 82d3fc3

Browse files
committed
Merge branch 'release'
2 parents dc42784 + 691b016 commit 82d3fc3

114 files changed

Lines changed: 5096 additions & 92 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
sudo: false
1+
dist: trusty
22
language: python
33
cache:
44
directories:
@@ -9,7 +9,9 @@ addons:
99
packages:
1010
- libgmp-dev
1111
- libgmp10
12-
- glpk
12+
- libglpk36
13+
- libglpk-dev
14+
- glpk-utils
1315
- swig
1416

1517
install:
@@ -28,7 +30,8 @@ install:
2830
fi
2931

3032
- pip install tox coveralls
31-
33+
- pip install tox-travis
34+
- pip install --upgrade six
3235
script: tox -v
3336
after_success: coveralls
3437
matrix:

NEWS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
v1.0 (2020-03-03)
2+
------------------
3+
4+
- Adds the new `modelmapping` command for mapping reactions and
5+
compounds ids between different GEMs.
6+
- Adds the new `psammotate` command for generating draft GEMs
7+
using a template model and a mapping of orthologous genes to
8+
another organism.
9+
- Adds the new `gimme` command which implements the GIMME algorithm
10+
as described in Becker and Palsson, 2008 (PMID: 18483554).
11+
- Updates the `search` command to allow for searching of strings
12+
within any reaction or compound property.
13+
- Updates to the `tableexport` and `excelexport` commands to allow
14+
for the export of additional gene and reaction information.
15+
- Adds new section to the tutorial to detail how to use the
16+
`findprimarypairs` commands.
17+
- Renamed `duplicatescheck` command to `dupcheck`.
18+
119
v0.31 (2017-06-30)
220
------------------
321

docs/api/bayesian.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.bayesian`` -- Bayesian Matching Functions
3+
=================================================
4+
5+
.. automodule:: psamm.bayesian
6+
:members:

docs/api/bayesian_util.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.bayesian_util`` -- Bayesian Matching Utility Functions
3+
==============================================================
4+
5+
.. automodule:: psamm.bayesian_util
6+
:members:

docs/api/graph.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.graph`` -- Graph Related Functions
3+
===========================================
4+
5+
.. automodule:: psamm.graph
6+
:members:

docs/api/importer.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.importer`` -- Import Functions
3+
=============================================
4+
5+
.. automodule:: psamm.importer
6+
:members:

docs/api/manual_curation.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.manual_curation`` -- Model Mapping Curation
3+
===================================================
4+
5+
.. automodule:: psamm.manual_curation
6+
:members:

docs/api/mapmaker.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.mapmaker`` -- Mapmaker Functions
3+
===================================================
4+
5+
.. automodule:: psamm.mapmaker
6+
:members:

docs/api/translate_id.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
``psamm.translate_id`` -- ID Translation Functions
3+
===================================================
4+
5+
.. automodule:: psamm.translate_id
6+
:members:

docs/commands.rst

Lines changed: 123 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ The tools that can be applied to metabolic models are run through the
1111
1212
This program allows you to specify a metabolic model and a command to apply to
1313
the given model. The available commands can be seen using the help command
14-
given above, and are also described in more details below.
14+
given above, and are also described in more detail below.
1515

16-
To run the program with a model, use
16+
To run the program with a model, use the following command:
1717

1818
.. code-block:: shell
1919
@@ -37,7 +37,7 @@ Linear programming solver
3737
-------------------------
3838

3939
Many of the commands described below use a linear programming (LP) solver in
40-
order to perform the analysis. These commands all take an option `--solver`
40+
order to perform the analysis. These commands all take an option ``--solver``
4141
which can be used to select which solver to use and to specify additional
4242
options for the LP solver. For example, in order to run the ``fba`` command
4343
with the QSopt_ex solver, the option ``--solver name=qsoptex`` can be added:
@@ -47,9 +47,9 @@ with the QSopt_ex solver, the option ``--solver name=qsoptex`` can be added:
4747
$ psamm-model fba --solver name=qsoptex
4848
4949
The ``--solver`` option can also be used to specify additional options for the
50-
solver in use. For example, the Cplex solver recognizes the ``threads``
51-
option which can be used to adjust the maximum number of threads that Cplex
52-
will use internally (by default, Cplex will use as many threads as there are
50+
solver in use. For example, the CPLEX solver recognizes the ``threads``
51+
option which can be used to adjust the maximum number of threads that CPLEX
52+
will use internally (by default, CPLEX will use as many threads as there are
5353
cores on the computer):
5454

5555
.. code-block:: shell
@@ -79,8 +79,8 @@ or with a specific reaction:
7979
8080
By default, this performs a standard FBA and the result is output as
8181
tab-separated values with the reaction ID, the reaction flux and the reaction
82-
equation. If the parameter ``--loop-removal`` is given, the flux of the
83-
internal reactions is further constrained to remove internal loops
82+
equation. If the parameter ``--loop-removal`` is given, the fluxes of the
83+
internal reactions are further constrained to remove internal loops
8484
[Schilling00]_. Loop removal is more time-consuming and under normal
8585
circumstances the biomass reaction flux will *not* change in response to the
8686
loop removal (only internal reaction fluxes may change). The ``--loop-removal``
@@ -92,6 +92,14 @@ example, the following command performs an FBA with thermodynamic constraints:
9292
9393
$ psamm-model fba --loop-removal=tfba
9494
95+
By default, the output of the FBA command will only display reactions which
96+
have non-zero fluxes. This can be overridden with the ``--all-reactions``
97+
option to display all reactions even if they have flux values of zero.
98+
99+
.. code-block:: shell
100+
101+
$ psamm-model fba --all-reactions
102+
95103
Flux variability analysis (``fva``)
96104
-----------------------------------
97105

@@ -114,10 +122,31 @@ In this example the ``PPCK`` reaction has a minimum flux of zero and maximum
114122
flux of 135.3 units. The ``PTAr`` reaction has a minimum flux of 62.3 and a
115123
maximum of 1000 units.
116124

117-
If the parameter ``--loop-removal=tfba`` is given, additonal thermodynamic
125+
If the parameter ``--loop-removal=tfba`` is given, additional thermodynamic
118126
constraints will be imposed when evaluating model fluxes. This automatically
119127
removes internal flux loops [Schilling00]_ but is much more time-consuming.
120128

129+
By default, FVA is performed with the objective reaction (either the biomass
130+
reaction or reaction given through the ``--objective`` option) fixed at its
131+
maximum value. It is also possible allow this reaction flux to vary by a
132+
specified amount through the ``--thershold`` option. When this option is
133+
used the variability results will show the possible flux ranges when the
134+
objective reaction is greater than or equal to the threshold value.
135+
136+
The threshold can be specified by either giving a percentage of the maximum
137+
objective flux or by giving a defined flux value.
138+
139+
.. code-block:: shell
140+
141+
$ psamm-model fva --threshold 90%
142+
or
143+
$ psamm-model fva --threshold 1.2
144+
145+
The FVA command can also be run as parallel processes to speed up simulations
146+
done on larger models. This can be done using the ``--parallel`` option. Either
147+
a specific number of parallel jobs can be given or 0 can be given to
148+
automatically detect and use the maximum number of parallel processes.
149+
121150
Robustness (``robustness``)
122151
---------------------------
123152

@@ -148,6 +177,16 @@ If the parameter ``--loop-removal`` is given, additional constraints on the
148177
model can be imposed that remove internal flux loops. See the section on the
149178
:ref:`commands-fba` command for more information on this option.
150179

180+
It is also possible to print out the flux of all reactions for each step in
181+
the robustness simulation instead of just printing the varying reaction flux.
182+
This can be done through using the ``--all-reaction-fluxes`` option.
183+
184+
The Robustness command can also be run as parallel processes to speed up
185+
simulations done on larger models. This can be done using the
186+
``--parallel`` option. Either a specific number of parallel jobs can
187+
be given or 0 can be given to automatically detect and use the maximum
188+
number of parallel processes.
189+
151190
Random sparse network (``randomsparse``)
152191
----------------------------------------
153192

@@ -166,9 +205,20 @@ threshold. The tolerance can be specified as a relative value (as above) or as
166205
an absolute flux. Aggregating the results from multiple random sparse networks
167206
allows classifying reactions as essential, semi-essential or non-essential.
168207

169-
If the option ``--exchange`` is given, the model will only try to delete
170-
exchange reactions. This can be used to provide putative minimal media for
171-
the model.
208+
By default, the randomsparse command will perform the deletions on reactions
209+
in the model. The ``--type`` option can be used to change this deletion to
210+
act on the genes in the model or to act on only the set of exchange reactions.
211+
The gene deletion option will remove a gene from a network and then assess
212+
which reactions would be affected by that gene loss based on the provided
213+
gene associations. The exchange reaction deletion will only delete reactions
214+
from the set of exchange reactions in the model and can be used to generate
215+
a putative minimal media for the model.
216+
217+
.. code-block:: shell
218+
219+
$ psamm-model randomsparse --type genes 95%
220+
or
221+
$ psamm-model randomsparse --type exchange 95%
172222
173223
The output of the command is a tab-separated list of reaction IDs and a value
174224
indicating whether the reaction was eliminated (``0`` when eliminated, ``1``
@@ -333,7 +383,7 @@ The output has now changed and the remaining residual has been shifted to
333383
another reaction. This iterative procedure can be continued until all
334384
stoichiometric inconsistencies have been corrected. In this example the
335385
`IR00149` reaction also had a missing `H+` for the reaction to balance. After
336-
fixing this error the model is consistent and the `H+` compounds can be
386+
fixing this error, the model is consistent and the `H+` compounds can be
337387
assigned a non-zero mass::
338388

339389
$ psamm-model masscheck
@@ -386,7 +436,9 @@ constraints are imposed when considering whether reactions can take a non-zero
386436
flux. This automatically removes internal flux loops but is also much more
387437
time-consuming.
388438

389-
Reaction duplicates check (``duplicatescheck``)
439+
Some reactions could
440+
441+
Reaction duplicates check (``dupcheck``)
390442
-----------------------------------------------
391443

392444
This command simply checks whether multiple reactions exist in the model that
@@ -398,7 +450,7 @@ properties as well.
398450

399451
.. code-block:: shell
400452
401-
$ psamm-model duplicatescheck
453+
$ psamm-model dupcheck
402454
403455
Gap check (``gapcheck``)
404456
------------------------
@@ -499,13 +551,37 @@ minimal solution.
499551
500552
$ psamm-model fastgapfill --penalty penalty.tsv
501553
554+
The penalty file provided should be a tab separated table that contains
555+
reaction IDs and assigned penalty values in two columns:
556+
557+
.. code-block:: shell
558+
559+
RXN1 10
560+
RXN2 15
561+
RXN3 20
562+
....
563+
564+
In addition to setting penalty values directly through the ``--penalty`` argument,
565+
default penalties for all other database reactions can be set through the
566+
``--db-penalty`` argument. Reactions that do not have penalty values
567+
explicitly set through the ``--penalty`` argument will be assigned
568+
this penalty value. Similarly, penalty values can be assigned for new
569+
exchange reactions and artificial transport reactions through the
570+
``--ex-penalty`` and ``--tp-penalty`` arguments. An example using
571+
all three of these arguments can be seen here:
572+
573+
.. code-block:: shell
574+
575+
$ psamm-model fastgapfill --db-penalty 100 --tp-penalty 1000 --ex-penalty 150
576+
577+
502578
Predict primary pairs (``primarypairs``)
503579
----------------------------------------------------------------------
504580

505581
This command is used to predict element-transferring reactant/product pairs
506582
in the reactions of the model. This can be used to determine the flow of
507583
elements through reactions. Two methods for predicting the pairs are available:
508-
FindPrimaryPairs (``fpp``) [Steffensen17]_ and
584+
`FindPrimaryPairs` (``fpp``) [Steffensen17]_ and
509585
MapMaker (``mapmaker``) [Tervo16]_. The ``--method`` option can used to select
510586
which prediction method to use:
511587

@@ -518,6 +594,21 @@ reactions ID, the second and third columns contain the compound ID of the
518594
reactant and product. The fourth column contains the predicted transfer of
519595
elements.
520596

597+
The ``primarypairs`` command will run slowly on models that contain artificial
598+
reactions such as biomass reactions or condensed biosynthesis reactions.
599+
Because the reactant/product pair prediction in these reactions is
600+
not as biologically meaningful these reactions can be excluded through
601+
the ``--exclude`` option. This option can be used to either give reaction
602+
IDs to exclude or to give an input file containing a list of reactions
603+
IDs to exclude:
604+
605+
.. code-block:: shell
606+
607+
$ psamm-model primarypairs --exclude BiomassReaction
608+
or
609+
$ psamm-model primarypairs --exclude @./exclude.tsv
610+
611+
521612
SBML Export (``sbmlexport``)
522613
----------------------------
523614

@@ -575,10 +666,25 @@ To search for a reaction use
575666
576667
Use the ``--id`` option to search for a reaction with a specific identifier.
577668
The ``--compound`` option can be used to search for reactions that include a
578-
specific compound. If more that one compound identifier is given
669+
specific compound. If more than one compound identifier is given
579670
(comma-separated) this will find reactions that include all of the given
580671
compounds.
581672

673+
PSAMM-SBML-Model
674+
----------------
675+
`PSAMM` normally takes a model in the `YAML` format as input. To deal with
676+
models that are in the `SBML` `PSAMM` includes various programs that allow
677+
users to convert these models to the `YAML` format. One additional option
678+
for dealing with models in the `SBML` format is using the `psamm-sbml-model`
679+
function. This function can be used to run any command normally accessed
680+
through `psamm-model` but with an `SBML` model as the input. To use this
681+
command the `SBML` model file needs to be specified first followed
682+
by the commands:
683+
684+
.. code-block:: shell
685+
686+
$ psamm-sbml-model {model.xml} fba
687+
582688
Console (``console``)
583689
---------------------
584690

0 commit comments

Comments
 (0)