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

Formt checking broken

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

Description

Related to #716

## Expected Behavior
a) Value from format field should not be modified and
b) "formats may be tested by exact match"
c) ` format: [gz]` in job file and `format: [gz]` in tool/workflow are identical.

## Actual Behavior
a) Values in format field are always transformed into absolute URIs with file name as prefix
b) Only a very limited number of schema names are supported:
- ftp
- file
- http(s)

Getting:

`Incompatible file format, expected format(s) [u'file:///amplicon/CWL/Tools/decompress.tool.cwl#file/gz'] but file object is: {
"class": "File",
"format": "file:///amplicon/CWL/Tools/gz",
"location": "file:///amplicon/CWL/Data/Inputs/seq.fastq.gz",
"size": 1522311,
"basename": "seq.fastq.gz",
"nameroot": "seq.fastq",
"nameext": ".gz"
}`

## Workflow Code

Job:
```
file:
class: File
path: sequences.fastq.gz
format: "file://gz"
#format: gz
```

```
cwlVersion: v1.0
class: CommandLineTool

label: decompress

requirements:
InlineJavascriptRequirement: {}

stdout: |
${return inputs.file.basename.replace(/\.gz$/ , '') ; }


stderr: decompress.error

inputs:
file:
type: File
format:
- "file://gz"
# - gz
inputBinding:
position: 3
output:
type: string?
default: ''

baseCommand: [gzip]

arguments:
- -c
- -d

outputs:

decompressed:
type: stdout
error:
type: stderr

```

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.