I'm trying to write a CWL workflow that will do a simple trim and map procedure on some bacterial short read data that I've got. For the trimming I'm planning on using trimmomatic and I have modified the Duke-GCB trimmomatic tool slightly for this purpose (see https://github.com/pvanheus/GGR-cwl/blob/master/trimmomatic/trimmomatic.cwl). Here is the CWL for the workflow (trim.cwl
):
cwlVersion: v1.0
class: Workflow
inputs:
reads1: File
reads2: File
slidingw: string
minl: string
outputs:
trimmed_reads:
type: File
outputSource: trim_reads/output_read1_trimmed_file
steps:
trim_reads:
run: { $import: "../../tools/trimmomatic/trimmomatic.cwl" }
inputs:
input_read1_fastq_file: reads1
input_read2_fastq_file: reads2
slidingwindow: slidingw
minlen: minl
out: [output_read1_trimmed_file]
but trying to run this with cwltool trim.cwl
yields:
cwltool 1.0.20160714182449
Tool definition failed validation:
Validation error in object file:///net/ceph-mon1.sanbi.ac.za/sanbi/scratch/pvh/cwl/workflows/trim/trim.cwl
Could not validate as `CommandLineTool` because
could not validate field `outputs` because
At position 0
could not validate field `outputSource` because it is not recognized and strict is True, valid fields are: label, secondaryFiles, format, streamable, doc, id, outputBinding, type
missing required field `baseCommand`
could not validate field `steps` because it is not recognized and strict is True, valid fields are: id, inputs, outputs, requirements, hints, label, doc, cwlVersion, class, baseCommand, arguments, stdin, stderr, stdout, successCodes, temporaryFailCodes, permanentFailCodes
Could not validate as `ExpressionTool` because
could not validate field `outputs` because
At position 0
could not validate field `outputSource` because it is not recognized and strict is True, valid fields are: label, secondaryFiles, format, streamable, doc, id, outputBinding, type
missing required field `expression`
could not validate field `steps` because it is not recognized and strict is True, valid fields are: id, inputs, outputs, requirements, hints, label, doc, cwlVersion, class, expression
Could not validate as `Workflow` because
could not validate field `steps` because
the value `[{'id': 'file:///net/ceph-mon1.sanbi.ac.za/sanbi/scratch/pvh/cwl/workflows/trim/trim.cwl#trim_reads'
'inputs': [{'id': u'file:///net/ceph-mon1.sanbi.ac.za/sa[...]`
is not a valid type in the union, expected one of:
- array of <WorkflowStep>, but
At position 0
missing required field `in`
could not validate field `inputs` because it is not recognized and strict is True, valid fields are: id, in, out, requirements, hints, label, doc, run, scatter, scatterMethod
I'm sure there are all sorts of errors in my CWL, but the parsing as a CommandLineTool is surely the wrong thing?
Hi Michael, I'm looking into upgrading the workflows that we have at Duke-GCB from version draft3 to 1.0. Is there any document that specifies the differences introduced by v1.0? I can't find it. Thanks!
Changes from draft-3 to version 1.0 are listed in paragraph 1.1 on this page: http://www.commonwl.org/v1.0/CommandLineTool.html#Introduction_to_v1.0
There is also a preliminary tool to convert cwl tools (not workflows yet) from draft-3 to v1.0 here : https://github.com/common-workflow-language/cwl-upgrader