WDL: specify directory as input.
Hi
(will I'm trying to run nextflow, I'm playing with small WDL workflows)
I've got a workflow that needs a directory as input (I've got a task with `find ~ {dir} -type f (...)` )
It looks like Directory was defined in WDL1.1 https://github.com/openwdl/wdl/blob/main/versions/development/SPEC.md#task-inputs
but it's not parsed in
```
$ java -jar wdlTools-0.17.15.jar check my.wdl
===============================
Type-check errors in my.wdl
===============================
Line:Col | Description
-------------------------------
6:8-6:32 | struct Directory has not been defined
6:8-6:32 | dir value "NO_DIR" of type String is not coercible to Any
37:8-37:21 | struct Directory has not been defined
```
I compiled it with `File` instead of `Directory` , but the web GUI really wants a plain File.
I'm going to try with a String and a full path (but I'm not really sure of what is a full path here, can I use a file ID instead of a path with blank spaces ?)
Or is there any other way to specify an input directory ?
thanks.
Comments
4 comments
setting a plain path such as `/Bulk/Whole genome sequences/`, quoted, doesn't work (no such file or directory)
Hi @Pierre LIndenbaum?,
For using " Directory" type,
That should be enough for it to compile successfully.
I got another answer from the support. Here is a snapshot of the answer:
> In order to distinguish between inputs related only to a particular stage and whole workflow, stage-common "prefix" is used for the latter:
>
> https://documentation.dnanexus.com/developer/building-and-executing-portable-containers-for-bioinformatics-software/dxcompiler#compiling-and-running-a-workflow
>
> With that in mind, the content of params.json would then look like:
```
{
"stage-common.bed":"dx://bllablabla",
"stage-common.dir":"dx://bliblabli"
}
```
also , the answer to the original question was to switch the WDL version to `2.0` .
````
version 2.0
workflow MY_WORKFLOW {
input {
Directory dir
(...)
```
Please sign in to leave a comment.