Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example syntax for restrictions #350

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions workflow/cwl/raptor-build.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fpr could be 1, though it wouldn't make sense


requirements:
EnvVarRequirement:
Expand Down Expand Up @@ -89,3 +111,6 @@ outputs:
type: File
outputBinding:
glob: $(inputs.output_name)

$namespaces:
cwltool: "http://commonwl.org/cwltool#"
20 changes: 12 additions & 8 deletions workflow/cwl/raptor-search.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -73,3 +76,4 @@ outputs:

$namespaces:
edam: http://edamontology.org/
cwltool: "http://commonwl.org/cwltool#"