EccClientGa4ghWesRunCreate Component
Overview
The ecc-client-ga4gh-wes-run-create component provides a form for submitting new workflow runs to a WES endpoint. It has two modes:
- Raw mode (default): the user enters the workflow URL, type, version and
workflow_paramsas JSON. - Schema mode (with
ioSchemaandtrsToolVersion): the user fills in the input form of the workflow's I/O Schema instead, and the component builds the run request from the schema, the values and the TRS tool version (see Run requests).
Usage
Basic Create Form
This example shows the basic form for creating a new workflow run.
NEXT_PUBLIC_WES_URL set to your own WES endpoint (see Live previews), or use the code in the other tabs.Schema mode
With an IO schema and the TRS tool version to run, the form shows the workflow's inputs (ecc-client-ga4gh-wes-io-form) instead of the raw fields, and the workflow that will run: its type and language version (from the schema's x-ga4gh-workflow, else the first version of the TRS tool version that the service runs, else the first version of the TRS tool version) and the workflow URL (the plain primary descriptor in TRS). It says when the WES service doesn't run the workflow's type or version (from its service-info), and submits only valid values.
On submit, the values are translated into workflow_params by the profile's engine binding for the descriptor type (NFL, SMK, WDL, CWL); values that the binding refuses (e.g. a file reference with a scheme that isn't allowed) are shown as <JSON Pointer>: <message>, and ecc-run-create-failed is fired with that text. The engine parameters, tags and attachments of the advanced section are added. An engineProfile then adapts the request to a particular WES server.
This preview uses a provider that submits nothing and shows the request instead:
Engine profiles
Some WES servers need more than the profile's binding gives. An engine profile (EngineProfile from @elixir-cloud/wes/utils) takes the built request and returns the request for one server; it is kept out of the generic builder. The package has one:
conquestEngineProfile: Conquest (opens in a new tab) runs workflows from public GitHub repositories at a full commit SHA. The profile setsworkflow_urlto the repository and adds the engine parametersrevisionand the path of the main workflow file (main_scriptfor Nextflow,snakefilefor Snakemake,main_workflow_pathfor WDL), all taken fromtrsToolVersion.primaryDescriptorUrl: theurlof the TRS descriptor, araw.githubusercontent.comorgithub.com/.../blob/...URL at a commit. It refuses CWL, branches and tags.
Properties
| Property | Type | Default | Description |
|---|---|---|---|
provider | WesProvider | null | Data provider for submitting the run (see Providers) |
ioSchema | object | undefined | An IO schema (GA4GH IO Schema Profile 0.3.0); switches to schema mode |
trsToolVersion | TrsToolVersionRef | undefined | The TRS tool version to run in schema mode: trsUrl, toolId, versionId, and optionally primaryDescriptorPath (as TRS lists it; else the schema's primary_descriptor_path), descriptorTypeVersions (of the tool version) and primaryDescriptorUrl (for engine profiles) |
engineProfile | EngineProfile | undefined | Adapts the built request to a WES server, e.g. conquestEngineProfile |
allowedSchemes | string[] | ['drs', 'https'] | URI schemes that file references may have in schema mode, in the I/O form and in the built request |
Events
| Event Name | React Event Name | Detail Type | Description |
|---|---|---|---|
ecc-run-submitted | onEccRunSubmitted | { runId: string } | Fired when a workflow run is successfully submitted. |
ecc-run-create-failed | onEccRunCreateFailed | Error | Fired when run submission fails. |
