These are chat archives for nextflow-io/nextflow

13th
Feb 2018
Luca Cozzuto
@lucacozzuto
Feb 13 2018 09:56
dear all, can someone explain me a quick way to store the information within a channel in a file, please? (i.e. I'm reading a list of paired files with .fromFilePairs and I would like to save the ID, FILEA and FILEB to a file)
Paolo Di Tommaso
@pditommaso
Feb 13 2018 09:58
and the source is ?
ahh
ok
Luca Cozzuto
@lucacozzuto
Feb 13 2018 09:58
:)
Paolo Di Tommaso
@pditommaso
Feb 13 2018 09:59
I guess you want to create a csv like metadata file ?
Luca Cozzuto
@lucacozzuto
Feb 13 2018 09:59
yes
Paolo Di Tommaso
@pditommaso
Feb 13 2018 10:00
ok
Channel.fromFilePairs('/something/*', flat:true).collectFile { id, file_a, file_b -> "id,$file_a,$file_b" }
maybe ..
Luca Cozzuto
@lucacozzuto
Feb 13 2018 10:03
where does it write?
Paolo Di Tommaso
@pditommaso
Feb 13 2018 10:05
you need to use it in a process right?
Luca Cozzuto
@lucacozzuto
Feb 13 2018 10:06
yes
I need to read the files to write a file containing this meta info
and retrieve this file
Paolo Di Tommaso
@pditommaso
Feb 13 2018 10:07
so, don't care where does it write (to a file obviously)
process foo {
   input: 
   file 'meta.txt' from Channel.fromFilePairs('/something/*', flat:true).collectFile { id, file_a, file_b -> "id,$file_a,$file_b" }
   '''
   your_script --input meta.txt
   '''
}
or via an intermediate channel
Channel
    .fromFilePairs('/something/*', flat:true).collectFile { id, file_a, file_b -> "id,$file_a,$file_b" }
    .set { meta_ch }

process foo {
   input: 
   file 'meta.txt' from meta_ch   
   '''
   your_script --input meta.txt
   '''
}
(gitter is very slow this morning .. :/)
Luca Cozzuto
@lucacozzuto
Feb 13 2018 10:09
:clap:
Luca Cozzuto
@lucacozzuto
Feb 13 2018 10:18
$id : )
Paolo Di Tommaso
@pditommaso
Feb 13 2018 10:18
it was a test ;)
Luca Cozzuto
@lucacozzuto
Feb 13 2018 10:19
eheheheh I'll add salt to your next coffe with us! :)
Paolo Di Tommaso
@pditommaso
Feb 13 2018 10:19
:D
Phil Ewels
@ewels
Feb 13 2018 11:02
Good morning :) Thanks for the tweet @pditommaso ;) Early stages of trying to build this into something bigger and more awesome and trying to think about future problems. Any ideas for how to handle singularity bind points for any user without having to add every possible root directory? nf-core/cookiecutter#4
Paolo Di Tommaso
@pditommaso
Feb 13 2018 11:02
nice, you are welcome
if you don't have the overlay feature, I think there's no alternative to create the mount directory in the container
don't you have it enabled in your cluster ?
Phil Ewels
@ewels
Feb 13 2018 11:22
I thought that we didn't, but @remiolsen just said that we do
I should probably go back and have a play around again - I was pretty sure that I had to add these base directories when we started building the containers
Does no-one else bother adding these root dirs?
Paolo Di Tommaso
@pditommaso
Feb 13 2018 11:24
first version of singularity overlay was disabled by default because it was buggy
now it should be available by default if not disabled by sysadmins
Does no-one else bother adding these root dirs?
in the container ?
Phil Ewels
@ewels
Feb 13 2018 11:25
yeah
ok, so it could just be that I was doing this back before it was cool :sunglasses:
Paolo Di Tommaso
@pditommaso
Feb 13 2018 11:25
likely :)
Tintest
@Tintest
Feb 13 2018 17:09
Hello, i’m fairly new in using nextflow and I have a question :)
Is it possible to have a "main / master" nextflow script calling "sub / slave" other nextflow scripts ?
I tried to do it in a process, the process is successfully called, but nothing is happening. Thanks
Paolo Di Tommaso
@pditommaso
Feb 13 2018 17:11
Tintest
@Tintest
Feb 13 2018 17:12
Thanks a lot :) Have a good evening
Paolo Di Tommaso
@pditommaso
Feb 13 2018 17:12
same there