<commit_before>Installation
============

Although it's not possible to cover all possible ways to install PBxplore on any operating system,
we try in this document to provide few guidelines regarding PBxplore setup.

Supported Platforms
-------------------

Currently, `PBxplore` run with Python 2.7, 3.4, 3.5 and 3.6 on Linux and Mac OS X.


Dependencies
------------

To use `PBxplore`, the following libraries have to be installed.

    `NumPy <http://numpy.scipy.org/>`_ >= 1.6.0
        NumPy is the base package for numerical computing in python.

    `matplotlib <http://matplotlib.org/>`_ [#]_ >= 1.4.0
        All ploting functions use the `matplotlib` package.

    `MDAnalysis <http://www.mdanalysis.org/>`_ [#]_ >= 0.11
        We use MDAnalysis to read Gromacs molecular dynamics trajectories.
        Many other trajectory files are also supported, see list 
        `here <https://pythonhosted.org/MDAnalysis/documentation_pages/coordinates/init.html#id1>`_.


Optionally, `PBxplore` can use the following packages:

    `Weblogo3 <http://weblogo.threeplusone.com/>`_ [#]_
        `Weblogo3` is required to create logo from PB sequences.


Installing PBxplore
-------------------

The most straightforward way is to use `pip`:

.. code-block:: bash

    $ pip install --user pbxplore


.. note::

    Do not forget to update your $PATH to make all PBxplore tools accessible:

    .. code-block:: bash

        $ export PATH=$PATH:$HOME/.local/bin


See the documentation of `pip <https://pip.pypa.io/en/stable/>`_ for more information.
You may also want to look at `virtualenv <https://virtualenv.readthedocs.org/en/latest/>`_.



Upgrading PBxplore
---------------------

Be sure to always have the latest version of PBxplore with:

.. code-block:: bash

    $ pip install --user --upgrade pbxplore


Testing PBxplore
----------------

`PBxplore` comes with unit tests and regression tests. It requires the package
`nose <https://nose.readthedocs.io/en/latest/>`_. You can run the tests within Python:

.. code-block:: python

    import pbxplore
    pbxplore.test()


Uninstalling PBxplore
---------------------<commit_msg>Add Mac OSX path and example<commit_after>Installation
============

Although it's not possible to cover all possible ways to install PBxplore on any operating system,
we try in this document to provide few guidelines regarding PBxplore setup.

Supported Platforms
-------------------

Currently, `PBxplore` run with Python 2.7, 3.4, 3.5 and 3.6 on Linux and Mac OS X.


Dependencies
------------

To use `PBxplore`, the following libraries have to be installed.

    `NumPy <http://numpy.scipy.org/>`_ >= 1.6.0
        NumPy is the base package for numerical computing in python.

    `matplotlib <http://matplotlib.org/>`_ [#]_ >= 1.4.0
        All ploting functions use the `matplotlib` package.

    `MDAnalysis <http://www.mdanalysis.org/>`_ [#]_ >= 0.11
        We use MDAnalysis to read Gromacs molecular dynamics trajectories.
        Many other trajectory files are also supported, see list 
        `here <https://pythonhosted.org/MDAnalysis/documentation_pages/coordinates/init.html#id1>`_.


Optionally, `PBxplore` can use the following packages:

    `Weblogo3 <http://weblogo.threeplusone.com/>`_ [#]_
        `Weblogo3` is required to create logo from PB sequences.


Installing PBxplore
-------------------

The most straightforward way is to use `pip`:

.. code-block:: bash

    $ pip install --user pbxplore


.. note::

    The former command with install PBxplore in:

    - ``$HOME/.local/bin`` on Linux.
    - ``~/Library/Python/X.Y/bin`` on Mac OSX, where ``X.Y`` stands for the Python version (for instance ``2.7`` for Python 2.7 and ``3.5`` for Python 3.5).

    Do not forget to update your $PATH to make all PBxplore tools accessible. As an example, with the Bash shell, this gives:

    .. code-block:: bash

        $ # for Linux 
        $ export PATH=$PATH:$HOME/.local/bin

        $ # for Mac OSX
        $ export PATH=$PATH:~/Library/Python/X.Y/bin


See the documentation of `pip <https://pip.pypa.io/en/stable/>`_ for more information.
You may also want to look at `virtualenv <https://virtualenv.readthedocs.org/en/latest/>`_.



Upgrading PBxplore
---------------------

Be sure to always have the latest version of PBxplore with:

.. code-block:: bash

    $ pip install --user --upgrade pbxplore


Testing PBxplore
----------------

`PBxplore` comes with unit tests and regression tests. It requires the package
`nose <https://nose.readthedocs.io/en/latest/>`_. You can run the tests within Python:

.. code-block:: python

    import pbxplore
    pbxplore.test()


Uninstalling PBxplore
---------------------
{'fraction_non_alphanumeric': 0.14879556597740354, 'fraction_numerical': 0.010232359837987636, 'mean_word_length': 2.6599063962558502, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1850813', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1379, 'n_words': 501}