alterlab-latchbio
Installation
SKILL.md
LatchBio Integration
Overview
Latch is a Python framework for building and deploying bioinformatics workflows as serverless pipelines. Built on Flyte, create workflows with @workflow/@task decorators, manage cloud data with LatchFile/LatchDir, configure resources, and integrate Nextflow/Snakemake pipelines. Authoring and validating the workflow needs no account; only latch register and running it on the platform use the user's login.
Keyless Path (default — no LatchBio account)
- Write the workflow against the real SDK (
uv run --with latch python ...) and confirm decorator and API names withinspectrather than memory. Verified in latch 2.77.2 (2026-10-22): resource decorators aresmall_task/medium_task/large_task,small_gpu_task(7 CPU, 30Gi, 1 GPU) /large_gpu_task(63 CPU, 245Gi, 1 GPU),v100_x{1,4,8}_task,g6e_*_task;custom_task(cpu, memory, *, storage_gib=500, timeout=0). - Let import type-check the graph. Decorating and composing the workflow runs Latch's/Flyte's own validation with no login. Verified offline, these fail at import (so they are caught keyless):
@custom_task(cpu=8, memory=32, gpu=1)->TypeError: task() got an unexpected keyword argument 'gpu'(custom_task has nogpu/gpu_type; a GPU comes from a GPU decorator).- a
@workflowwhose body calls a task but whose signature has no return annotation ->ValueErrorwhile building the interface. A task with an un-annotated parameter does not raise, so still require type hints yourself.
- Run a task's logic locally on plain files.
task_fn(...)goes through Flyte's local executor and wantslatch:///remote paths, so call the undecorated function instead:my_task.task_function(fastq=LatchFile("local.fastq")).LatchFile(p).local_pathis the local path. This exercises the real processing with no account. - Inspect the no-code UI offline.
wf.python_interface.inputs/.outputsare the parameters and outputs Latch renders as the auto-generated form, and the docstring__metadata__blocks are its labels — reviewable without registering. - Hand over registration. Give the
latch init/latch registercommands and note they need Docker running andlatch login(token under~/.latch/), and that runs bill the workspace. Without a login, stop at the validated workflow; never claim it was registered or run.