Skip to content

Commit

Permalink
Update documentation and release issues (#35)
Browse files Browse the repository at this point in the history
* Add epilog to classify help statement

- This was causing the printing of the help statement to break.

* Make description and epilog more informative

* Add logos for RTD

* Add gtnet commands to coverage tests

* Fix typo

* Add background to logo

* Only display logo on home page

* Tweak logos

* Shorten logo

* Move Github README to RST

* Add CodeCov badge
  • Loading branch information
ajtritt committed Jun 13, 2023
1 parent f70cefc commit a72e53d
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 42 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/run_coverage.yml
Expand Up @@ -55,6 +55,9 @@ jobs:
- name: Run tests and generate coverage report
run: |
pytest --cov
gtnet predict data/small.fna > data/small.raw.test.csv
gtnet filter --fpr 0.05 data/small.raw.csv > data/small.tax.test.csv
gtnet classify --fpr 0.05 data/small.fna > data/small.tax.test.csv
python -m coverage xml # codecov uploader requires xml format
python -m coverage report -m
Expand Down
63 changes: 25 additions & 38 deletions README.md → README.rst
@@ -1,42 +1,29 @@
=====
GTNet
=====
The Genome Taxonomy Network for assigning microbial taxonomy to DNA sequences

## Getting started
Installing GTNet from PyPI
```bash
pip install gtnet
```

Installing GTNet from source
```bash
pip install git+https://github.com/exabiome/gtnet.git
```

## Running GTNet
Getting taxonomic classifications for all sequences in a Fasta file.
```bash
gtnet classify data/small.fna > data/small.tax.csv
```

### GTNet steps
GTNet consists of two main steps: 1) get scored predictions of taxonoimc assignments and 2) filter
scored predictions. The previous command combines these two commands into a single command with a
default false-positive rate. The two steps have been separated into two commands for those who
want to experiment with different false-positive rates.

Getting predictions for all sequences in a Fasta file.
```bash
gtnet predict data/small.fna > data/small.tax.raw.csv
```
The first time you run `predict`, the model file will be downloaded and stored in the
same directory that the `gtnet` package is installed in. Therefore, for the this to be successful,
you must have write privileges on the directory that `gtnet` is installed in.

Filtering predictions
```bash
gtnet filter --fpr 0.05 data/small.tax.raw.csv > data/small.tax.csv
```
The Genome Taxonomy Network for assigning GTDB microbial taxonomy to DNA sequences.

Documentation can be found at https://gtnet.readthedocs.io.

Latest Release
==============

.. image:: https://badge.fury.io/py/gtnet.svg
:target: https://badge.fury.io/py/gtnet

Overall Health
==============

.. image:: https://codecov.io/gh/exabiome/gtnet/branch/main/graph/badge.svg?token=AFJH59YZ3U
:target: https://codecov.io/gh/exabiome/gtnet

.. image:: https://readthedocs.org/projects/hdmf/badge/?version=stable
:target: https://hdmf.readthedocs.io/en/stable/?badge=stable

Installation
============

See the `GTNet documentation <https://gtnet.readthedocs.io/en/stable/installation.html>`_.

LICENSE
=======
Expand Down Expand Up @@ -101,5 +88,5 @@ NOTICE. This Software was developed under funding from the U.S. Department
of Energy and the U.S. Government consequently retains certain rights. As
such, the U.S. Government has been granted for itself and others acting on
its behalf a paid-up, nonexclusive, irrevocable, worldwide license in the
Software to reproduce, distribute copies to the public, prepare derivative
Software to reproduce, distribute copies to the public, prepare derivative
works, and perform publicly and display publicly, and to permit others to do so.
9 changes: 7 additions & 2 deletions docs/source/conf.py
Expand Up @@ -136,6 +136,10 @@
# documentation.
# html_theme_options = {}

html_theme_options = {
'logo_only': True,
}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []

Expand All @@ -148,12 +152,13 @@

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
html_logo = "gtnet.png"

# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
html_favicon = "gtnet-favicon.png"


# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
Binary file added docs/source/gtnet-favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/gtnet.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions src/gtnet/classify.py
Expand Up @@ -20,8 +20,9 @@ def classify(argv=None):
argv : Namespace, default=sys.argv
The command-line arguments to use for running this command
"""
desc = "Get taxonomic classification for each sequence in a Fasta file."
epi = ()
desc = "Get filtered taxonomic classification for each sequence in a Fasta file."
epi = ("This command will output a taxonomic classification filtered to a specified false-positive rate "
"for each sequence")

parser = argparse.ArgumentParser(description=desc, epilog=epi)
parser.add_argument('fasta', type=str, help='the Fasta files to do taxonomic classification on')
Expand Down

0 comments on commit a72e53d

Please sign in to comment.