These are chat archives for nextflow-io/nextflow

5th
Apr 2018
Félix C. Morency
@fmorency
Apr 05 2018 15:48
@pditommaso "if you don't want that you can just avoid to give the container image the same name/tag". Not sure I understand that phrase. Do you mean I can give a new (singularity) container the same (file) name as the old one and it will not trigger recomputation?
Paolo Di Tommaso
@pditommaso
Apr 05 2018 15:50
it think so
it takes into account only the container name, that for sing it's the file name
Félix C. Morency
@fmorency
Apr 05 2018 15:51
Ooooh! I will try that and let you know. If that works, it would be a great workaround
Félix C. Morency
@fmorency
Apr 05 2018 18:35
Cluster upgrade: success!
Félix C. Morency
@fmorency
Apr 05 2018 19:51
@pditommaso I just did a quick test and using the old file name seems to work
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:14
How do I take a csv file as a process output and then pass it through splitCsv? The way I am doing it, the skip option is getting ignored.
Evan Floden
@evanfloden
Apr 05 2018 20:15
Can you provide the way you are currently doing it?
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:22
something like:
process make_csv {
   input:
   file prep_file
   output:
   file sample_sheet
   """
   prep2csv prep_file > sample_sheet
   """
}

sample_sheet
   .splitCsv( skip: 17 )
   .subscribe { row -> println "${row}"}
Channel.from("A,B,C\n1,2,3").splitCsv(skip: 1) does work. So I was thinking it was some problem with reading from the file in the sample_sheet channel
Evan Floden
@evanfloden
Apr 05 2018 20:24
process make_csv {
   input:
   file prep_file
   output:
   file sample_sheet into sample_sheet_ch
   """
   prep2csv prep_file > sample_sheet
   """
}

sample_sheet_ch
   .splitCsv( skip: 17 )
   .subscribe { row -> println "${row}"}
I think you figured it out yourself :wink:
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:27
I see, thanks. when do you need an explicit into? this example https://github.com/nextflow-io/examples/blob/master/blast.nf on line 77 shows just file sequences as the output clause, and it looks like sequences is then a channel
Evan Floden
@evanfloden
Apr 05 2018 20:29
Good question!
In my work, I am always explict with into. It differentiates the channel contents (the sample_sheet file in your example), with the channel name (sample_sheet_ch).
Evan Floden
@evanfloden
Apr 05 2018 20:43
So into channel is optional. When not specied the channel name defaults to the filename.
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:46
Thanks. turns out, of course, that the csv itself was malformed.
Evan Floden
@evanfloden
Apr 05 2018 20:46
Well at least we both learnt something!
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:55
:+1: curious, do you have the link where it says into channel is optional? still trying to understand exactly how processes and channels fit together.
Evan Floden
@evanfloden
Apr 05 2018 20:56
I don't know of a link sorry but I spoke in person with @pditommaso
Jason Yamada-Hanff
@yamad
Apr 05 2018 20:57
ah, that's reasonably authoritative :smile: