#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool

label: "FASTQC run"

requirements:
 - class: InlineJavascriptRequirement
 - class: InitialWorkDirRequirement
   listing:
    - entry: "$({class: 'Directory', listing: []})"
      entryname: $(inputs.step)_QualityControl
      writable: true

doc: |
    Performs quality control on FASTQ file

#hints:
#  DockerRequirement:
#    dockerPull: wurssb/unlock_base

stdout: fastqc.log
stderr: fastqc.error

inputs:
  step:
    type: int
    doc: workflow step number
    label: The step number in the workflow
  fastqs:
      type: File[]
      doc: FastQ file directory
      label: FASTQ file directory
      inputBinding:
        position: 100

arguments: ["/unlock/infrastructure/binaries/fastqc_v0.11.9/fastqc", "--outdir", $(inputs.step)_QualityControl]

outputs:
  info:
    type: stdout
  error: 
    type: stderr
  upload: 
    type: Directory
    outputBinding:
      glob: $(inputs.step)_QualityControl

s:author:
  - class: s:Person
    s:identifier: https://orcid.org/0000-0001-8172-8981
    s:email: mailto:jasper.koehorst@wur.nl
    s:name: Jasper Koehorst
  - class: s:Person
    s:identifier: https://orcid.org/0000-0001-9524-5964
    s:email: mailto:bart.nijsse@wur.nl
    s:name: Bart Nijsse

s:citation: https://m-unlock.nl
s:codeRepository: https://gitlab.com/m-unlock/cwl
s:dateCreated: "2020-00-00"
s:license: https://spdx.org/licenses/Apache-2.0 
s:copyrightHolder: "UNLOCK - Unlocking Microbial Potential"


$namespaces:
  s: https://schema.org/
  edam: http://edamontology.org/

$schemas:
 - http://edamontology.org/EDAM_1.18.owl