common-workflow-language / common-workflow-language/cwltool
cwltool with CWL version v1.1 document doesn't enforce required secondaryFile as per the standard
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## Expected Behavior
Tell us what should happen
Expected a 'Missing required secondary file' error to occur
## Actual Behavior
Tell us what happens instead
Workflow ran successfully.
## Workflow Code
```yaml
cwlVersion: v1.1
class: CommandLineTool
# Metadata
id: samtools_quickcheck
label: samtools-quickcheck
doc: Use samtools quickcheck to ensure that the secondary-files is behaving correctly
# Requirements
requirements:
- class: ResourceRequirement
ramMin: 2000
coresMin: 1
- class: DockerRequirement
dockerPull: 'quay.io/biocontainers/samtools:1.10--h9402c20_2'
- class: InlineJavascriptRequirement
- class: ShellCommandRequirement
# Base command
baseCommand: [ "samtools", "quickcheck" ]
# Inputs
inputs:
# Sample name used to determine file output name
sample_name:
type: string
label: Sample Name
doc: Name of the sample
# Bam file, must be in bam format and have a .bai suffix
sample_bam_filepath:
type: File
# Ensure it is of bam format
format: http://edamontology.org/format_2572
streamable: true
doc: Path to the bam file
secondaryFiles:
- .bai
inputBinding:
position: 1
outputs: {}
# Ensure successful output
successCodes:
- 0
```
## Full Traceback
```pytb
INFO /home/alexiswl/anaconda3/envs/cwl/bin/cwl-runner 3.0.20200710214758
INFO Resolved 'input-check.cwl' to 'file:///a/UMCCR-ILLUMINA/cwl-iap/test/secondary-files/input-check.cwl'
WARNING [job samtools_quickcheck] Skipping Docker software container '--memory' limit despite presence of ResourceRequirement with ramMin and/or ramMax setting. Consider running with --strict-memory-limit for increased
portability assurance.
INFO [job samtools_quickcheck] /tmp/vhy4wpwq$ docker \
run \
-i \
--mount=type=bind,source=/tmp/vhy4wpwq,target=/niUcka \
--mount=type=bind,source=/tmp/pofzvwv0,target=/tmp \
--mount=type=bind,source=/home/alexiswl/cwl_temp_data/bams/isolated_bam/wgEncodeUwRepliSeqBg02esG1bAlnRep1.bam,target=/var/lib/cwl/stga2808eda-ee5f-4fe0-8be9-c6be4cd8c6ea/wgEncodeUwRepliSeqBg02esG1bAlnRep1.bam,read
only \
--workdir=/niUcka \
--read-only=true \
--net=none \
--user=1000:1000 \
--rm \
--env=TMPDIR=/tmp \
--env=HOME=/niUcka \
--cidfile=/tmp/ehvq3a5l/20200715110928-393352.cid \
quay.io/biocontainers/samtools:1.10--h9402c20_2 \
/bin/sh \
-c \
'samtools' 'quickcheck' '/var/lib/cwl/stga2808eda-ee5f-4fe0-8be9-c6be4cd8c6ea/wgEncodeUwRepliSeqBg02esG1bAlnRep1.bam'
INFO [job samtools_quickcheck] Max memory used: 0MiB
INFO [job samtools_quickcheck] completed success
{}
INFO Final process status is success
```
Code run
```bash
$ cwl-runner input-check.cwl input-check.input.yaml
```
Input Yaml Run
```yaml
sample_bam_filepath:
class: File
format: http://edamontology.org/format_2572
path: /home/alexiswl/cwl_temp_data/bams/isolated_bam/wgEncodeUwRepliSeqBg02esG1bAlnRep1.bam
sample_name: a_string
```
Proof no secondary file exists:
```bash
$ls /home/alexiswl/cwl_temp_data/bams/isolated_bam/
wgEncodeUwRepliSeqBg02esG1bAlnRep1.bam
```
## Your Environment
* cwltool version:
Check using ``cwltool --version``
```bash
cwltool 3.0.20200710214758
```
Contributor guide
Assessment
This issue has not been assessed yet.