.. _cmd_line_tools:
Command line tools
==================
This page gives instructions on how to launch DeepFinder steps from the terminal.
Set up
------
First, add DeepFinder to your path with following command: :code:`export PATH="/path/to/deep-finder/bin:$PATH"`
You can add this command to your :code:`~/.bash_profile`
.. note::
Running these commands without any argument will launch the graphical user interface.
Annotation
----------
Usage::
annotate -t /path/to/tomogram.mrc
-o /path/to/output/object_list.xml
Target generation
-----------------
For :code:`generate_target` and :code:`train`, it is not possible to pass all necessary parameters as terminal arguments. Therefore, they have to be passed as an xml file.
Usage::
generate_target -p /path/to/parameters.xml
Parameter file::
.. note::
You can find classes with methods for automatically reading and writing these parameter files in utils/params.py
Training
--------
Usage::
train -p /path/to/parameters.xml
Parameter file::
Segmentation
------------
Usage::
segment -t /path/tomogram.mrc
-w /path/net_weights.h5
-c NCLASS
-p PSIZE
-o /path/output/segmentation.mrc
With NCLASS and PSIZE integer values. See :ref:`guide` for parameter description.
Clustering
----------
Usage::
cluster -l /path/to/segmentation.mrc
-r clusterRadius
-o /path/to/output/object_list.xml