Skip to content

Commit

Permalink
update cmd docs #11 #5
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-Hades committed Jul 10, 2024
1 parent 46211e0 commit 75084e4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 35 deletions.
47 changes: 30 additions & 17 deletions docs/source/modules/cmd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ The specimen.cmd_access submodule
:undoc-members:
:show-inheritance:


After a successfull installation, ``SPECIMEN`` can be accessed via the command line
from inside the Python environment it was installed in using:

Expand All @@ -16,7 +15,8 @@ from inside the Python environment it was installed in using:
The following commands are available:

- ``run`` : Run the whole pipeline or a specific step.
- ``cmpb`` : Pipeline for GEM curation based on CarveMe model and ModelPolisher.
- ``hqtb`` : Pipeline for GEM curation based on a high-quality template.
- ``setup`` : Setup structure, data and more.


Expand All @@ -41,27 +41,31 @@ Options:

.. code:: bash
specimen data structure
specimen data structure [PIPELINE]
Setup a directory with the basic structure for the data needed for the pipeline.

Argument:

- ``PIPELINE``: The name of the pipeline to setup the structure for.

Options:

- ``--dir/-d``: Name/Path of the directory
- ``--chunk-size/-s``: Parameter for doenloading files from the web.

specimen run
------------
specimen hqtb
-------------

.. code:: bash
specimen run pipeline [CONFIG]
specimen hqtb run_pipeline [CONFIG]
Run the complete pipeline with a configuration file as input.

.. code:: bash
specimen run wrapper [CONFIG]
specimen hqtb run_wrapper [CONFIG]
Run the pipeline using a config on a directory containing multiple input genomes.

Expand All @@ -71,7 +75,7 @@ Options:

.. code:: bash
specimen run bdb [TEMPLATE] [INPUT]
specimen hqtb bdb [TEMPLATE] [INPUT]
Run step 1: bidirectional BLAST of the pipeline. Requires the input and template genome as input.

Expand All @@ -87,7 +91,7 @@ Options:

.. code:: bash
specimen run draft [TEMPLATE] [BPBBH]
specimen hqtb draft [TEMPLATE] [BPBBH]
Run step 2: generate draft model of the pipeline. Requires the results of the bidirectional BLAST
and the template model as input.
Expand All @@ -104,7 +108,7 @@ Options:

.. code:: bash
specimen run validation [MODEL]
specimen hqtb validation [MODEL]
Run step 4: validation on a model.

Expand All @@ -115,7 +119,7 @@ Options:

.. code:: bash
specimen run analysis [MODEL]
specimen hqtb analysis [MODEL]
Run step 5: analysis on a model.

Expand All @@ -129,14 +133,14 @@ Options:
- ``--test-aa-auxotrophies/--taa``: Option to test media/model for auxotrophies.
- ``--pathway/--pathway-analysis``: Option to perform a pathway analysis using KEGG pathway identifiers.

specimen run refinement
^^^^^^^^^^^^^^^^^^^^^^^
specimen hqtb refinement
^^^^^^^^^^^^^^^^^^^^^^^^

Run the different parts of the step 3: refinement of the pipeline.

.. code:: bash
specimen run refinement extension
specimen hqtb refinement extension
Run the first part, extension.

Expand Down Expand Up @@ -167,7 +171,7 @@ Further options:

.. code:: bash
specimen run refinement cleanup [MODEL]
specimen hqtb refinement cleanup [MODEL]
Based on a draft model, run the second part of refinement, cleanup.

Expand All @@ -190,7 +194,7 @@ Options:

.. code:: bash
specimen run refinement annotation [MODEL]
specimen hqtb refinement annotation [MODEL]
Run the thrid part of the refinement, annotation, on a given model.

Expand All @@ -203,7 +207,7 @@ Options:

.. code:: bash
specimen run refinement smoothing [MODEL]
specimen hqtb refinement smoothing [MODEL]
Required Options:

Expand All @@ -218,3 +222,12 @@ Further Options:
- ``--dna_weight_frac``: DNA macromolecular weight fraction for your organism. Default is 0.023 for Klebsiella based on Liao et al.
- ``--ion_weight_frac``: weight fraction for the coenzymes and ions. Default is 0.05 based on the default of BOFdat.
- ``--memote``: Use memote on the extended model.

specimen cmpb
-------------

.. code:: bash
specimen cmpb run [CONFIG]
Run the complete pipeline with a configuration file as input.
18 changes: 1 addition & 17 deletions src/specimen/cmd_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
# entry points
################################################################################

###############################
# unchanged
###############################

@click.group()
@click.help_option("--help", "-h")
@click.version_option()
Expand Down Expand Up @@ -71,6 +67,7 @@ def data_structure(pipeline, dir, chunk_size):
#################
# hqtb pipeline #
#################

@cli.group()
def hqtb():
"""Pipeline for GEM curation based on a high-quality template."""
Expand Down Expand Up @@ -123,9 +120,6 @@ def bdb(template, input, template_name, input_name, temp_header, in_header, dir,
"""
specimen.core.bidirectional_blast.run(template, input, dir,template_name, input_name, temp_header, in_header, threads, extra_info=['locus_tag', 'product', 'protein_id'], sensitivity=sensitivity)

###############################
# below untested, but corrected
###############################

# generafte draft
# ---------------
Expand Down Expand Up @@ -266,9 +260,6 @@ def cleanup(model,
chunk_size,
memote)

###############################
# unchanged
###############################

@refinement.command()
@click.argument('model', type=str)
Expand All @@ -293,9 +284,6 @@ def annotation(model,dir,kegg_via_ec,kegg_via_rc,memote):
memote=memote)


###############################
# below untested, but corrected
###############################

@refinement.command()
@click.argument('model',type=str)
Expand Down Expand Up @@ -327,10 +315,6 @@ def smoothing(model, genome, dir, mcc, dna_weight_frac, ion_weight_frac, egc, na
memote)


#######################
# below OK #
#######################

# validation
# ----------
@hqtb.command()
Expand Down
8 changes: 7 additions & 1 deletion src/specimen/util/set_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ def download_config(filename:str='my_basic_config.yaml', type:Literal['hqtb-basi
def validate_config(userc:str, pipeline:Literal['hqtb','cmpb']='hqtb') -> dict:
"""Validate a user hqtb config file for use in the pipeline.
Note: currently not everything is checked, mainly the needed files are.
.. note::
Currently not everything is checked, mainly the needed files are.
.. warning::
Currently working not perfectly, under construction
Args:
- userc (str):
Expand Down

0 comments on commit 75084e4

Please sign in to comment.