==========================
caspo :- BioASP, CellNOpt.
==========================

caspo combines BioASP_ and CellNOpt_ to provide an easy to use software for learning Boolean Logic Models of Protein Signaling Networks from a Prior Knowledge Network in `.sif format`_ and a phospho-proteomics dataset in `MIDAS format`_.

.. _BioASP: http://www.cs.uni-potsdam.de/~sthiele/bioasp/
.. _CellNOpt: http://www.ebi.ac.uk/saezrodriguez/cno/
.. _`.sif format`: http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats
.. _`MIDAS format`: http://www.ebi.ac.uk/saezrodriguez/cno/doc/cnodocs/midas.html

Installation
============

You can install caspo by running::

	$ pip install caspo

Note that you may need root access for this. Otherwise, you can use a virtualenv_. Then, before using caspo make sure that R_ is already installed.

.. _R: http://www.r-project.org/
.. _virtualenv: http://pypi.python.org/pypi/virtualenv

Usage
=====

Typical usage is::
	
	$ caspo.py pkn.sif midas.csv
	
For more options you can ask for help as follows::

	$ caspo.py --help
	Usage: caspo.py [options] pkn.sif midas.csv

	Options:
	  -h, --help           show this help message and exit
	  -t T, --tolerance=T  Suboptimal enumeration tolerance: 0 <= t <= 0.5
	                       (Default to 0)
	  -p P, --discrete=P   Discretization range exponent: 10^P (Default to 2)
	  -q Q, --alpha=Q      Size penalty exponent 1/10^Q (Default to 5)
	  -g, --gtts           Compute Global Truth Tables (Default to False). This
	                       could take some time for many models.
	  -o O, --outdir=O     Output directory path (Default to current directory)

Samples
=======

Sample files are available here:
      ExtLiverPCB.sif_ ExtLiverPCB.csv_

.. _ExtLiverPCB.sif: http://www.cs.uni-potsdam.de/~sthiele/bioasp/downloads/samples/liverdata/ExtLiverPCB.sif
.. _ExtLiverPCB.csv: http://www.cs.uni-potsdam.de/~sthiele/bioasp/downloads/samples/liverdata/ExtLiverPCB.csv

Output
======

By default, the output of caspo will be 4 comma-separated-values files:
	- models.csv: Matrix representation of logic models
	- frequencies.csv: Frequencies of hyperedges occurrence
	- exclusives.csv: Mutual exclusives hyperedges with their corresponding frequencies
	- inclusives.csv: Mutual inclusives hyperedges with their corresponding frequencies

When using the -g option, caspo will also output:
	- gtt_stats.csv: Basic cluster analysis.
	- gtt-%i.csv: Explicit computation of each Global Truth Table

