Best practices
GENI Workflows runs Nextflow 26.04.1 unmodified. The tool’s official documentation — especially its AWS and GCP sections — applies directly and is worth reading alongside this page.
Combine commands into one task
Section titled “Combine commands into one task”Batch services can take a while to provision what a task needs: create an instance, pull the Docker image. Combining more than one command or tool into the same task avoids paying that overhead twice.
Do it when the output of one tool is not a useful final artefact of the workflow, or when two small, fast tasks need the same CPU and memory.
A real case: alignment with BWA and sorting with samtools. In the GATK reference workflow both run in the same task, producing only the aligned, sorted BAM as output.
Build your own Docker images
Section titled “Build your own Docker images”Prefer images you built over official images or Biocontainers.
Public images can carry outdated or insecure code, make requests to external services, or
simply lack what you need — some have no bash, only sh. Your own images can also bundle
several bioinformatics tools, which is what makes combining commands into one task possible.
Keep buckets in the same region
Section titled “Keep buckets in the same region”Pipelines that read or write large volumes of data across regions get expensive over time, and the extra data movement slows tasks down.
Use buckets in the same region as the environment. If the GENI-managed resources — engine, queue — are in the US but the input files are in Brazil, either copy the files into the same region or create a new GENI environment in that account and region.
Choose the queue for the job
Section titled “Choose the queue for the job”On-demand for development. Instances are created faster, so you find out about processing errors sooner. Use on-demand for long-running tasks and for tasks demanding a lot of CPU or memory too, because those are the ones most likely to be interrupted on spot.
Spot for production, validation runs and reference database builds. AWS advertises discounts of up to 90%; in practice we observe an average 40% reduction against on-demand processing.
Any task sent to Batch is retried up to 5 times on a spot-instance failure.
Use a fallback queue
Section titled “Use a fallback queue”Name a spot queue as the primary and an on-demand queue as the fallback. Nextflow resubmits a job that failed on the spot queue to the on-demand queue, so the submission does not fail because instances were reclaimed.
geni submission create \ --workflow-name wgs-germline --workflow-version v2.1.0 \ --params-file sample.json \ --engine-id <engine-id> \ --queue-id <spot-queue-id> \ --fallback-queue-id <ondemand-queue-id> \ --output-folder s3://lab-results/run-4471/Cromwell does this on its own and does not need a second queue.
GCP specifics
Section titled “GCP specifics”Declare instance types where you can, rather than CPU and memory requirements. GCP usually provisions faster when the instance type is given, and custom (CPU/memory) instances cost up to 5% more.
Set the disk size and type (HDD or SSD) to match what the task actually needs. On GCP the initial disk does not grow automatically — unlike AWS, where the EBS volume does.
Questions and feedback
Section titled “Questions and feedback”GENI Workflows is a new platform under continuous development. If you have questions, criticism or suggestions, write to welliton@geni-bioinfo.com.br. Your suggestions help us set priorities.