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)

  1. Write the workflow against the real SDK (uv run --with latch python ...) and confirm decorator and API names with inspect rather than memory. Verified in latch 2.77.2 (2026-10-22): resource decorators are small_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).
  2. 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 no gpu/gpu_type; a GPU comes from a GPU decorator).
    • a @workflow whose body calls a task but whose signature has no return annotation -> ValueError while building the interface. A task with an un-annotated parameter does not raise, so still require type hints yourself.
  3. Run a task's logic locally on plain files. task_fn(...) goes through Flyte's local executor and wants latch:/// remote paths, so call the undecorated function instead: my_task.task_function(fastq=LatchFile("local.fastq")). LatchFile(p).local_path is the local path. This exercises the real processing with no account.
  4. Inspect the no-code UI offline. wf.python_interface.inputs / .outputs are the parameters and outputs Latch renders as the auto-generated form, and the docstring __metadata__ blocks are its labels — reviewable without registering.
  5. Hand over registration. Give the latch init / latch register commands and note they need Docker running and latch 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.

Core Capabilities

Installs
67
GitHub Stars
86
First Seen
Apr 12, 2026