#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: CommandLineTool

label: "ENA Browser tools"

baseCommand: []

arguments:
  - valueFrom: $(inputs.enaBrowserTools)/python3/enaDataGet
  - valueFrom: -f
  - valueFrom: embl
  - valueFrom: -d
  - valueFrom: ENA
  - valueFrom: -w
  - valueFrom: -e
  - valueFrom: -exp
  - valueFrom: $(inputs.gca)

inputs:
  enaBrowserTools:
    type: string
    doc: Path of the local enaBrowserTools git repository
    label: enaBrowserTools location
    default: /unlock/infrastructure/binaries/enaBrowserTools
  gca:
    type: string
    doc: Genome Accession number according to ENA
    label: Genome accession number (GCA_....)

outputs:
  gz:
    type: File?
    outputBinding:
      glob: ENA/$(inputs.gca)/*.dat.gz
  xml:
    type: File[]?
    outputBinding:
      glob: ENA/$(inputs.gca)/*.xml
  dat:
    type: File[]?
    outputBinding:
      glob: ENA/$(inputs.gca)/*.dat

$namespaces:
 edam: http://edamontology.org/
 s: http://schema.org/
$schemas:
 - http://edamontology.org/EDAM_1.20.owl
 - https://schema.org/version/latest/schemaorg-current-http.rdf

's:author': 'Ekaterina Sakharova'
's:copyrightHolder': EMBL - European Bioinformatics Institute
's:license': "https://www.apache.org/licenses/LICENSE-2.0"