Skip to content

gstama_polyacleanup: Fixed regression - Fixing output glob#12228

Open
sguizard wants to merge 4 commits into
nf-core:masterfrom
sguizard:master
Open

gstama_polyacleanup: Fixed regression - Fixing output glob#12228
sguizard wants to merge 4 commits into
nf-core:masterfrom
sguizard:master

Conversation

@sguizard

@sguizard sguizard commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

The globs modification from the last update breaks the content of the output channels.
Without the _tama prefix, *.fa.gz grab _tama.fa.gz AND _tails.fa.gz.

tuple val(meta), path("*.fa.gz") , emit: fasta
tuple val(meta), path("*_seq.fa.gz") , emit: fasta
tuple val(meta), path("*_polya_flnc_report.txt.gz"), emit: report
tuple val(meta), path("*_tails.fa.gz") , emit: tails

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.

What if you do:

output:
tuple val(meta), path("${prefix}.fa.gz")                   , emit: fasta
tuple val(meta), path("${prefix}_polya_flnc_report.txt.gz"), emit: report
tuple val(meta), path("${prefix}_tails.fa.gz")             , emit: tails

This way, you do not rename the tool output at all. Just make the fasta output specific.

@sguizard sguizard Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I should have correct my first message once I understood the real problem.
I forgot, my apologies for that.
Let's rewind to the original problem and fold back to the solution.

The last update of the module changed the outputs to make them more generic by removing the _tama prefix. This was a good idea, but it introduced a regression.

For your information, the _tama prefix is an artefact from when I developed the isoseq pipeline. Maybe not the smartest idea at the time, but I learned a lot since then.

So what was the idea behind those three channels and why the last update introduced a regression?
In order to not mixing two kind of sequence information generated by the script, the Full Length Non Chimeric reads one side and the poly A on the other side, I have set up a fasta output channel and a tails output channel.
The tails channel I suppose to grab the polyA sequences and the fasta is supose to grab FLNC sequences.
In its original code, the channel globs included a _tama prefix. The reason of this is simply because the nf-core/isoseq pipeline generated files have this prefix. Again, maybe not the wisest choice, but I was young and nf-core naive.

Now, fast forward to the last module update. In order, make the module code more generic, _tama has been removed. A wise choice, but with unexpected consequences. Changing the fasta channel glob from *_tama.fa.gz to *.fa.gz change which files are grabbed by the channel. Instead of collecting only the FLNCs, it grabs the FLNCs and the polyA tails. Indeed, those two files shares the same extension.

Even if this small modification has nothing dramatic, it has the annoying effect to mix the two information into one channel. After, I can understand that the channel name can be confusing.fasta can be changed to seq to avoid this confusion.

To fix this regression, this simplest solution is to make FLNC fasta file name unique by renaming it and adapt the glob to this renamed version. This is the point of this patch.

Writing this made me realize how the fasta channel name can be confusing. I'm going to push a commit to rename it into seq. It will be more inline with its purpose.

$args
gzip ${prefix}.fa

mv ${prefix}.fa ${prefix}_seq.fa

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.

Here you could remove the mv this and then do:

gzip ${prefix}.fa
gzip ${prefix}_polya_flnc_report.txt
gzip ${prefix}_tails.fa

@atrigila atrigila added awaiting-changes will be closed after 30 days and removed Ready for Review labels Jul 2, 2026
@sguizard sguizard changed the title gstama_polyacleanup: Fixed regression - Revert to original globs gstama_polyacleanup: Fixed regression - Fixing output glob Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-changes will be closed after 30 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants