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?

Hello Peter vH!

For workflows we have "in" and "out". CommandLineTools use 'inputs' and 'outputs'. You've mixed the two in your workflow and the last line of the overly detailed error message says as much. Our apologies for the error messages being so hard to read.