These are chat archives for nextflow-io/nextflow

6th
May 2015
Paolo Di Tommaso
@pditommaso
May 06 2015 18:51
@andrewcstewart do you think that is necessary when mounting a directory instead of a volume? I'm not sure about that
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 19:47
Hi again,
Paolo Di Tommaso
@pditommaso
May 06 2015 19:47
hi
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 19:47
mix_max_joined = min_max_bed
    .collectFile()
If I perform this operation, the result mix_max_joined is a normal channel that will have inside all the original items in mix_max_bed
Paolo Di Tommaso
@pditommaso
May 06 2015 19:49
um, collectFile aggregate the source items to a file and return that file
so, mix_max_joined will emit a file
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 19:51
OK, then if I want to aggregate the source items to a new channel how I can perform this operation. There is any available method?
Paolo Di Tommaso
@pditommaso
May 06 2015 19:51
not to a file you mean ?
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 19:52
no, to a single channel
Paolo Di Tommaso
@pditommaso
May 06 2015 19:52
you can use groupBy or groupTuple or reduce
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:10
Sorry again, but I don't see how to do it. All these methods allow to perform operations on the items, but I would like just to concatenate the items of the original channel
Paolo Di Tommaso
@pditommaso
May 06 2015 20:11
concatenate how? can you me show an example?
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:11
wait
Each item inside min_max_bed will have a single line, and I will like to have a single channel with all the lines together
1;1335985201;0;1336118243
1;1336122309;0;1336376894
1;1335985201;0;1336118236
Paolo Di Tommaso
@pditommaso
May 06 2015 20:16
each item is a string or a list of elements?
However it should be something line this
'''
1;1335985201;0;1336118243
1;1336122309;0;1336376894
1;1335985201;0;1336118236
'''
.readLines()
.channel()
// you need only the part below
.reduce([]) { all, line -> all<<line }
.map { it.join('\n') }
.println()
what about that?
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:21
sorry Paolo
I'll try
Thanks!!!
Paolo Di Tommaso
@pditommaso
May 06 2015 20:21
reduce it's very powerful
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:22
Yeah I was using reduce in a toy example but the [ ], and the all was missing
Paolo Di Tommaso
@pditommaso
May 06 2015 20:22
you can aggregate data in many different ways
basically there you are aggregating to a list, then the map concatenate the list to a string
easy!
:)
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:23
Yeah when you see it!
Jose Espinosa-Carrasco
@JoseEspinosa
May 06 2015 20:25
hahaha!
:clap: :clap: :clap:
Andrew Stewart
@andrewcstewart
May 06 2015 23:58
@pditommaso not really sure.. though Im seeing major container buildup on my end. I was wondering if it was bc you have to specifiy ‘docker rm -v’ for containers mounting volumes
but it could be just from failed jobs?