title: Nextflow : Is it possible to tranform a queue channel to a value channel?
body: <p>I have a process <code>A</code> which outputs a file into a channel <code>outA</code>. I want to use that file as input for 3 downstream processes <code>B</code>, <code>C</code> and <code>D</code>. As the channel <code>outA</code> created is a queue channel by default, I cannot directly use the file more than once (unlike value channels).</p>
  
  <p>Currently, I use the <code>into</code> operator to duplicate the channel <code>outA</code> as described <a href="https://github.com/nextflow-io/patterns/blob/master/docs/channel-duplication.adoc" rel="nofollow noreferrer">here</a> (see the code below).  </p>
  
  <p>I also know that you can create a value channel from a file by doing <code>Channel.value(file('/path/to/file.txt'))</code>.  </p>
  
  <p>My code currently :</p>
  
  <pre><code>// Upstream process creating a queue channel with one file
  process A {
      output:
          file outA
      "echo 'Bonjour le monde !' &gt; $outA"
  }
  
  // Queue channel triplication
  outA.into {inB; inC; inD}
  
  // Downstream processes all using the same file
  process B {
      input:
          file inB
      "script of process B $inB"
  }
  
  process C {
      input:
          file inC
      "script of process C $inC"
  }
  
  process D {
      input:
          file inD
      "script of process D $inD"
  }
  </code></pre>
  
  <p>I works fine as it is, but I wonder if it is possible to transform the queue channel <code>outA</code> into a value channel, so that I can use the <strong>same channel as input for processes B, C and D.</strong></p>