Hello, about `samtools/bgzip` (<https://github.com...
# modules
c
Hello, about
samtools/bgzip
(https://github.com/nf-core/modules/pull/7433), does one more person would like to have a check and press the merge button if everything is all right?
❓ 1
m
I like the PR, I'm just unsure about the output being created.
.bgzip.fa.gz
seems like a bit too big of an extension. https://github.com/nf-core/modules/blob/master/modules/nf-core/tabix/bgzip/main.nf for example only produces
.gz
. I'd rather we keep the extension short, and don't expect people to use fa while they might be using fasta and so on
c
Agreed! With the extension I am only trying to avoid file name collisions. Shall I just make the module exit with error in that case?
m
I think what we do in other modules is check that input does not match prefix+extension
c
Thanks @Maxime Garcia for the feedback! Now the module is using
${prefix}.gz
for the output name. If the file was already BGZIPped under this name, it will just output the file itself. If the file was gzipped but not in BGZIP format and already had this name, it will error with a shell return code of
1
and a message mentioning the file name conflict. If the file happened to be gzipped (non-BGZIP), and had an erroneous name file extension (such as using
.gz
for XZ compression etc.), the module will crash without a useful error message, but I expect this to be extremely rare.
m
If the file was already BGZIPped under this name, it will just output the file itself
OK, so people could be smart and check the file before running the modules
The rest sounds like good ideas
c
Thanks @Maxime Garcia, I also removed the file that you requested and merged the latest changes from the master branch. The PR is ready for you to review it again.
m
sorry for being picky
I really like the module
this idea is wonderful
And we're that close to merging it in
c
Changes pushed, branch updated, and all tests passed!
🙏 1
m
Good for me, let's merge
c
Thanks a lot, looking forward using it in the pairgenomealign pipeline!
🎉 1
m
I will probably add it to #references at some point too