-
Notifications
You must be signed in to change notification settings - Fork 667
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
topic channel output breaks storeDir #5785
Comments
I think the problem is not the topic channel, but the It's a bit uglier, but you could make it work by converting the process FOO {
storeDir 'output'
output:
path "output.txt"
tuple val(task.process), val('grep'), path('version.grep.txt'), topic: versions
script:
"""
touch output.txt
grep --version | head -n 1 > version.grep.txt
"""
} |
There's still a bug there it looks like. If you do that, the process still runs even with the path. nextflow.preview.topic = true
process FOO {
storeDir 'output'
output:
path "output.txt"
tuple val(task.process), val('grep'), path('version.grep.txt'), topic: versions
script:
"""
touch output.txt
grep --version | head -n 1 > version.grep.txt
"""
}
workflow {
FOO()
} terminal: gitpod /workspace/Nextflow_sandbox (main) $ nextflow run main2.nf
N E X T F L O W ~ version 24.10.4
Launching `main2.nf` [gigantic_torricelli] DSL2 - revision: aef9650a3c
WARN: CHANNEL TOPICS ARE A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[17/de4e61] process > FOO [100%] 1 of 1 ✔
WARN: [FOO] StoreDir can only be used when using 'file' outputs
gitpod /workspace/Nextflow_sandbox (main) $ nextflow run main2.nf
N E X T F L O W ~ version 24.10.4
Launching `main2.nf` [tender_snyder] DSL2 - revision: aef9650a3c
WARN: CHANNEL TOPICS ARE A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[d1/23d825] process > FOO [100%] 1 of 1 ✔
WARN: [FOO] StoreDir can only be used when using 'file' outputs
gitpod /workspace/Nextflow_sandbox (main) $ nextflow run main2.nf -resume
N E X T F L O W ~ version 24.10.4
Launching `main2.nf` [chaotic_bohr] DSL2 - revision: aef9650a3c
WARN: CHANNEL TOPICS ARE A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[fd/1beef3] process > FOO [100%] 1 of 1 ✔
WARN: [FOO] StoreDir can only be used when using 'file' outputs
It creates a new process each time. It's not using the stored version. It's the same outputting a val. nextflow.preview.topic = true
process FOO {
storeDir 'output'
output:
path "output.txt"
tuple val(task.process), val('grep'), val(version_text), topic: versions
script:
def version = 'grep --version'.execute() | 'head -n 1'.execute()
version.waitFor()
version_text = version.text
"""
touch output.txt
"""
}
workflow {
FOO()
} terminal: gitpod /workspace/Nextflow_sandbox (main) $ nextflow run main.nf
N E X T F L O W ~ version 24.10.4
Launching `main.nf` [voluminous_pare] DSL2 - revision: ecf4603cee
WARN: CHANNEL TOPICS ARE A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[14/a3c426] process > FOO [100%] 1 of 1 ✔
WARN: [FOO] StoreDir can only be used when using 'file' outputs
gitpod /workspace/Nextflow_sandbox (main) $ nextflow run main.nf
N E X T F L O W ~ version 24.10.4
Launching `main.nf` [lethal_mclean] DSL2 - revision: ecf4603cee
WARN: CHANNEL TOPICS ARE A PREVIEW FEATURE - SYNTAX AND FUNCTIONALITY CAN CHANGE IN FUTURE RELEASES
executor > local (1)
[d1/1af4e7] process > FOO [100%] 1 of 1 ✔
WARN: [FOO] StoreDir can only be used when using 'file' outputs
|
Thanks for the reply Ben. When running the workaround above, while it does correctly produce the output, it still breaks storeDir - the process is neither stored nor cached and repeats on a rerun. Something about the tuple? Also, in the workaround provided the version report ends up in the storeDir directory, which in the use case of storing genome indexes alongside input FASTA is not ideal, if we're also trying to produce a unified report of the software versions used by a pipeline. This would typically need to be stored elsewhere, e.g. results/package_versions Applying a map operator to the topic channel itself only reports the path to the If Edit: @mahesh-panchal beat me to it :) |
Bug report
Expected behavior and actual behavior
Expected
Actual
Steps to reproduce the problem
Program output
Environment
The text was updated successfully, but these errors were encountered: