Authors bioinformatics pipelines with the Latch SDK — @workflow/@task decorators, LatchFile/LatchDir I/O, CPU/GPU task sizing, the Latch Registry, and Nextflow/Snakemake wrapping — and validates them offline without an account.
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.
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).@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).@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.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.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.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.The Latch platform provides four main areas of functionality:
@small_gpu_task, g4dn.2xlarge), A10G (@large_gpu_task, g5.16xlarge), V100 (@v100_x1/x4/x8_task), L40S (@g6e_*_task)latch.verified Python module: rnaseq, deseq2_wf, mafft, trim_galore, gene_ontology_pathway_analysislatch.verified before relying on a Python import (see references/verified-workflows.md)# Install Latch SDK (uv-first; pip install latch also works)
uv pip install latch
# Login to Latch — only needed for register/run, not for authoring
latch login
# Initialize a new workflow (scaffolds wf/, Dockerfile, version)
latch init my-workflow
# Register workflow to platform (builds container, generates the UI)
latch register my-workflow
Prerequisites for authoring/validating (keyless): Python 3.9+ and the Latch SDK.
Prerequisites for register/run (optional): Docker installed and running, and a Latch
login (token under ~/.latch/). Compute runs bill the workspace.
from latch import workflow, small_task
from latch.types import LatchFile
@small_task
def process_file(input_file: LatchFile) -> LatchFile:
"""Process a single file"""
# Processing logic
return output_file
@workflow
def my_workflow(input_file: LatchFile) -> LatchFile:
"""
My bioinformatics workflow
Args:
input_file: Input data file
"""
return process_file(input_file=input_file)
This skill should be used when encountering any of the following scenarios:
Workflow Development:
@workflow, @task decoratorsData Management:
latch:/// pathsResource Configuration:
Verified Workflows:
latch.verified module| Scenario | Use Instead |
|---|---|
| DNAnexus apps/applets, dxapp.json, dxpy or the dx CLI | alterlab-dnanexus |
| Running nf-core/sarek variant calling directly (outside Latch) | alterlab-nf-core-sarek |
| Generic serverless Python/GPU jobs with no Latch workflow | alterlab-modal |
| SLURM/HPC or cloud batch job submission and polling | alterlab-remote-compute |
| Dataset registries, ontology validation, and lineage in LaminDB | alterlab-lamindb |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-dnanexus) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Load the reference that matches the task:
latch init/latch register, @workflow/@task decorators, type annotations and docstrings (these populate the UI), launch plans, conditional sections, CLI/programmatic execution, parallel map_task, registration troubleshooting.LatchFile/LatchDir and latch:/// paths, glob patterns, the Registry API (Project, Table, Record), column types, the table.update() transaction, and workflow-Registry integration.@custom_task(cpu, memory, storage_gib, timeout), the GPU task decorators (small_gpu_task/large_gpu_task, v100_x{1,4,8}_task, g6e_*_task), and resource/cost right-sizing.latch.verified and how to combine them with custom tasks.from latch import workflow, small_task, large_task
from latch.types import LatchFile, LatchDir
@small_task
def quality_control(fastq: LatchFile) -> LatchFile:
"""Run FastQC"""
return qc_output
@large_task
def alignment(fastq: LatchFile, genome: str) -> LatchFile:
"""STAR alignment"""
return bam_output
@small_task
def quantification(bam: LatchFile) -> LatchFile:
"""featureCounts"""
return counts
@workflow
def rnaseq_pipeline(
input_fastq: LatchFile,
genome: str,
output_dir: LatchDir
) -> LatchFile:
"""RNA-seq analysis pipeline"""
qc = quality_control(fastq=input_fastq)
aligned = alignment(fastq=qc, genome=genome)
return quantification(bam=aligned)
from latch import workflow, small_task, large_gpu_task
from latch.types import LatchFile
@small_task
def preprocess(input_file: LatchFile) -> LatchFile:
"""Prepare data"""
return processed
@large_gpu_task
def gpu_computation(data: LatchFile) -> LatchFile:
"""GPU-accelerated analysis"""
return results
@workflow
def gpu_pipeline(input_file: LatchFile) -> LatchFile:
"""Pipeline with GPU tasks"""
preprocessed = preprocess(input_file=input_file)
return gpu_computation(data=preprocessed)
from latch import workflow, small_task
from latch.registry.table import Table
@small_task
def process_and_track(sample_name: str, table_id: str) -> str:
"""Process a sample tracked in a Registry table and write status/result back."""
table = Table(table_id) # construct by id; no Table.get classmethod
# Find the record by name. list_records() yields pages of {record_id: Record}.
sample = None
for page in table.list_records():
for record in page.values():
if record.get_name() == sample_name:
sample = record
break
if sample is not None:
break
if sample is None:
raise ValueError(f"No record named {sample_name}")
# Read column values
values = sample.get_values()
input_file = values["fastq_file"] # a LatchFile for a 'file'-typed column
# ... processing logic produces an output LatchFile ...
# Write status/result back via the table.update() transaction (upsert by name)
with table.update() as updater:
updater.upsert_record(sample_name, status="completed", result=input_file)
return "Success"
@workflow
def registry_workflow(sample_name: str, table_id: str) -> str:
"""Workflow integrated with the Latch Registry."""
return process_and_track(sample_name=sample_name, table_id=table_id)
Registration Failures:
latch login--verbose flag for detailed logsResource Problems:
Data Access:
latch:/// path formatType Errors:
Part of the AlterLab Academic Skills suite.
evals/evals.json (opens in a new tab)evals/fixtures/counts.tsv (opens in a new tab)evals/fixtures/wf_gpu.py (opens in a new tab)references/data-management.md (opens in a new tab)references/resource-configuration.md (opens in a new tab)references/verified-workflows.md (opens in a new tab)references/workflow-creation.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite.2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
Other plugins' skills for the same job