Specify a normal filename / filepath for input JSON using WDL
From what I can tell so far from experimentation, it is possible to hardcode file paths within a WDL on DNANexus, but it is not possible to provide a path in the input.json file.
For example, in the WDL workflow, this works fine:
input {
File input_linux = "dx://myproject:/bin/mybinary."
}
But in the JSON file, that is not allowed. Instead, it requires the project and blob names in a more complex object:
{
"stage-common.input_linux": {
"$dnanexus_link": {
"project": "project-[hash removed]",
"id": "file-[hash removed]"
}
}
}
This is unpleasant to work with. Is it not possible to use human-readable paths in the WDL JSON arguments on the DNANexus platform?
Discussion so far implies that only the blob name is supported:
Comments
2 comments
When I try to use a human-readable "dx://project:/path/to/file" name in my input.json, I get errors from dx run such as:
```
dxpy.exceptions.InvalidInput: i/o value input_linux needs to be given using DNAnexus links, code 422.
```
Interestingly, the dxCompiler includes WDL and json files that demonstrate "dx://project:/path/to/file"-style paths in the JSON file. For example, https://github.com/dnanexus/dxCompiler/blob/develop/contrib/czi/count/inputs.json
However, I cannot get that code from the DNANexus repo to run on DNANexus (or even to compile for that matter: "[error] WDL code is syntactically valid BUT it fails type-checking -----").
For this and similar problems, I usually prefer using "dx find data --name "*.xyz" --brief" to get properly formatted file ids and later use this list of ids in a custom bash one-liner/script (json builder) that will format it to a desired json.
For "dx://project:/path/to/file"-style paths in the JSON file demonstration, I am seeing that the example was posted 5 years ago, possibly it could be related to a specific version of dxCompiler or it could be a bug. You may also share your experience with ukbiobank-support@dnanexus.com, so they will be able to inform DNAnexus eng team or provide better guidance than Community.
If you hear from them, let us then know :).
Please sign in to leave a comment.