Get started with Nextflow on Verily Workbench
Categories:
Prior reading: Workflows in Verily Workbench: Cromwell, dsub, and Nextflow
Purpose: This document provides detailed instructions for configuring and running Nextflow pipelines in Verily Workbench.
Introduction
Nextflow is a framework for creating data-driven computational pipelines, as well as scalable and reproducible scientific workflows using software containers.
Workbench supports Nextflow workflows running on Batch in Google Cloud Project-backed workspaces and AWS HealthOmics on Amazon Web Services-backed workspaces. Users can use either the Workbench web UI or Workbench CLI to create and run Nextflow workflows.
Step-by-step guide
Prerequisites
You'll need the following to complete the steps below:
For GCP or AWS workspaces:
- A Nextflow workflow source file (.nf) that either lives in a GCP bucket or S3 folder in your workspace or in a Git repository
- A GCP bucket or S3 folder in your workspace for workflow outputs
For AWS only:
- An external Elastic Container Registry (ECR) repository for your container images since HealthOmics doesn't support public or external container registries. See Configure external ECR repository resources to set one up, and Configure Nextflow for your platform below for other AWS-specific requirements.
In addition, it's highly recommended to have a nextflow.config file within the same folder as the
Nextflow workflow source file.
If you intend to use an nf-core pipeline, it's highly recommended to create an Artifact Registry repository. See Configure Nextflow for your platform below for more details.
1. Configure Nextflow for your platform
On GCP-backed workspaces, Workbench runs your Nextflow workflow on Batch, currently pinned to Nextflow v25.10. You can still define profiles for resource sizing or environment-specific settings.
By default, nf-core pipelines use quay.io for the container registry. Workbench strongly
recommends mirroring all containers to an Artifact Registry repository instead.
Follow the steps in Create an Artifact Registry
repository. Once
the repository is created, you can use the repository's full URL as the .registry values in your
nextflow.config file. The URL should look something like this:
us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest
You can then add that to the nextflow.config file, as shown below:
// Set to your registry if you have a mirror of containers
apptainer.registry = 'us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest'
docker.registry = 'us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest'
podman.registry = 'us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest'
singularity.registry = 'us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest'
charliecloud.registry = 'us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest'
If you're utilizing profiles in your nextflow.config, you can also define a process.container
that points to your Artifact Registry repository URL:
profiles {
'google-batch' {
includeConfig "config/google_batch_resources.config"
process.executor = 'google-batch'
process.container = "us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest"
}
}
On AWS-backed workspaces, Workbench runs your Nextflow workflow on HealthOmics, currently pinned to Nextflow v25.10. Keep the following configuration rules and requirements in mind to successfully run Nextflow on HealthOmics:
-
All containers must be in ECR. HealthOmics requires every process's container image to come from a private ECR repository in the same AWS Region as your workspace. Any
imagedirective pointing anywhere else (Docker Hub, a public registry, etc.) will fail. If your images aren't already in ECR, follow Configure external ECR repository resources to set up an external ECR repo and grant Workbench access to it. -
Plugin versions are pinned by HealthOmics, not by you. For Nextflow v25.10, HealthOmics pre-installs the
nf-schema@2.6.1,nf-core-utils@0.4.0,nf-prov@1.7.0, andnf-fgbio@1.0.1plugins, and ignores any different plugin version you declare innextflow.config— it can't fetch additional plugins at run time. If a pipeline pins a differentnf-schemaversion than HealthOmics provides, plugin initialization can fail; update the pipeline's declared version to match and re-register the workflow. See AWS's supported plugin versions for the most up-to-date list per Nextflow version. -
Profile order follows selection order. Profiles are applied in the order you select them when creating a job, regardless of the order they're defined in
nextflow.config— see the note under Create a new job below. -
HealthOmics has no internet access. Tasks can't reach the public internet, so any file your workflow references — reference data, external configs, scripts pulled via
wget/curl,includeConfigtargets, etc. — must already be reachable from within your AWS environment. Upload these files to S3 and update your workflow to reference the S3 URI before starting a run.
2. Create a Nextflow workflow
Note
To use a workflow source file that lives in a Git repository, you must create your workflow via the Workbench web UI.
In your workspace, select the Workflows tab. Click Add your first workflow to open the Adding workflow dialog.
Indicate where your workflow source is located and select Nextflow for workflow type.
If your workflow source is in a workspace bucket:
- Select the appropriate bucket name from the dropdown.
- Indicate whether the Nextflow source is a single .nf file or in a folder with main.nf.
- Select the relevant workflow file. Click Next.
If your workflow source is in a Git repository:
- Enter the full Git repository URL (exclude the .git extension).
- Select the reference type by branch name or tag. Workbench will find workflows. Select the one you want to add. Click Next.
Note
You may be prompted to link your GitHub account to Workbench. Click Go to accounts to link your GitHub account on your Workbench profile.Use the wb workflow create command to create
a Nextflow workflow:
wb workflow create \
--workflow <YOUR_WORKFLOW_NAME> \
--workflow-type NEXTFLOW \
--bucket-id <NEXTFLOW_BUCKET_NAME> \
--path <NEXTFLOW_BUCKET_PATH>
To use this command, your workflow source file must live in a GCP bucket or S3 folder in your workspace. You'll see output about your new workflow, including its ID and bucket information.
3. Create a new job
Once you've created a workflow, you can start running jobs.
Select your workflow and click + New job to open the Creating new
job dialog.
On the Enter job details screen, you can add a Nextflow profile. Profiles are sets
of configurations that contain parameters that are used at runtime. Profiles are defined in
nextflow.config files within the profiles block. Separate multiple
profiles with commas.
Note
Profile order matters differently depending on your platform.
On Batch, profiles are applied in the order they're defined in nextflow.config, regardless
of the order you select them here — keep your selection order consistent with your nextflow.config
definition order if you rely on profiles overriding each other.
On AWS HealthOmics, profiles are applied in the order you select them here, regardless of
nextflow.config definition order (see
Configure Nextflow for your platform for details).
Note
If you enabled call caching, the chosen output GCP bucket or S3 storage folder will also store your Nextflow cache. To use the cache, ensure that the output resource bucket or folder remains the same between runs of the same workflow.Use the wb workflow job run command to
start a job.
The example below defines a params file, profile, and the use of Nextflow caching, all of which are optional.
wb workflow job run \
--workflow <WORKFLOW_ID> \ # the ID can be found in the `wb workflow create` output
--job-id <ANY_NAME_FOR_THE_JOB> \
--output-bucket-id <BUCKET_FOR_NEXTFLOW_OUTPUT> \
--output-path <PATH_OF_NEXTFLOW_OUTPUT> \
--params-file-bucket-id <BUCKET_OF_PARAM_FILE> \
--params-file-path <PATH_TO_PARAMS_FILE> \
--profile <PROFILE_FROM_NEXTFLOW.CONFIG> \
--enable-call-caching # whether or not to use Nextflow caching (omit to disable)
4. Monitor your job
Once you've started your job, you can track its progress and view its outputs.
From the Job status tab, click on your job to open its Tasks page, which lists every task in the job.
Each task shows a status chip. You can filter the task list by status:
- Pending – queued, not yet started
- Starting – picked up and initializing
- Running – currently executing
- Completed – finished successfully
- Failed – exited with an error
- Skipped – not run, e.g., due to a
whencondition - Cancelled – stopped by a user (via Abort)
- Deleted – removed from the underlying engine
Tasks that are still in progress and can't yet be matched to a specific pipeline step are grouped under an In Progress heading. Once the job finishes, any remaining unmatched tasks are grouped under Ungrouped instead.
If a task's status is Failed, hover over its status chip to see a tooltip suggesting you check the Nextflow logs for more information.
For each task, click View under Logs to see its log output, or View on GCP under Output to browse its output files in the Google Cloud console.
When you run wb workflow job run, you'll see output that includes a job ID, display name, and
status.
Run wb workflow job describe with your job ID to get additional information about your job.
Run wb workflow job task list with your job ID to get a list of grouped per process tasks.
Outputs and logs can be viewed on the Workbench web UI. GCP users can also use the Google Cloud console.
Video walkthrough
This video shows how to create a Nextflow workflow using a main.nf workflow source file from a
GitHub repository. This repository also includes a nextflow.config file that has a profile called
test_full_gcp. We also use a params file in a GCP bucket called nextflow_resources in the
workspace.
Troubleshooting
Issues when running large samples
You might see disk space issues and errors if running large samples in GCP. If a task hangs
indefinitely and restarting the job does not fix the issue, we recommend making the following
modifications to your nextflow.config file:
process {
cpus = { 1 * task.attempt }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
disk = { 20.GB * task.attempt }
errorStrategy = { task.exitStatus in ((130..145) + 104 + (175..177)) ? 'retry' : 'finish' }
maxRetries = 1
maxErrors = '-1'
withLabel:process_single {
cpus = { 1 }
memory = { 6.GB * task.attempt }
time = { 4.h * task.attempt }
disk = { 20.GB * task.attempt }
}
withLabel:process_low {
cpus = { 2 * task.attempt }
memory = { 12.GB * task.attempt }
time = { 4.h * task.attempt }
disk = { 20.GB * task.attempt }
}
withLabel:process_medium {
cpus = { 6 * task.attempt }
memory = { 36.GB * task.attempt }
time = { 8.h * task.attempt }
disk = { 40.GB * task.attempt }
}
withLabel:process_high {
cpus = { 12 * task.attempt }
memory = { 72.GB * task.attempt }
time = { 16.h * task.attempt }
disk = { 100.GB * task.attempt }
}
withLabel:process_high_memory {
memory = { 200.GB * task.attempt }
disk = { 200.GB * task.attempt }
}
}
Plugin initialization error on AWS HealthOmics
HealthOmics pre-installs fixed versions of the nf-schema, nf-core-utils, nf-prov, and
nf-fgbio plugins per Nextflow version and ignores any other version declared in nextflow.config.
If your pipeline (e.g., an nf-core pipeline) pins a different plugin version than HealthOmics
provides, initialization fails. Update the pipeline's declared plugin version to match the one
HealthOmics pins for its Nextflow version and re-register the workflow.
ECR access denied on AWS HealthOmics
If a run fails while pulling a container image, confirm the ECR repository's resource policy grants
read access to both the Workbench pod account and the omics.amazonaws.com service principal,
and that the repository is in the same AWS Region as your workspace. See Configure external ECR
repository resources for more details.
Issues previewing HTML files
If you're trying to preview an HTML file that references images in other folders (e.g., a MultiQC report), you'll need to click Open in GCP. Select the HTML file in the GCP console to preview it.
Last Modified: 20 October 2026