-
Notifications
You must be signed in to change notification settings - Fork 1.1k
gstama_polyacleanup: Fixed regression - Fixing output glob #12228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
sguizard
wants to merge
4
commits into
nf-core:master
Choose a base branch
from
sguizard:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+24
−27
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ process GSTAMA_POLYACLEANUP { | |
| tuple val(meta), path(fasta) | ||
|
|
||
| output: | ||
| tuple val(meta), path("*.fa.gz") , emit: fasta | ||
| tuple val(meta), path("*_seq.fa.gz") , emit: seq | ||
| tuple val(meta), path("*_polya_flnc_report.txt.gz"), emit: report | ||
| tuple val(meta), path("*_tails.fa.gz") , emit: tails | ||
| tuple val("${task.process}"), val('gstama'), eval("tama_collapse.py -version | sed -n 's/tc_version_date_//p'"), emit: versions_gstama, topic: versions | ||
|
|
@@ -28,15 +28,18 @@ process GSTAMA_POLYACLEANUP { | |
| -f $fasta \\ | ||
| -p ${prefix} \\ | ||
| $args | ||
| gzip ${prefix}.fa | ||
|
|
||
| mv ${prefix}.fa ${prefix}_seq.fa | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here you could remove the mv this and then do: |
||
|
|
||
| gzip ${prefix}_seq.fa | ||
| gzip ${prefix}_polya_flnc_report.txt | ||
| gzip ${prefix}_tails.fa | ||
| """ | ||
|
|
||
| stub: | ||
| def prefix = task.ext.prefix ?: "${meta.id}" | ||
| """ | ||
| echo "" | gzip > ${prefix}.fa.gz | ||
| echo "" | gzip > ${prefix}_seq.fa.gz | ||
| echo "" | gzip > ${prefix}_polya_flnc_report.txt.gz | ||
| echo "" | gzip > ${prefix}_tails.fa.gz | ||
| """ | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if you do:
This way, you do not rename the tool output at all. Just make the fasta output specific.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
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
_tamaprefix. This was a good idea, but it introduced a regression.For your information, the
_tamaprefix 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
fastaoutput channel and atailsoutput channel.The tails channel I suppose to grab the polyA sequences and the
fastais supose to grab FLNC sequences.In its original code, the channel globs included a
_tamaprefix. 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,
_tamahas been removed. A wise choice, but with unexpected consequences. Changing thefastachannel glob from*_tama.fa.gzto*.fa.gzchange 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.
fastacan be changed toseqto 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
fastachannel name can be confusing. I'm going to push a commit to rename it intoseq. It will be more inline with its purpose.