4

This is my workflow:

pre_align()
pre_align.out.single_fastqs.view()
get_fq_info(pre_align.out.single_fastqs)

align_bwa(get_fq_info.out.fq_info)

align_bowtie2(get_fq_info.out.fq_info)

where I want to use the same output from get_fq_info as input for either align_bwa and align_bowtie2`.

As it's shown here only align_bwa is executed. If I comment align_bwa THEN align_bowtie2 gets executed.

How can I fix this?

Thank you!

aerijman
  • 645
  • 5
  • 14

2 Answers2

2

I have solved this problem in the past by duplicating the output channel of the desired process in order to feed the same output into multiple downstream processes.

Throckmorton
  • 810
  • 6
  • 15
1

As far as I know, DSL2 should be able to handle this. Have you specified an output qualifier for your process get_fq_info (e.g. path)? I ran into a similar issue when I forgot to specify it.

For example, this will result in the error process align_bowtie2 declares 1 input channel but 0 were specified:

process get_fq_info {
   input:
   path reads

output: "output.txt"

shell: """ myprocess.sh ${reads} > output.txt """ }

And is probably solved by this:

process get_fq_info {
   input:
   path reads

output: path "output.txt"

shell: """ myprocess.sh ${reads} > output.txt """

```