These are chat archives for nextflow-io/nextflow

Apr 2017
Karin Lagesen
Apr 15 2017 11:51 UTC
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
Apr 15 2017 13:00 UTC
I think by default, publishDir is a copy operation. Maybe try with publishDir with mode:being move.
Paolo Di Tommaso
Apr 15 2017 13:04 UTC
I think @karinlag wants to manage outside a process
Use metadatafile.parent.mkdirs() to make sure the folders exist
Tim Diels
Apr 15 2017 23:14 UTC
I've found this clone (not to be confused with Cloneable) a nice alternative to tap, thought I'd share Does not work for e.g. clone(channel.flatten()), only for clone(channel). I guess I could rename it tap