Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Trial improvements to sourmash argparse output for compute. #931

Merged
merged 5 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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