evolbioinfo / goalign

Goalign is a set of command line tools and an API to manipulate multiple sequence alignments. It is implemented in Go language.
GNU General Public License v2.0
71 stars 8 forks source link

Compressed output if input is compressed #12

Closed andersgs closed 2 years ago

andersgs commented 2 years ago

Hello. Thank you for goalign.

It is great that goalign will take compressed input. But, I noticed that the output is not compressed. Would it be possible for the output to mirror the input compression? For instance, if the input is gzipped the output be also gzipped. Perhaps as a flag option to enable output compression, giving the user the option to compress the output if they wish.

Thanks again.

fredericlemoine commented 2 years ago

Hello,

Thank you for your suggestion. I added the possibility to output gz and xz compressed files, if they have .gz or .xz extension. For example:

goalign reformat phylip -i a.fasta -o a.phylip.gz

Should produce a gz compressed file.

I prefer the output compression to be independent of the input compression, allowing more flexibility. I may create a new release in the coming days, but feel free to test it in the meantime.

andersgs commented 2 years ago

Thank you @fredericlemoine. I will give it a go. A new release would be great. And, yes, I agree that giving the user the choice of compressing the output would be ideal.

andersgs commented 2 years ago

Just FYI @fredericlemoine I am adding modules to nf-core for goalign.

fredericlemoine commented 2 years ago

Good to know, thanks. Is this this PR? https://github.com/nf-core/modules/pull/1785 ?

andersgs commented 2 years ago

Yes. That is the first one. I'll add one per sub-command. Once the first one is done, it should be trivial to add the others.

fredericlemoine commented 2 years ago

Great, thanks. Let me know if you need help at some point. I close this issue.