Inputs

Inputs

Schema inputs is a key(id) - value(config) mapping of the parameters that a workflow or tool expects in order to run successfully. Inputs can be defined as either Static Inputs or Field Inputs.

Table Of Contents

Static Inputs

A Static Input represents a parameter that needs to be passed to a workflow or toolbox, but that does not require a full “field” configuration because its value will never be provided by the user. Instead its configuration only consists of a value property.

Example:

"myStaticInput": {
	"value": "myStaticValue"
}

While it may seem that a static input should just be defined during the run itself, they can be very handy when building dynamic forms using conditionals, where the user should never interact with this value, but its value should change depending on other values provided.

Field Inputs

Field inputs represent a run parameter whose value can be provided by a user. The Field Input configuration defines the type of input to display in the form in the web application, as well as labels, help texts, default values, and various forms of validation, depending on the field.

Every Field Input contains the following properties: title, hidden, required, description, and help_text

A note about description and help_text:

  • Descriptions should be a concise description of parameter as it will be displayed immediately below the input in the form. These can be dynamically updated using conditionals.
  • Help texts can be more verbose explanations of the parameters as these will be displayed in a collapsable help drawer to the right of the form. These cannot be dynamically updated using conditionals, so it maybe helpful to provide insight here as to why an input might change.

🚧 Reserved Keywords 🚧

⚠️
Input ID “genomes_bucket” is a reserved keyword and will always be treated as a Genomes Bucket Input, be careful not to use that input ID for other types of inputs.

Here is a list of supported Field Inputs:

Text Input

"myTextInput": {
	// required properties
	"title": "My Text Input",
	"type": "string",
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "my default value",
	"pattern": "someRegexPatternItMustMatch"
}
image

Integer Input

"myIntegerInput": {
	// required properties
	"title": "My Integer Input",
	"type": "integer",
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": 20,
	"minimum": 0,
	"maximum": 100
}
image

Text Area Input

"myTextAreaInput": {
	// required properties
	"title": "My Text Area Input",
	"type": "string",
	"format": "textarea",
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "my default value",
	"pattern": "someRegexPatternItMustMatch"
}
image

Dropdown Input

"myDropdownInput": {
	// required properties
	"title": "My Dropdown Input",
	"type": "string",
	"format": "enum",
	"enum": [
		{ "id": "myDefaultValue", "name": "My Default Value" },
		{ "id": "otherValue", "name": "Other Value" }
	],
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "myDefaultValue"
}
image

Multi-select Input (allows selecting multiple options, submits comma-separated string)

"myMultiselectInput": {
	// required properties
	"title": "My Multiselect Input",
	"type": "array",
	"uniqueItems": true,
	"items": [
		{ "id": "myDefaultValue", "name": "My Default Value" },
		{ "id": "otherValue", "name": "Other Value" }
	],
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": ["myDefaultValue"]
}

image

Radio Input (similar to Dropdown, but better if less options)

"myRadioInput": {
	// required properties
	"title": "My Radio Input",
	"type": "string",
	"format": "radio",
	"enum": [
		{ id: "myDefaultValue", name: "My Default Value" },
		{ id: "otherValue", name: "Other Value" }
	],
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "myDefaultValue"
}
image

Checkbox Input

"myCheckboxInput": {
	// required properties
	"title": "My Checkbox Input",
	"type": "boolean",
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": true
}
image

Range Input (submits comma-separated string of numbers)

"myRangeInput": {
	// required properties
	"title": "My Range Input",
	"type": "array",
	"format": "range",
	"min": 0,
	"max": 100,
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": { "min": 10, "max": 90 }
}

image

File Input

"myFileInput": {
	// required properties
	"title": "My File Input",
	"type": "string",
	"format": "file",
	// optional properties
	"filetype": ".txt",
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "path/to/file"
}
image

Directory Input

If filetype is specified, only directories containing a file of the specified type are allowed.

"myDirectoryInput": {
	// required properties
	"title": "My Directory Input",
	"type": "string",
	"format": "dir-path",
	// optional properties
	"filetype": ".txt",
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "path/to/directory"
}
image

Spreadsheet Input (See subpage for more details)

Spreadsheet Input
Spreadsheet Input
"mySpreadsheetInput": {
	// required properties
	"title": "My Spreadsheet Input",
	"type": "string",
	"format": "spreadsheet",
	"columnConfig": {
		".txt": {
			"staticColumns": false,
			"columns": [
				{
					// required properties
					"name": "RunID",
					// optional properties
					"required": true,
					"generateFromData": true,
					"generateConfig": {
						// required properties
						"dataName": "someInputDirectoryId",
						// optional properties
						"delimiterPattern": "_R1|_R2|_1|_2|\\.R"
					}
				},
				{
					// required properties
          "name": "SampleID",
					// optional properties
          "pattern": "^\\d|\\W",
          "prependIfNumber": "S",
          "error": "Sample name must be provided and cannot contain spaces, special characters or start with numbers",
          "required": true
        },
				{
					// required properties
          "name": "SampleGroup",
					// optional properties
          "pattern": "\\W",
          "required": true,
          "error": "Group must be provided, cannot contain spaces or special characters"
        }
			]
		}
	}
	// optional properties
	"filetype": ".txt",
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "path/to/directory"
}
image

Genome Inputs (See subpage for more details on Genome Inputs)

Genome Inputs
Genome Inputs

Genome ID Input (*Requires Genomes Bucket Input)

"myGenomeIdInput": {
	// required properties
	"title": "My Genome ID Input",
	"type": "string",
	"format": "genomeId",
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "GRCh38"
}
image

Genomes Bucket Input (*Required for Genome ID Input)

The genomes bucket input is required if using a Genome ID Input as a hidden configuration input parameter.

⚠️
Input ID “genomes_bucket” is a reserved keyword and will always be treated as a format “genomes_bucket”, be careful not to use that input ID for other types of inputs.
"myGenomesBucketInput": {
  "format": "genomes_bucket",
  "genomeId": "myGenomIdInput",
  "title": "Reference Genome Repo",
  "description": "Bucket for Reference Data Files Used in the Workflows",
  "default": "gs://bioinfo-workflow-references/genomes",
  "hidden": true,
  "required": true,
  "type": "string"
}

Genome Annotation Version Input

"myGenomeAnnotationVersionInput": {
	// required properties
	"title": "My Genome Annotation Version Input",
	"type": "string",
	"format": "genoAnnotVer",
	"genomeId": "myGenomIdInput"
	// optional properties
	"hidden": false,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details....",
	"default": "latest"
}
image

Genome Tax ID Input (always disabled, usually hidden if necessary)

"myGenomeTaxIdInput": {
	// required properties
	"title": "My Genome Tax ID Input",
	"type": "string",
	"format": "taxId",
	"genomeId": "myGenomIdInput"
	// optional properties
	"hidden": true,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details...."
}
image

Genome SNPEFF Version Input (always disabled, usually hidden if necessary)

"myGenomeSnpeffVersionInput": {
	// required properties
	"title": "My Genome SNPEFF Version Input",
	"type": "string",
	"format": "snpEffVer",
	"genomeId": "myGenomIdInput"
	// optional properties
	"hidden": true,
	"required": true,
	"description": "Here is a description",
	"help_text": "Here are more details...."
}
image