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

sketch ... --name is not documented in CLI help #3152

Open
mr-eyes opened this issue May 12, 2024 · 1 comment
Open

sketch ... --name is not documented in CLI help #3152

mr-eyes opened this issue May 12, 2024 · 1 comment

Comments

@mr-eyes
Copy link
Member

mr-eyes commented May 12, 2024

sourmash sketch dna --help, does not have --name parameter to give a specific name to the signature. Probably with other sketching modes.

@ctb
Copy link
Contributor

ctb commented May 12, 2024

well, sort of? -h shows:

File handling options:
  -f, --force           recompute signatures even if the file exists
  -o OUTPUT, --output OUTPUT
                        output computed signatures to this file
  --merge FILE, --name FILE
                        merge all input files into one signature file with the
                        specified name

it's caused confusion in the past as well, so maybe we can improve things, but it is there :)

It's also in the sourmash sketch docs -

First, you can use --name/--merge to build
a single (named) sketch out of multiple input files:

sourmash sketch dna -p k=31 sample_R1.fq.gz sample_R2.fq.gz \
    --name "sample" -o sample.zip

Here you need to specify a name because sourmash does not pick a default
name when given multiple files; you also need to provide an output file
name because sourmash doesn't pick a default output name in this situation.

Second, you can stream the input files into sourmash sketch via stdin:

gunzip -c sample_R?.fq.gz | sourmash sketch dna -p k=31 - \
    -o sample.zip

As above, you need to specify an output filename because sourmash
can't guess a good default for streaming input. The --name option
can still be specified if you want to name the output sketch something
other than -.

Thoughts as to how to improve things -

  • we could put --name before --merge in the argparse output;
  • we could add a section in the sourmash sketch docs that is explicitly about naming sketches;
  • we could also add something to the internals document talking about how signature names are output by the sourmash CLI;

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

No branches or pull requests

2 participants