Examples¶
Krini's built-in examples, which Use an example puts into the task and workflow forms: small, public and without inputs, so that they run without any data of yours. They are the examples of the end-to-end tests of ELIXIR On-Cloud: the task through the proTES gateway to TESK, the workflows on Conquest, and the federated learning run on the NVFlare hub. A deployment can replace them with its own (see Examples); this page then doesn't describe what its forms offer.
Task¶
Hello world: one executor in a small public image (Alpine Linux from Docker Hub), which prints a greeting, the user ID it runs as and the date. The TES task:
{
"name": "hello-world",
"description": "Example task of Krini",
"executors": [
{
"image": "alpine:3.22",
"command": ["sh", "-c", "echo \"Hello from Krini!\"; id -u; date -u"]
}
]
}
It runs on any TES service that can pull images from Docker Hub. Its logs (View Details) show the output.
Workflows¶
One example per workflow language that Conquest runs: Nextflow (NFL),
Snakemake (SMK) and WDL. The form offers those of the languages and versions that the
selected service lists in its service info.
Conquest runs workflows from public GitHub repositories only, at a full
commit SHA (revision in the engine parameters, under Advanced
Configuration in the form), and takes the main file of a WDL workflow
from main_workflow_path. Other WES services may expect other workflow
URLs and engine parameters: change the example accordingly, or ask your
operator for examples of your services.
Nextflow¶
nextflow-io/hello (Apache-2.0): one process that says hello in four languages, as four tasks.
{
"workflow_url": "https://github.com/nextflow-io/hello",
"workflow_type": "NFL",
"workflow_type_version": "DSL2",
"workflow_params": {},
"workflow_engine_parameters": {
"revision": "3c2cdc9823c2b4636e5e3e73e223878099ff5dc9"
}
}
Snakemake¶
nathanhaigh/snakemake-hello-world
(GPL-3.0): four small shell jobs of the Snakefile at the top of the
repository.
{
"workflow_url": "https://github.com/nathanhaigh/snakemake-hello-world",
"workflow_type": "SMK",
"workflow_type_version": "9.17.3",
"workflow_params": {},
"workflow_engine_parameters": {
"revision": "225cc26bdb097d8deb060306e64c24adbc8ccffc"
}
}
WDL¶
openwdl/learn-wdl (BSD-3-Clause):
a workflow with one task, which greets the name it gets as its only input
(HelloInput.name), in an ubuntu container.
{
"workflow_url": "https://github.com/openwdl/learn-wdl",
"workflow_type": "WDL",
"workflow_type_version": "1.0",
"workflow_params": { "HelloInput.name": "ELIXIR On-Cloud" },
"workflow_engine_parameters": {
"revision": "b219e5b5b8d79d2cf940f6f3a614d1eb9501866c",
"main_workflow_path": "1_script_examples/1_hello_worlds/4_hello_input_workflow/input-workflow.wdl"
}
}
I/O Schema demo¶
Use the demo workflow (under Workflow from a tool registry; see
Workflows from I/O Schemas) enters
the tool ga4gh-io-schema-demo, version 1.0.0: the demo workflow of the
GA4GH I/O Schema
(examples/demo/, Apache-2.0), published with its schema in the tool
registry of ELIXIR On-Cloud (TRS-Filer). It is a WDL 1.1 workflow that
filters aligned reads (BAM) by mapping quality and flags, sorts and
indexes them, and reports statistics before and after filtering. Its only
required input is the BAM file, by an https or s3 URL; the schema
proposes a small public test file (from nf-core's test data), which the
form shows as an example.
It runs on WES services that run WDL 1.1 and can fetch the workflow, such
as Conquest: Krini takes the repository and the commit from the
descriptor's source URL in TRS (raw.githubusercontent.com, at a full
commit). Other tool registries need not have it; Krini offers the button
only with its built-in examples (a deployment with examples of its own
doesn't show it).
Federated learning¶
Federated learning: the demo job logreg-fedavg-4 of the NVFlare hub
of nvflare-wes-testbed,
which trains a logistic regression model at four sites and averages it
(federated averaging). A federated learning run is a WES run like any
other: the workflow type is NVFLARE, version 2.9, the workflow URL is
the name of a job that the hub offers, and the parameters name the sites
(as many as the job takes; the hub's service info lists its sites under
tags). The form offers this example only for services that run
NVFLARE 2.9. Its sites are those of the hub of ELIXIR On-Cloud: the
TESK (tesk-fi, tesk-cz) and Poiesis (poiesis-fi, poiesis-cz)
deployments of two Nodes, Finland and the Czech Republic, so the run uses
two TES implementations at two Nodes, each site with its own share of the
synthetic test data. For a hub with other sites, change them, and choose
the job for that number of sites (logreg-fedavg for two,
logreg-fedavg-3 for three).
{
"workflow_url": "logreg-fedavg-4",
"workflow_type": "NVFLARE",
"workflow_type_version": "2.9",
"workflow_params": {
"sites": ["tesk-fi", "tesk-cz", "poiesis-fi", "poiesis-cz"]
}
}
The hub runs one run at a time and only for users with compute access. The run's details list its outputs (Outputs): the job's final status and the path of the global model. The hub serves the model only to the run's owner, with a token; Krini can't download it yet. The run details show the job name as a link (Workflow URL); it leads nowhere, as the name is no web address.