Bug report
I have a process called bwa_indexhere:
https://github.com/nf-core/eager/blob/master/main.nf#L379-L401
that I'd like to be executed whenever the when directive is true.
This worked fine, but I'm also filling the same channel when a user specifies input using a simple Channel.fromPath()....
Expected behavior and actual behavior
If I use the when directive, I get an error message:
[warm up] executor > local
ERROR ~ Channel `ch_bwa_index` has been used twice as an output by process `makeBWAIndex` and another operator
-- Check script 'main.nf' at line: 375 or see '.nextflow.log' file for more details
When I replace the when with an if clause around the respective process, I get no error and everything works fine.
I do like to use when where possible but had also issues when mixing channels with the multiple index files being consumed once and then not being able to process more than just one sample.
I'm not sure what this behaviour means / what I can do about it or whether this is intended.
Environment
- Nextflow version: latest stable (18.10.1)
- Java version: 1.8
- Operating system: OSX
Additional context
Working on this Pull Request atm: nf-core/eager#127
Problematic are calls that use the respective variable ch_bwa_index.
I create the references using this command for example (which simulates an entire run of the pipeline and is used by us to run the entire pipeline for testing purposes):
nextflow run . -profile test,docker --pairedEnd --saveReference
Now I can reproduce using the previously generated reference genome indices:
nextflow run . -profile test,docker --singleEnd --bwa_index results/reference_genome/bwa_index/
Ideally, I'd expect being able to use when and not having to take care that the ch_bwa_index isn't reached at all ...
Bug report
I have a process called
bwa_indexhere:https://github.com/nf-core/eager/blob/master/main.nf#L379-L401
that I'd like to be executed whenever the
whendirective is true.This worked fine, but I'm also filling the same channel when a user specifies input using a simple
Channel.fromPath()....Expected behavior and actual behavior
If I use the
whendirective, I get an error message:When I replace the
whenwith an if clause around the respective process, I get no error and everything works fine.I do like to use
whenwhere possible but had also issues whenmixingchannels with the multiple index files being consumed once and then not being able to process more than just one sample.I'm not sure what this behaviour means / what I can do about it or whether this is intended.
Environment
Additional context
Working on this Pull Request atm: nf-core/eager#127
Problematic are calls that use the respective variable
ch_bwa_index.I create the references using this command for example (which simulates an entire run of the pipeline and is used by us to run the entire pipeline for testing purposes):
Now I can reproduce using the previously generated reference genome indices:
Ideally, I'd expect being able to use
whenand not having to take care that thech_bwa_indexisn't reached at all ...