Setting workDir in nextflow.config?

1,037 views
Skip to first unread message

Eric 'Siggy' Scott

unread,
Feb 5, 2020, 4:36:29 PM2/5/20
to next...@googlegroups.com
Hello NextFlowers,

Is there a way to set the workDir inside nextflow.config?

I understand that I can use the -w option or the NXF_WORK variable.  But I'd prefer to set everything in one config file (instead of an external script).

I've tried the following, but it seems to have no effect:

workflow.workDir = '/scratch/user/work/'

env.NXF_WORK = '/scratch/user/work/'


Thanks,
Siggy

--

——

Eric "Siggy" Scott | MITRE

Senior Artificial Intelligence Engineer, T831: AI & Autonomous Systems Dept.

Doctoral Candidate, George Mason University

Paolo Di Tommaso

unread,
Feb 6, 2020, 8:52:52 AM2/6/20
to nextflow
Yes, just 

```
workDir = 'something'
```


p

--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nextflow/CAC_28AXN40fe%2B2FBox-grmikRJN-RR49YsEOrqG5H%2B40iLGPgg%40mail.gmail.com.

Eric 'Siggy' Scott

unread,
Feb 6, 2020, 8:54:50 PM2/6/20
to next...@googlegroups.com
Perfect—thanks, Paolo!

Anand Venkatraman

unread,
Mar 12, 2020, 3:48:03 PM3/12/20
to Nextflow
Is there a way to set this within a main.nf file

Something like

params.in = './my_input'
params.outdir = "s3_path"

I cannot do params.work-Dir


On Thursday, February 6, 2020 at 8:52:52 AM UTC-5, Paolo Di Tommaso wrote:
Yes, just 

```
workDir = 'something'
```


p

On Wed, Feb 5, 2020 at 10:36 PM Eric 'Siggy' Scott <esc...@gmu.edu> wrote:
Hello NextFlowers,

Is there a way to set the workDir inside nextflow.config?

I understand that I can use the -w option or the NXF_WORK variable.  But I'd prefer to set everything in one config file (instead of an external script).

I've tried the following, but it seems to have no effect:

workflow.workDir = '/scratch/user/work/'

env.NXF_WORK = '/scratch/user/work/'


Thanks,
Siggy

--

——

Eric "Siggy" Scott | MITRE

Senior Artificial Intelligence Engineer, T831: AI & Autonomous Systems Dept.

Doctoral Candidate, George Mason University

--
You received this message because you are subscribed to the Google Groups "Nextflow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to next...@googlegroups.com.

Paolo Di Tommaso

unread,
Mar 13, 2020, 5:28:12 AM3/13/20
to nextflow
Nope. The work dir can set via `-w` command-line option, NXF_WORK env variable and the `workDir` setting in the configuration file. 

Hope it helps 


p

To unsubscribe from this group and stop receiving emails from it, send an email to nextflow+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nextflow/aad48444-bda2-41d2-a4fd-7facf71e365a%40googlegroups.com.

Sayantan Das

unread,
May 27, 2020, 10:55:05 PM5/27/20
to Nextflow
Hi Paolo,

How to have a variable in the workDir option inside the config file ? 

Something like ? Thank you so much for your help. 

scratch/\$(whoami)/

Paolo Di Tommaso

unread,
May 31, 2020, 6:01:47 AM5/31/20
to nextflow

```
workDir  = "/some/path/${my_variable}"
```

Hope it helps 

p
Reply all
Reply to author
Forward
0 new messages