Replies: 2 comments
-
This is a hidden gotcha about Nextflow scripts. Since you declared the Basically, temp variables in a closure like this should always be declared with def readfile = file(read) I will add a note to the documentation about it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Indeed, thank you 👍. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Bug report
Expected behavior and actual behavior
I expect that
file(read).getName()
returns the value ofread
, but it sometimes returns the next value in the channel.It returns for example "s1r2" instead of "s1r1" in the workflow below, in about 1 of 4 runs.
Steps to reproduce the problem
commands:
contents of bug.nf:
Program output
command output (spacing edited, still incorrect in github somehow):
nextflow.log:
Environment
23.04.0.5857
openjdk 17.0.8 2023-07-18 OpenJDK Runtime Environment (build 17.0.8+0-suse-150400.3.27.1-x8664) OpenJDK 64-Bit Server VM (build 17.0.8+0-suse-150400.3.27.1-x8664, mixed mode, sharing)
openSUSE Leap 15.4
GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu)
Additional context
Beta Was this translation helpful? Give feedback.
All reactions