4
$\begingroup$

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!

$\endgroup$

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

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
   """

```
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.