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

Conversation

ctb
Copy link
Contributor

@ctb ctb commented Apr 4, 2020

This makes sourmash compute return:

new output:

sourmash compute
usage: 

   sourmash compute -k 21,31,51 *.fa *.fq

This will 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 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 more options and more detailed help.

---
 compute: error: the following arguments are required: filenames

rather than

old output:

                [--scaled SCALED] [--protein] [--no-protein] [--dayhoff]
                [--no-dayhoff] [--hp] [--no-hp] [--dna] [--no-dna]
                [--input-is-protein] [--seed SEED] [--input-is-10x]
                [--count-valid-reads COUNT_VALID_READS]
                [--write-barcode-meta-csv WRITE_BARCODE_META_CSV]
                [-p PROCESSES] [--save-fastas SAVE_FASTAS]
                [--line-count LINE_COUNT] [--rename-10x-barcodes FILE]
                [--barcodes-file FILE] [-f] [-o OUTPUT] [--singleton]
                [--merge FILE] [--name-from-first] [--randomize] [-q]
                [--check-sequence] [--license LICENSE]
                filenames [filenames ...]
 compute: error: the following arguments are required: filenames

which I think is an improvement? Open to your thoughts on formatting, content, etc.

Addresses #899

  • Is it mergeable?
  • make test Did it pass the tests?
  • make coverage Is the new code covered?
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@sonarcloud
Copy link

sonarcloud bot commented Apr 4, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Apr 4, 2020

Codecov Report

Merging #931 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #931   +/-   ##
=======================================
  Coverage   91.77%   91.77%           
=======================================
  Files          70       70           
  Lines        4947     4948    +1     
=======================================
+ Hits         4540     4541    +1     
  Misses        407      407           
Impacted Files Coverage Δ
sourmash/cli/compare.py 100.00% <ø> (ø)
sourmash/cli/gather.py 100.00% <ø> (ø)
sourmash/cli/search.py 100.00% <ø> (ø)
sourmash/cli/compute.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd2ac0b...b9e2435. Read the comment docs.

@ctb ctb changed the title [WIP] Trial improvements to sourmash argparse output for compute. [MRG] Trial improvements to sourmash argparse output for compute. Apr 15, 2020
@luizirber luizirber merged commit 5f5d3a7 into master Apr 15, 2020
@luizirber luizirber deleted the try/add_usage branch April 15, 2020 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants