Skip to content

Commit

Permalink
Merge pull request #32 from LokiLuciferase/feature/documentation
Browse files Browse the repository at this point in the history
Installation and Usage documentation
  • Loading branch information
LokiLuciferase committed Sep 10, 2021
2 parents 210c547 + 18670b9 commit 59b72fa
Show file tree
Hide file tree
Showing 3 changed files with 408 additions and 15 deletions.
39 changes: 36 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ phenotrex
=========


.. image:: https://img.shields.io/pypi/v/phenotrex.svg
.. image:: https://badge.fury.io/py/phenotrex.svg
:target: https://pypi.python.org/pypi/phenotrex
:alt: PyPI

Expand All @@ -30,5 +30,38 @@ phenotrex

End-to-end Microbial Phenotypic Trait Prediction.

* Supported platforms: Linux, MacOS, Windows
* Free software: GPLv3 license
Installation
------------

.. code-block::
$ pip install phenotrex[fasta]
Usage
-----

Phenotrex is a component of the `PhenDB`_ web server, which performs phenotypic trait prediction on
user-uploaded metagenomic bins. To try out phenotrex with PhenDB's pre-trained and curated set of
trait models, genomes may thus simply be `submitted to PhenDB`_.

Basic Usage
~~~~~~~~~~~
To use a trained phenotrex model ``MY_TRAIT.pkl`` for prediction of a phenotypic trait with a
given genome ``genome.fna``:

.. code-block::
$ phenotrex predict --classifier MY_TRAIT.pkl genome.fna > predictions.tsv
This yields a tabular file containing a prediction regarding the presence of the trait (YES or NO),
as well as a confidence value the model ascribes to this prediction, ranging from 0.5 to 1.0.

Advanced Usage
~~~~~~~~~~~~~~
For training, evaluation and explanation of phenotrex models on user data, please refer to the
full usage tutorial `here`_.

.. _PhenDB: https://www.phendb.org/
.. _submitted to PhenDB: https://phen.csb.univie.ac.at/phendb/
.. _here: https://phenotrex.readthedocs.io/en/latest/usage.html
21 changes: 16 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,28 @@ Installation
Stable release
--------------

To install phenotrex, run this command in your terminal:
For a full installation of phenotrex, run this command in your terminal:

.. code-block:: console
$ pip install phenotrex
$ pip install phenotrex[fasta]
Note that this command installs large dependencies (`pytorch`_, `deepnog`_) required for
transforming FASTA files into phenotrex input features at runtime.

If this capability is not needed (for example because feature files
have been pre-created),
installation size can be significantly reduced by running instead:

This is the preferred method to install phenotrex, as it will always install the most recent stable release.
.. code-block:: console
$ pip install phenotrex
If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pytorch: https://pytorch.org/
.. _deepnog: https://github.com/univieCUBE/deepnog
.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/

Expand All @@ -38,13 +49,13 @@ Or download the `tarball`_:

.. code-block:: console
$ curl -OL https://github.com/univieCUBE/phenotrex/tarball/master
$ curl -OL https://github.com/univieCUBE/phenotrex/tarball/master
Once you have a copy of the source, you can install it with:

.. code-block:: console
$ make install
$ make full-install
.. _Github repo: https://github.com/univieCUBE/phenotrex
Expand Down

0 comments on commit 59b72fa

Please sign in to comment.