Skip to content

Commit

Permalink
Improvements to sourmash argparse output for compute. (#931)
Browse files Browse the repository at this point in the history
* an initial usage description for sourmash compute

* fix so that sourmash, and sourmash compute, display the right thing

* shorten sourmash default output

* revise language a bit

Co-authored-by: Luiz Irber <luizirber@users.noreply.github.com>
  • Loading branch information
ctb and luizirber committed Apr 15, 2020
1 parent cd2ac0b commit 5f5d3a7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sourmash/cli/compare.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""compare genomes"""
"""compare sequence signatures made by compute"""

from sourmash.cli.utils import add_ksize_arg, add_moltype_args

Expand Down
30 changes: 28 additions & 2 deletions sourmash/cli/compute.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
"""compute genome signatures"""
"""compute sequence signatures for inputs"""

usage="""
sourmash compute -k 21,31,51 *.fa *.fq
Create MinHash sketches at k-mer sizes of 21, 31 and 51, for
all FASTA and FASTQ files in the current directory, and save them in
signature files ending in '.sig'. You can rapidly compare these files
with `compare` and query them with `search`, among other operations;
see the full documentation at http://sourmash.rtfd.io/.
The key options for compute are:
* `-k/--ksize <int>[, <int>]: k-mer size(s) to use, e.g. -k 21,31,51
* `-n/--num <int>` or `--scaled <int>`: set size or resolution of sketches
* `--track-abundance`: track abundances of hashes (default False)
* `--dna or --protein`: nucleotide and/or protein signatures (default `--dna`)
* `--merge <name>`: compute a merged signature across all inputs.
* `--singleton`: compute individual signatures for each sequence.
* `--name-from-first`: set name of signature from first sequence in file.
* `-o/--output`: save all computed signatures to this file.
Please see -h for all of the options as well as more detailed help.
---
"""

from argparse import FileType

Expand All @@ -18,7 +44,7 @@ def ksize_parser(ksizes):


def subparser(subparsers):
subparser = subparsers.add_parser('compute')
subparser = subparsers.add_parser('compute', description=__doc__, usage=usage)

sketch_args = subparser.add_argument_group('Sketching options')
sketch_args.add_argument(
Expand Down
3 changes: 1 addition & 2 deletions sourmash/cli/gather.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""search a metagenome signature for multiple non-
overlapping matches"""
"""search a metagenome signature against dbs"""

from sourmash.cli.utils import add_ksize_arg, add_moltype_args

Expand Down
2 changes: 1 addition & 1 deletion sourmash/cli/search.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""search a signature against a list of signatures"""
"""search a signature against other signatures"""

from sourmash.cli.utils import add_ksize_arg, add_moltype_args

Expand Down

0 comments on commit 5f5d3a7

Please sign in to comment.