-
Notifications
You must be signed in to change notification settings - Fork 718
Closed
Labels
Description
Bug report
This bug took me so long to identify, and it caused my pipeline to infinitely freeze. Here is a minimum example:
params.reference = 'hg38'
params.flank = ""
params.test = 'test'
workflow{
def x = "ensembl.annot.genes.flanked${params.flank}"
def test = params.test
def ids = ['ensembl.annot.genes',x, test]
reference = channel.value(params.reference)
files = reference.map { ref -> ids.collect { id -> [id, "${ref}.${id}.bed"] }.collectEntries() }
files.map { it-> {
println "trying to get ${x} from ${it}: ${it[x]}"}}
files.map { it-> {
println "trying to get ${test} from ${it}: ${it[test]}"}}
}
Expected behavior and actual behavior
Expected:
trying to get ensembl.annot.genes.flanked from [ensembl.annot.genes:hg38.ensembl.annot.genes.bed, ensembl.annot.genes.flanked:hg38.ensembl.annot.genes.flanked.bed, test:hg38.test.bed]: hg38.ensembl.annot.genes.flanked.bed
trying to get test from [ensembl.annot.genes:hg38.ensembl.annot.genes.bed, ensembl.annot.genes.flanked:hg38.ensembl.annot.genes.flanked.bed, test:hg38.test.bed]: hg38.test.bed
Actual:
trying to get ensembl.annot.genes.flanked from [ensembl.annot.genes:hg38.ensembl.annot.genes.bed, ensembl.annot.genes.flanked:hg38.ensembl.annot.genes.flanked.bed, test:hg38.test.bed]: null
trying to get test from [ensembl.annot.genes:hg38.ensembl.annot.genes.bed, ensembl.annot.genes.flanked:hg38.ensembl.annot.genes.flanked.bed, test:hg38.test.bed]: hg38.test.bed
The reason why my pipeline froze is that there is another bug, when merging with a null channel, that makes it infinitely wait. It is enough to add this line after the workflow above to reproduce this infinite wait:
out = files.map{it->it[x]}.merge(channel.value('hi'))
Environment
- Nextflow version: 25.04.6