These are chat archives for nextflow-io/nextflow

15th
Apr 2017
Karin Lagesen
@karinlag
Apr 15 2017 11:51
ok, question about creating files
I am trying to create a metadata file inside of what will be my publishDir, like this:
metadatafile = file("${params.out_dir}/metadata")
this works if $params.out_dir already exists, but I can't get it to work if it doesn't exist already
any suggestions?
Evan Floden
@evanfloden
Apr 15 2017 13:00
I think by default, publishDir is a copy operation. Maybe try with publishDir with mode:being move.
Paolo Di Tommaso
@pditommaso
Apr 15 2017 13:04
I think @karinlag wants to manage outside a process
Use metadatafile.parent.mkdirs() to make sure the folders exist
Tim Diels
@timdiels
Apr 15 2017 23:14
I've found this clone (not to be confused with Cloneable) a nice alternative to tap, thought I'd share https://pastebin.com/GfBX46Mv Does not work for e.g. clone(channel.flatten()), only for clone(channel). I guess I could rename it tap