nextstrain / nextclade

Viral genome alignment, mutation calling, clade assignment, quality checks and phylogenetic placement
https://clades.nextstrain.org
MIT License
219 stars 59 forks source link

ENH: warn if compression ending detected but request compression type not supported #900

Open corneliusroemer opened 2 years ago

corneliusroemer commented 2 years ago

I tried to find out whether lz4 is supported, so I ran the following command:

~/Downloads/tmp via 🅒 nextstrain 
❯ nextclade run -D data -t test.tsv data/sequences.fasta  -o aligned.fasta.lz4

It completed successfully but it turns out the output is not compressed. It may be good to indicate if there's no compression with a warning or info. Right now this seems to be logged in debug only?

ivan-aksamentov commented 2 years ago

The supported formats are listed in the help.

How do I check for unsupported formats? They are unsupported for a reason - the set of unsupported formats is unknown. How do you imagine the logic would look like?

corneliusroemer commented 2 years ago

There is no easy solution, you're right. One could have a list of unsupported compressions, like lz4, zip, etc or treat things after .fasta that isn't supported as unsupported.

This is not really important though. It just felt a bit blackboxy to not know for sure whether compression works or not.

ivan-aksamentov commented 2 years ago

It just felt a bit blackboxy to not know for sure whether compression works or not.

Most users will learn about compression from the help text, because it's the only place it is mentioned. And formats are listed there. So hopefully this should not be too blackboxy for outside people.