.. SamSifter documentation master file

=========
SamSifter
=========

SamSifter helps you create filter workflows for next-generation sequencing
data. It is primarily used to process SAM files generated by MALT prior to
metagenomic analysis in MEGAN.

.. image:: _images/screenshot_v0.1.0.png
	:scale: 50%
	:alt: Screenshot of SamSifter version 0.1.0
	:align: center
	:target: _images/screenshot_v0.1.0.png

Quick Start
===========

Installing SamSifter
--------------------

Installing or updating SamSifter is easy once you have a working Python3
environment with :py:mod:`PyQt4`, :py:mod:`matplotlib`, :py:mod:`numpy` and
:py:mod:`pandas`. See the :ref:`installation` for help on installing these
required packages.

Download and install the current SamSifter package on your system by executing 
the following command as administrator::

	pip3 install SamSifter

Previous versions will be uninstalled automatically. The installation can be
tested with ::

	samsifter --help

If everything went fine you should see the following help text::

	usage: samsifter [-h] [-v] [-d]

	SamSifter helps you create filter workflows for next-generation sequencing
	data. It is primarily used to process SAM files generated by MALT prior to
	metagenomic analysis in MEGAN.

	optional arguments:
	  -h, --help     show this help message and exit
	  -v, --verbose  print additional information to stderr
	  -d, --debug    show debug options in menu

Starting the program without any arguments will display the GUI and let you
edit your first workflow.

First Steps
-----------

To start working add filters to the empty workflow. You can add filters by 
doubleclicking available entries in the righthand dock or by selecting an entry
from the menu **[Edit > Add Filter...]**. Similarly, you can doubleclick filters
in the workflow to edit their settings and parameters. The lefthand toolbar is
used to move and delete filter steps. For more information on editing workflows 
see :ref:`edit_workflows`.

You can save your workflow to a file, execute it right now by clicking the
**[Run]** button and even export it to a Bash script to run it on another
workstation. Any errors and messages will be reported to you in the message dock
at the bottom of the window.

Feel free to re-arrange these docks to make yourself comfortable - SamSifter
will remember your settings. Accidentally closed docks can always be re-opened
from the menu **[View]**.

Uninstalling SamSifter
----------------------

To get rid of SamSifter simply execute the following command as administrator::

	pip3 uninstall SamSifter

The Python utility ``pip3`` will list all currently installed
available versions for selective removal. Proceed similarly with any required
packages (e.g. ``matplotlib``) if you don't need them anymore.

Help Topics
===========
	
.. toctree::
    :maxdepth: 2

    installation.rst
    edit_workflows.rst
    edit_settings.rst
    execute_workflows.rst

..     loading_saving
..     export
..     statistics

API documentation
=================

Developers interested in extending the program's functionalities may find the
following pages useful:

.. toctree::
   :maxdepth: 3

   pmdtools
   samsifter


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
