verified-workflows.md
226 lines · skills/latchbio-integration/references/verified-workflows.md at 5f2bc03
Most marks come from matching words in the file, so treat them as pointers.
Ready-to-Use and Referenced Workflows
Latch exposes ready-to-run workflows in two distinct ways:
- The Latch Console and Latch MCP expose a broad catalog, including workflows such as AlphaFold, CRISPResso2, Bulk RNA-seq, and others.
- The
latch.verifiedPython 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.
Raw lines 1 to 11Current latch.verified Exports
In latch==2.77.1, 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_workflows
Those names appeared in older generated examples but are not public exports in the current SDK.
Raw lines 12 to 40Inspect Before Composing
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.77.1" \
python scripts/inspect_latch_sdk.pyOr from the repository root:
uv run --no-project --python 3.12 --with "latch==2.77.1" \
python skills/latchbio-integration/scripts/inspect_latch_sdk.pyDo 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.
Compose MAFFT
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",
)Raw lines 63 to 87Compose Pathway Analysis
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,
)Raw lines 88 to 109Other Typed Wrappers
Raw lines 110 to 111DESeq2
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.
RNA-seq
Import rnaseq plus its current types from latch.verified.rnaseq, including:
SampleSingleEndReadsPairedEndReadsStrandednessLatchGenomeAlignmentTools
The wrapper has several fork-selector parameters and is not interchangeable with a hypothetical bulk_rnaseq(fastq_r1=..., fastq_r2=...) call.
Trim Galore
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.
Discover Through Latch MCP
When Latch MCP is configured:
- Call
list_workspacesand choose the intended workspace. - Call
list_workflowsto discover public and workspace workflows. - Call
get_workflow_schemafor the selected workflow. - Validate every parameter against that returned schema.
- Show the workflow, workspace, resource/cost implications, and parameter summary to the user.
- Obtain confirmation.
- Call
launch_workflow. - Monitor with
get_executionand retrieve logs only when needed.
This path is preferable to guessing Python imports for Console-only workflows. See references/latch-mcp.md.
Discover Through the Console
Use the Workflows page:
https://console.latch.bio/workflowsThe workflow's current parameter page is authoritative for that published version. Record:
- Workflow ID and version
- Input and output schema
- Default resources
- Required reference data
- Scientific method and citations
- Expected cost and runtime
Do not infer scientific suitability from the "Verified" label alone. Confirm reference genome, assay assumptions, tool versions, and validation needs.
Raw lines 157 to 177Referencing a Workspace Workflow
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.
Version and Reproducibility Rules
- Pin the Latch SDK used to register the caller workflow.
- Record the referenced workflow ID/name and version.
- Re-run schema inspection after an SDK upgrade.
- Treat a changed wrapper signature or internal reference version as a behavior change.
- Use a small launch plan for integration testing.
- Preserve tool and database citations in downstream reports.
Official Sources
- Workflow catalog overview: https://wiki.latch.bio/workflows/overview
- Ready-to-use workflow guides: https://wiki.latch.bio/llms.txt
- Verified exports in the 2.77.1 release commit: https://github.com/latchbio/latch/tree/b3768e65c6d496868f6e530f11977d857ad85dc7/src/latch/verified
- Latch MCP: https://wiki.latch.bio/agent/latch-mcp
- Latch Verified repositories: https://github.com/latch-verified