These are chat archives for nextflow-io/nextflow

5th
Jun 2017
Phil Ewels
@ewels
Jun 05 2017 06:06
Great! Let me know if you run into any problems. Good spot on the broken links - I'll fix them later today.. Thanks!
Phil Ewels
@ewels
Jun 05 2017 07:32
(..fixed :+1:)
Also, if it's of interest, this NF RNA pipeline has a simpler setup than the CAW pipeline.
Benjamin Wingfield
@nebfield
Jun 05 2017 10:56
is there a way to pass the current working directory of a process as an input to a script? I have an rmarkdown file that sets the working directory to its current location in $baseDir/reports/ - when I pass input files to rmarkdown it can't find them
Benjamin Wingfield
@nebfield
Jun 05 2017 10:58
thanks, i'll have a look!
Benjamin Wingfield
@nebfield
Jun 05 2017 11:15
ah, $workDir gives top level access to the working directory only
I think I need the path printed by a submitted process
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:20
um, scripts should be executed in the implicit task work dir assigned by NF
Evan Floden
@evanfloden
Jun 05 2017 11:20

the path printed by a submitted process

Not sure I understand printed by a submitted process. Printed in which sense? to stout? I would avoid doing any task execution outside of the workDir.

Benjamin Wingfield
@nebfield
Jun 05 2017 11:21
yeah all my other scripts have that behaviour, I think this might be a quirk of rmarkdown
sorry I meant the output of nextflow, for example: [36/0140d4] Cached process > test
Evan Floden
@evanfloden
Jun 05 2017 11:25
I think I get what you mean now. So you need to access the dir from, for example, work/36/0140d4… in another downstream process?
Benjamin Wingfield
@nebfield
Jun 05 2017 11:25
yes, exactly
sorry, it would be the same process
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:25
use the bash implicit variable $PWD
taking care to escape it ie \$PWD
Benjamin Wingfield
@nebfield
Jun 05 2017 11:29
that makes sense, I'll try that thank you
Benjamin Wingfield
@nebfield
Jun 05 2017 11:45
that worked perfectly, thanks. after doing more reading rmarkdown files are a bit fragile and have some odd behaviour with working directories.
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:47
well NF can't fix rmarkdown fragility :)
Benjamin Wingfield
@nebfield
Jun 05 2017 11:48
haha unfortunately not :( thanks again!
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:48
enjoy