You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When input and output files of a process have identical names, downstream processes get confused about which file to use. But publishDir outputs are correct. See the minimum example below.
No error or warning (e.g. name collision) was raised.
Expected behavior and actual behavior
Obviously using identical file names is a bad practice, but this can happen by accident when files names are less explicit (we discovered this when trying to generate files to different folders). I think raising a name collision error is appropriate (step1 in the example below)?
In general, it is valid for a process to forward an input as an output, and there is no way for Nextflow to know for certain that it's being done improperly (e.g. overwriting the file vs simply using it and including it in the outputs)
So it is up to you to ensure that you forward input files properly. In step1, you could prevent a (silent) name collision by staging the input file under a different name
Thanks for the explanation! I see your point about forwarding the file name.
I'm still confused about why the output of summary is what it is, compared to the output of publishDir. Is it because the reference of step0.out is muted because of the input - output forwarding in step1?
Bug report
When input and output files of a process have identical names, downstream processes get confused about which file to use. But
publishDir
outputs are correct. See the minimum example below.No error or warning (e.g. name collision) was raised.
Expected behavior and actual behavior
Obviously using identical file names is a bad practice, but this can happen by accident when files names are less explicit (we discovered this when trying to generate files to different folders). I think raising a name collision error is appropriate (
step1
in the example below)?Steps to reproduce the problem
Minimum example:
Program output
step0/duplicate_file_name.txt
step1/duplicate_file_name.txt
summary.txt
(Should be
step0\nstep1
given the intention ofsummary(step0.out, step1.out)
)Environment
$SHELL --version
) zsh 5.9 (arm64-apple-darwin24.0)Additional context
The text was updated successfully, but these errors were encountered: