Inputs

Input parameters can be used to define which files or information the enduser has to provide. For example, if you have a workflow that analyzes a CSV file, an input parameter can be defined to ask the user to upload his or her data file.

Cloudgene supports POSIX compatible filesystems (e.g. Linux or OS X) and the Hadoop Distributed File System (HDFS) as well as basic input fields for numbers or strings. On the basis of these input-parameters the Cloudgene web interface is created dynamically.

Input parameters are defined in the inputs section where each parameter is defined by an unique id, a textual description and a type.

name: input-example
version: 1.0
workflow:
  inputs:
    - id: param1
      description: Description of parameter 1
      type: number
    - id: param2
      description: Description of parameter 2
      type: text

The value of the parameter can be referenced by $id in the workflow.

name: input-example
version: 1.0
workflow:
  steps:
    - name: Name Step1
      cmd: /bin/echo Value of Parameter 1 $param1
      stdout: true
  inputs:
    - id: param1
      description: Description of parameter
      type: number

Properties

These properties define the basic behaviour of an input parameter::

Property Required Description
id yes Defines a id for the parameter
description yes This text serves as label for the input field.
type yes One of the following types
value no Defines the default value of this parameter. This value is preselected in the job submission form (default: empty).
visible no Defines if the input control is visible or hidden (default: true).
required no Defines if the parameter is mandatory or can be submitted empty by the user (default: true).
help no Contains the link to a help page for this parameter (default: empty).
If a link is provided, a icon appears nearby the label:

Input Controls

At the moment the following types of input parameters are supported to build forms:

Types Control
local_file
hdfs_file
local_folder
hdfs_folder
text
number
list
app_list
checkbox

local_file

Creates a file-upload field where one file can be selected and uploaded.

  • uploaded file will be copied into local workspace
  • contains absolute path to the uploaded file
  • all input files will be deleted after job run

local_folder

Creates a file-upload field where multiple files can be selected and uploaded.

  • uploaded files will be copied into local workspace
  • contains absolute path to the folder which contains all uploaded files
  • all input files will be deleted after job run

hdfs_file

Creates a file-upload field where file can be selected and uploaded.

  • uploaded file will be imported into HDFS
  • contains path to the imported file into the HDFS filesystem
  • all input files will be deleted after job run

hdfs_folder

Creates a file-upload field where one or multiple files can be selected and uploaded.

  • uploaded files will be imported into HDFS
  • contains path to the HDFS folder where all imported files were stored
  • all input files will be deleted after job run

text

Creates an input-field where a text can be entered by the user.

  • TODO: format? length

number

Creates an input-field where a number can be entered by the user.

  • TODO: format? min, max, step? check on clientside needed

list

Creates a drop-down list with different options. The values property contains key/value pairs of the available options in the list:

- id: list
  description: Input List
  type: list
  values:
    keya: Value A
    keyb: Value B

checkbox

Creates a checkbox with two different states. The values property contains values that are used if the checkbox is either selected (true) or unselected (false);

- id: checkbox
  description: Input Checkbox
  type: checkbox
  value: false
  values:
    true: valueTrue
    false: valueFalse  

app_list

Creates a drop-down list where the user can select an application. The property category is optional and can be used to display only applications with the provided category. The value of this parameter contains the Application Link of the selected application.

- id: refData
  description: Reference Data
  type: app_list
  category: ref-data

Learn more about Application Links and their advantages.

Layout and Groups

label

Creates a label to display instructions or to separate input controls.

- id: mylabel
  description: This is a label
  type: label

group

  • TODO