These are chat archives for nextflow-io/nextflow

5th
Jun 2017
Phil Ewels
@ewels
Jun 05 2017 06:06 UTC
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 UTC
(..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 UTC
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 UTC
thanks, i'll have a look!
Benjamin Wingfield
@nebfield
Jun 05 2017 11:15 UTC
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 UTC
um, scripts should be executed in the implicit task work dir assigned by NF
Evan Floden
@evanfloden
Jun 05 2017 11:20 UTC

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 UTC
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 UTC
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 UTC
yes, exactly
sorry, it would be the same process
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:25 UTC
use the bash implicit variable $PWD
taking care to escape it ie \$PWD
Benjamin Wingfield
@nebfield
Jun 05 2017 11:29 UTC
that makes sense, I'll try that thank you
Benjamin Wingfield
@nebfield
Jun 05 2017 11:45 UTC
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 UTC
well NF can't fix rmarkdown fragility :)
Benjamin Wingfield
@nebfield
Jun 05 2017 11:48 UTC
haha unfortunately not :( thanks again!
Paolo Di Tommaso
@pditommaso
Jun 05 2017 11:48 UTC
enjoy