common-workflow-language / common-workflow-language/cwltool

Executing workflow from argument file with provenance not working as expected

Open
#1,843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

## Expected Behavior
When executing a workflow with the workflow in the argument yaml file using cwl:tool: works as expected.
When executing it with `--provenance PROV` the provenance should show all files and provenance elements.

## Actual Behavior
However when executing it with `--provenance PROV` the provenance does not show any individual workflow files.

To explain it a bit in more detail...

When running the workflow using local cwl files it works

`cwltool --outdir OUT --provenance PROV ../workflows/workflow_longread_quality.cwl longread_quality/no_kraken.yaml`

```
find PROV | grep "cwl$"
PROV/snapshot/workflow_prepare_fasta_db.cwl
PROV/snapshot/minimap2_to_fastq.cwl
PROV/snapshot/filtlong.cwl
PROV/snapshot/pigz.cwl
PROV/snapshot/prepare_fasta_db.cwl
PROV/snapshot/array_to_file.cwl
PROV/snapshot/krona.cwl
PROV/snapshot/files_to_folder.cwl
PROV/snapshot/nanoplot.cwl
PROV/snapshot/workflow_longread_quality.cwl
PROV/snapshot/concatenate.cwl
PROV/snapshot/kraken2.cwl
PROV/workflow/packed.cwl
```

When running it like

`cwltool --outdir OUT --provenance PROV https://gitlab.com/m-unlock/cwl/-/raw/master/workflows/workflow_longread_quality.cwl longread_quality/no_kraken.yaml`

```
find PROV | grep "cwl$"
PROV/workflow/packed.cwl
```

it does not show the individual cwl files. Neither when executing it like

```
cwl:tool: ../../workflows/workflow_longread_quality.cwl
# cwl:tool: https://gitlab.com/m-unlock/cwl/-/raw/master/workflows/workflow_longread_quality.cwl
identifier: TEST
readtype: Nanopore
fastq_rich: true
threads: 6
memory: 4000
longreads:
- class: File
location: http://download.systemsbiology.nl/unlock/cwl/test_data/ont_guppy_reads.fq.gz
filter_references:
- class: File
location: http://download.systemsbiology.nl/unlock/cwl/test_data/human_small.fa.gz

```

```
find PROV | grep "cwl$"
PROV/snapshot/workflow_longread_quality.cwl
PROV/workflow/packed.cwl
```

## Workflow Code

```
# cwl:tool:
identifier: TEST
readtype: Nanopore
fastq_rich: true
threads: 6
memory: 4000
longreads:
- class: File
location: http://download.systemsbiology.nl/unlock/cwl/test_data/ont_guppy_reads.fq.gz
filter_references:
- class: File
location: http://download.systemsbiology.nl/unlock/cwl/test_data/human_small.fa.gz
```

## Your Environment
* cwltool version: 3.1.20230513155734

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.