skills/latchbio-integration/references/verified-workflows.md
Latch exposes ready-to-run workflows in two distinct ways:
latch.verified Python package exports a small set of typed reference
launch plans that can be composed into a custom SDK workflow.Do not assume every Console workflow has a Python import.
latch.verified ExportsIn latch==2.76.8, latch.verified exports:
from latch.verified import (
deseq2_wf,
gene_ontology_pathway_analysis,
mafft,
rnaseq,
trim_galore,
)
The package does not currently export:
alphafoldcolabfoldbulk_rnaseqpathway_enrichmentscveloemptydropscrispresso2phylogeneticslist_workflowsThose names appeared in older generated examples but are not public exports in the current SDK.
Reference wrappers expose typed interfaces and internally pin a registered workflow name and version. From the skill root, inspect exports and parameter types:
uv run --no-project --python 3.12 --with "latch==2.76.8" \
python scripts/inspect_latch_sdk.py
Or from the repository root:
uv run --no-project --python 3.12 --with "latch==2.76.8" \
python skills/latchbio-integration/scripts/inspect_latch_sdk.py
Do not add a made-up workflow_version= argument. The wrapper's
@reference_launch_plan declaration controls its version.
Read the installed wrapper module when exact default values are needed.
from latch import workflow
from latch.types import LatchFile, LatchOutputDir
from latch.verified import mafft
from latch.verified.mafft import AlignmentMode
@workflow
def multiple_sequence_alignment(
unaligned_sequences: LatchFile,
output_directory: LatchOutputDir,
) -> LatchFile:
return mafft(
output_directory=output_directory,
unaligned_seqs=unaligned_sequences,
alignment_mode=AlignmentMode.auto,
gap_penalty=1.53,
offset=0.0,
maxiterate=0,
output_file="aligned_mafft.fa",
)
from latch import workflow
from latch.types import LatchDir, LatchFile, LatchOutputDir
from latch.verified import gene_ontology_pathway_analysis
@workflow
def pathway_report(
contrast_csv: LatchFile,
report_name: str,
output_directory: LatchOutputDir,
) -> LatchDir:
return gene_ontology_pathway_analysis(
contrast_csv=contrast_csv,
report_name=report_name,
number_of_pathways=20,
output_location=output_directory,
)
Import deseq2_wf. Its current interface supports single or multiple raw count
tables, manual conditions or a conditions table, a structured design formula,
plot count, and an optional output directory. Inspect the signature rather than
copying simplified examples that use nonexistent count_matrix or
sample_metadata parameters.
Import rnaseq plus its current types from latch.verified.rnaseq, including:
SampleSingleEndReadsPairedEndReadsStrandednessLatchGenomeAlignmentToolsThe wrapper has several fork-selector parameters and is not interchangeable
with a hypothetical bulk_rnaseq(fastq_r1=..., fastq_r2=...) call.
Import trim_galore plus BaseQualityEncoding and AdapterSequence from
latch.verified.trim_galore. Its current signature is detailed and includes
paired inputs, adapter options, clipping, quality, and output settings.
When Latch MCP is configured:
list_workspaces and choose the intended workspace.list_workflows to discover public and workspace workflows.get_workflow_schema for the selected workflow.launch_workflow.get_execution and retrieve logs only when needed.This path is preferable to guessing Python imports for Console-only workflows.
See references/latch-mcp.md.
Use the Workflows page:
https://console.latch.bio/workflows
The workflow's current parameter page is authoritative for that published version. Record:
Do not infer scientific suitability from the "Verified" label alone. Confirm reference genome, assay assumptions, tool versions, and validation needs.
For a workflow in the active workspace, workflow_reference wraps Flyte's
reference launch plan:
from latch import workflow, workflow_reference
from latch.types import LatchFile
@workflow_reference(
name="wf.entrypoint.existing_workflow",
version="1.2.3-abcd12",
)
def existing(input_file: LatchFile) -> LatchFile:
...
@workflow
def composed_workflow(input_file: LatchFile) -> LatchFile:
return existing(input_file=input_file)
The decorated reference still needs an exact typed function signature. Prefer generated or source-backed signatures; do not invent one from a display form.
workflow_reference resolves current_workspace() when the decorator is
evaluated. Importing this module therefore requires valid Latch authentication
and network access and will fail in a fully offline test environment. Verify the
active workspace before import/registration and isolate this coupling in a
small module.