Usage
=====

The command line version of MQ² is ran via the ``MQ2`` command.

Options
~~~~~~~

All the options can be listed via ``MQ2 --help`` or ``MQ2 -h``.

These options are:

- ``-h`` / ``--help``, this will simply present you the list of all the options
  available and what they represent, a little bit like the present document
  but shorter.

- ``-z`` / ``--zipfile``, this is one of the two options to specify to MQ² your
  input files. With this option you are providing to MQ² a zip archive
  containing the files generated by your QTL mapping tool.

- ``-d`` / ``--dir``, this is the second option to specify to MQ² your input
  files. With this option, you are pointing MQ² to a directory containing
  your input files.

- ``-f`` / ``--file``, this is the third option to specify to MQ² an input
  file. With this option, you are pointing MQ² to a single input file.

- ``--lod``, this is the option to specify which LOD value from which a QTL is
  considered to be significant. You can run a permutation test in MapQTL to
  determine the optimal LOD threshold to use.

- ``--session``, this is the option that allows you to specify which MapQTL
  session or which sheet of an Excel document to analyse in your project.
  Within one MapQTL project, one can analyse the same data with different
  approaches or different parameters creating a different session each time.
  Within a single Excel document, one may have several sheets each containing
  the results of different analysis (methods, parameters, data).
  The session number you provide to this option is the session or name of
  the sheet that you would like to analyse.

- ``--verbose``, this option is mostly of interest to have a more verbose
  output when running MQ².

- ``--debug``, this option is mostly of interest if you are facing a problem
  with MQ². Turn in the option and send us the output in order to improve MQ².


Example commands
~~~~~~~~~~~~~~~~

A basic command of MQ² will look like:

::

 MQ2 --folder /path/to/folder --lod <lod_threshold> --session <mapqtl_session>
 MQ2 --zipfile /path/to/folder/archive.zip --lod <lod_threshold> --session <ExcelSheetName>
 MQ2 --file /path/to/folder/output.csv --lod <lod_threshold>

For example:

::

 MQ2 --folder c:\Documents\mapqtl\AnalysesB\ --lod 3.2 --session 3
 MQ2 --zipfile c:\Documents\rqtl\Excel\excel_output.zip --lod 3.2 --session="Sheet2"
 MQ2 --file c:\Documents\rqtl\csv\rqtl_out.csv --lod 3.2


.. note:: MQ2 will generate its output in the current working directory. Be
   aware of this when you run it several time on different dataset or with
   different parameters.
