These are chat archives for nextflow-io/nextflow

31st
Oct 2016
Evan Floden
@evanfloden
Oct 31 2016 08:31

We can use setto have a process output be a tuple. eg:

set val(id), file(${id}.txt) into someChannel

However, what is the best way/syntax to have a process output a nested tuple? e.g.:

set val, [file($id.1.txt), file(id.2.txt)] into someChannel
Paolo Di Tommaso
@pditommaso
Oct 31 2016 09:20
not sure it works
I thinks the easies way is you output them as usual and then use a map
Evan Floden
@evanfloden
Oct 31 2016 09:50

Great thanks!
So the solution would be:

output:
set val($id), file ( "${id}.1.txt"), file("${id}.2.txt") into someChannel

Then outside the process

  someChannel
    .map { item -> [ item[0], [item[1], item[2]]] }
    .set { mappedChannel }
Denis Moreno
@Galithil
Oct 31 2016 11:03
Hi @pditommaso , I work with @ewels at Scilifelab, and we're thinking of making a version of https://github.com/SciLifeLab/NGI-RNAseq available via docker. Would you recommend cramming everything we need in one container or having one container per required step ?
Paolo Di Tommaso
@pditommaso
Oct 31 2016 11:04
Hi, it depends by you
Denis Moreno
@Galithil
Oct 31 2016 11:04
so there aren't any specific guidelines you would have us to follow
Paolo Di Tommaso
@pditommaso
Oct 31 2016 11:04
personally I prefer the one container approach
Denis Moreno
@Galithil
Oct 31 2016 11:05
I'm assuming there aren't any severe performance impacts
Okay then, we'll go with that
thanks
Paolo Di Tommaso
@pditommaso
Oct 31 2016 11:05
welcome