nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

spread operator doesn't connect channels in dag

Open msmootsgi opened this issue 10 years ago • 2 comments

The spread operator does not connect the two channels in the DAG produced with the -with-dag argument. Here is a simple pipeline the shows the problem:

Channel
    .from(1,2)
    .into{ chan1 }

Channel
    .from("a","b","c")
    .into{ chan2 }

chan1
    .spread( chan2 )
    .into { chan3 }

process saySomething {

    input:
    set num, let from chan3

    output:
    stdout into chan4

    script:
    """
    echo "num: ${num} let: ${let}"
    """
}

chan4.view()

I've attached an image of what the actual dag produced looks like and what I'd expect the dag to look like. In the actual output there's an extra toList operator shown, which I'm guessing is implicit in the spread operation. Ideally it shouldn't be there since it's not reflected in the code, but if it's easier to leave it in, it really won't hurt anything, as long as it then connects to the spread node.

This is what actually gets produced:

actual_spread_dag_bug

This is what should get produced:

expected_spread_dag_bug2

msmootsgi avatar Oct 06 '16 23:10 msmootsgi

I've uploaded 0.22.3-SNAPSHOT that fixes this issue. You may want to give it a try.

pditommaso avatar Oct 10 '16 09:10 pditommaso

Tried and looks great. Many thanks!

mes5k avatar Oct 10 '16 21:10 mes5k