From 2bb9d18d5a4889d4399acac163632d57bb45f516 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Tue, 11 Jul 2023 13:49:41 +0200 Subject: [PATCH] example syntax for restrictions --- workflow/cwl/raptor-build.cwl | 25 +++++++++++++++++++++++++ workflow/cwl/raptor-search.cwl | 20 ++++++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/workflow/cwl/raptor-build.cwl b/workflow/cwl/raptor-build.cwl index 77c5acdb..f6b49b6a 100644 --- a/workflow/cwl/raptor-build.cwl +++ b/workflow/cwl/raptor-build.cwl @@ -47,6 +47,14 @@ inputs: inputBinding: prefix: --output + false_positive_rate: + type: double? + label: The false positive rate used for building the index. + doc: | + Default: 0.05. Value must be in range [0,1] + inputBinding: + prefix: --fpr + hints: SoftwareRequirement: packages: @@ -55,6 +63,20 @@ hints: version: [ "2.0.0"] DockerRequirement: dockerPull: quay.io/biocontainers/raptor:2.0.0--h19e8d03_1 + cwltool:ParameterRestrictions: + restrictions: + kmer_size: + - class: intInterval + low: 0 + high: 32 # inclusive by default + index_size: + - class: regex + pattern: "\d*[kmgt]" + false_positive_rate: + - class: interval + low: 0 + high: 1 + high_inclusive: false requirements: EnvVarRequirement: @@ -89,3 +111,6 @@ outputs: type: File outputBinding: glob: $(inputs.output_name) + +$namespaces: + cwltool: "http://commonwl.org/cwltool#" diff --git a/workflow/cwl/raptor-search.cwl b/workflow/cwl/raptor-search.cwl index 3102ad04..1461b8ee 100644 --- a/workflow/cwl/raptor-search.cwl +++ b/workflow/cwl/raptor-search.cwl @@ -18,13 +18,6 @@ inputs: format: - edam:format_1929 # FASTA - edam:format_1930 # FASTQ - false_positive_rate: - type: double? - label: The false positive rate used for building the index. - doc: | - Default: 0.05. Value must be in range [0,1] - inputBinding: - prefix: --fpr error_tolerance: type: int? label: The number of errors to tolerate @@ -39,7 +32,7 @@ inputs: inputBinding: prefix: --output p_max: - type: double + type: double? label: Used in the dynamic thresholding doc: | The higher p_max, the lower the threshold. Default: 0.15. Value must be in @@ -52,6 +45,16 @@ hints: packages: raptor: specs: [ https://bio.tools/raptor ] + cwltool:ParameterRestrictions: + restrictions: + error_tolerance: + - class: intInterval + low: 0 + # high default value is positive infinity + p_max: + - class: interval + low: 0 + high: 1 requirements: EnvVarRequirement: @@ -73,3 +76,4 @@ outputs: $namespaces: edam: http://edamontology.org/ + cwltool: "http://commonwl.org/cwltool#"