Skip to content

htslib-rebgzip module#12197

Closed
nschan wants to merge 5 commits into
nf-core:masterfrom
nschan:htslib-rebgzip
Closed

htslib-rebgzip module#12197
nschan wants to merge 5 commits into
nf-core:masterfrom
nschan:htslib-rebgzip

Conversation

@nschan

@nschan nschan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This module takes either unzipped, xz, bz2 or gz input, and returns a bgzipped file. This can be helpful since some tools refuse to take regular gzip.
I have kept the input / output as two element tuples, which should be compatible with most tool outputs.

@itrujnara

Copy link
Copy Markdown
Contributor

How is the behaviour here different from htslib/bgziptabix with compress and no index? You might be about to reintroduce the very issue that led to the creation of the bgziptabix module

@itrujnara itrujnara left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks duplicative, blocking until a compelling justification is provided

@nschan

nschan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

The difference is largely that this is convenience module that does not require .map {} on common output tuples in the form of tuple val(meta) file(maybe bgzipped or not).

@nschan

nschan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

You might be about to reintroduce the very issue that led to the creation of the bgziptabix module

I am not aware of this history of this module, which issue are you referring to?

@itrujnara

Copy link
Copy Markdown
Contributor

I see your point, I will need to discuss it with others before deciding how to solve this.

@itrujnara

Copy link
Copy Markdown
Contributor

You might be about to reintroduce the very issue that led to the creation of the bgziptabix module

I am not aware of this history of this module, which issue are you referring to?

Originally we had bgzip/bgzip, bgzip/tabix, bgzip/bgziptabix, and samtools/bgzip, each of which was slightly different. The setup created a lot of maintenance effort, since changes had to propagate to all of them. In a recent PR, we combined them into the current htslib/bgziptabix to have all the functionality in one place.

@maxulysse

Copy link
Copy Markdown
Member

Not convinced at all by adding such a duplicate of the already existing htslib module

@famosab

famosab commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Maybe we can think more if we can ease the use of htslib/bgziptabix ?

@nschan

nschan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

For me the main motivation is that I would prefer an "unsupervised" module, that gives me bzipped file, without me having to do anything extra, or having to care too much about the input. As I understand the current bgziptabix module, it is possible to do re-compression, but would require me to provide out_ext to name the output correctly, in addition to the input-channel wrangling mentioned above. The module proposed here is also able to have identical in and output filenames, which may be useful for .gz files that should be turned into bgzipped files.

A simplification of bgziptabix would also be good, to me the issue is that bgziptabix actually does more than bgzip only, which makes it clumsy to use for simple bgzip tasks. Given that all 'pure' bgzip modules were deprecated in favor of bgziptabix, to me this turns a routine task unnecessarily convoluted.

@nschan

nschan commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

After reading through #11571, it seems that what I feel is inconvenient about the bgziptabix module was a deliberate choice.

@nschan nschan closed this Jun 30, 2026
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

Successfully merging this pull request may close these issues.

4 participants