These are chat archives for nextflow-io/nextflow

5th
Jul 2018
Radoslaw Suchecki
@bioinforad_twitter
Jul 05 2018 01:14
Thanks @pditommaso that works great, but not general enough, i use tuples to carry a lot of metadata and ended up oversimplifying the example. Each item would hold much more information, without over complicating things, the input could look like this:
  Channel
   .from([1,[species:"a"]],[2,[species: "b", sub:["A","B"]]],[3,[species:"c", sub:["A","B","C"]]])
   .println()

[1, [species:a]]
[2, [species:b, sub:[A, B]]]
[3, [species:c, sub:[A, B, C]]]
Shellfishgene
@Shellfishgene
Jul 05 2018 08:06
What is wrong with file "*.trim" into { fastq_trim; fastq_trim2 } in a process? I get Invalid output channel reference
Paolo Di Tommaso
@pditommaso
Jul 05 2018 08:06
it should be file "*.trim" into ( fastq_trim, fastq_trim2 )
Shellfishgene
@Shellfishgene
Jul 05 2018 08:07
Ah, it's supposed to be file "*.trim" into fastq_trim, fastq_trim2. The syntax still trips me up all the time...
Paolo Di Tommaso
@pditommaso
Jul 05 2018 08:08
yes
Shellfishgene
@Shellfishgene
Jul 05 2018 08:08
Yes, sorry. Why is it into { fastq_trim; fastq_trim2 } when declaring the first channel outside a process?
Paolo Di Tommaso
@pditommaso
Jul 05 2018 08:09
because that's a method call to which you are passing a closure objet
you should read into( { fastq_trim; fastq_trim2 } )
it tricky, but the only way to bypass some underlying grammar restrictions
Shellfishgene
@Shellfishgene
Jul 05 2018 08:10
Ok, thanks!