Skip to content

Should "-" work as an output file? #4

@j0ma

Description

@j0ma

Right now, using - in place of an output file fails, at least when using it with seqscore count.

Starting with just references.bio:

> ls -a
.  ..  references.bio

Running this:

for outfile in "counts.tsv" "-"
do 
    seqscore count --labels BIO references.bio $outfile
done

produces two files that are the same:

> ls -a
-  .  ..  counts.tsv  references.bio

> sha256sum "./-" counts.tsv
5fba369692a43addad802d8c02592f1fcfdd0230c0129a11524199eba170d839  ./-
5fba369692a43addad802d8c02592f1fcfdd0230c0129a11524199eba170d839  counts.tsv

as opposed to - redirecting to stdout. Is this intentional? Is there a reason to not support -?

FWIW, I believe this can be fixed by adding a type=click.Path(...)-style annotation on L182 here.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions