From c2938fbefc4ffd9144f472e46b1f5c2c30e377b5 Mon Sep 17 00:00:00 2001 From: David Trudgian Date: Thu, 11 Apr 2019 14:33:07 -0500 Subject: [PATCH] Add dummy examples of parameter types --- astrocyte_pkg.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ workflow/main.nf | 24 ++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/astrocyte_pkg.yml b/astrocyte_pkg.yml index 9049383..63afe96 100644 --- a/astrocyte_pkg.yml +++ b/astrocyte_pkg.yml @@ -87,7 +87,52 @@ workflow_parameters: regex: ".*(txt)" min: 1 + - id: test_int + type: integer + required: true + default: 123 + min: 1 + max: 1000 + description: | + This is an example integer field, it is not used by the workflow + + - id: test_real + type: real + required: true + default: 123.456 + min: 1 + max: 1000 + description: | + This is an example real field, it is not used by the workflow + - id: test_string + type: string + required: true + default: "Example" + description: | + This is an example string field, it is not used by the workflow + + - id: test_select + type: select + required: true + default: "Dog" + description: | + This is an example select field, it is not used by the workflow + choices: + - [ 'Cat', 'Cat, Kitten' ] + - [ 'Dog', 'Dog, Puppy' ] + - [ 'Horse', 'Horse, Foal' ] + + - id: test_multiselect + type: multiselect + required: true + default: "Banana" + description: | + This is an example multiselect field, it is not used by the workflow + choices: + - [ 'Apple', 'Green Apple' ] + - [ 'Banana', 'Yellow Banana' ] + - [ 'Strawberry', 'Red Strawberry' ] # ----------------------------------------------------------------------------- # SHINY APP CONFIGURATION diff --git a/workflow/main.nf b/workflow/main.nf index ecdf625..6c901ec 100755 --- a/workflow/main.nf +++ b/workflow/main.nf @@ -14,8 +14,32 @@ // Note - $baseDir is the location of this workflow file main.nf params.story = "$baseDir/../test_data/mobydick.txt" +// Parameters for test values, only used for demonstrating parameter types +params.test_int = 999 +params.test_real = 999.99 +params.test_string = "Default String" +params.test_select = "Default Selection" +params.test_multiselect = "Default Selection" + + stories = Channel.fromPath( params.story ) +process parameters { + + cpus 1 + + """ + echo "Test Parameters Provided..." + echo "story: ${params.story}" + echo "test_int: ${params.test_int}" + echo "test_real: ${params.test_real}" + echo "test_string: ${params.test_string}" + echo "test_select: ${params.test_select}" + echo "test_multiselect: ${params.test_multiselect}" + + """ +} + process uppercase { cpus 1 -- GitLab