From d43e8fb0f98d42a53ee861a0e0a0375eb71ad7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fa=CC=81bio=20Madeira?= Date: Wed, 8 Jan 2025 18:08:47 +0000 Subject: [PATCH] docs: adds extra CLI examples for outputing newick format --- README.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.rst b/README.rst index 419f68f..f851fb4 100644 --- a/README.rst +++ b/README.rst @@ -273,6 +273,25 @@ Validating a list of TaxIDs against a Tree data structure in ``pickle`` format: taxonomy-resolver validate -in tree.pickle -taxids testdata/taxids_validate.txt +Load a previously built Tree data structure in ``pickle`` format and search for one or more TaxIDs (for example human, TaxID '9606'). Included, excluded and filter lists can be optionally passed as shown above. + +.. code-block:: bash + + taxonomy-resolver search -in tree.pickle -taxid "9606" -out testdata/taxids_human.txt + +Writing the 'complete' human sub-tree (i.e. all levels of the hierarchy) in ``newick`` format can be done via the build command and passing a TaxID filter file, which can be generated by running the search command shown previously. + +.. code-block:: bash + + taxonomy-resolver build -in tree.pickle -inf pickle -taxidsf testdata/taxids_human.txt -out testdata/taxids_human.nwk -outf newick + +Alternatively, ``newick`` output can be generated for the 'local' human sub-tree (i.e. species and sub-species levels only), directly using the search command, as shown below: + +.. code-block:: bash + + taxonomy-resolver search -in tree.pickle -taxid "9606" -out testdata/taxids_human_local.nwk -outf newick + + Contributing ============