Skill Tracer
Skills › Scientific Agent Skills › latchbio-integration › verified-workflows.md

verified-workflows.md

226 lines · skills/latchbio-integration/references/verified-workflows.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Ready-to-Use and Referenced Workflows
2
3Latch exposes ready-to-run workflows in two distinct ways:
4
51. The Latch Console and Latch MCP expose a broad catalog, including workflows
6 such as AlphaFold, CRISPResso2, Bulk RNA-seq, and others.
72. The `latch.verified` Python package exports a small set of typed reference
8 launch plans that can be composed into a custom SDK workflow.
9
10Do not assume every Console workflow has a Python import.

Ready-to-Use and Referenced Workflows

Latch exposes ready-to-run workflows in two distinct ways:

  1. The Latch Console and Latch MCP expose a broad catalog, including workflows such as AlphaFold, CRISPResso2, Bulk RNA-seq, and others.
  2. The 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.

Raw lines 1 to 11
Uses an outside tool MCP :5
12## Current `latch.verified` Exports
14In `latch==2.77.1`, `latch.verified` exports:
16```python
17from latch.verified import (
18 deseq2_wf,
19 gene_ontology_pathway_analysis,
20 mafft,
21 rnaseq,
22 trim_galore,
24```
26The package does **not** currently export:
28- `alphafold`
29- `colabfold`
30- `bulk_rnaseq`
31- `pathway_enrichment`
33- `emptydrops`
34- `crispresso2`
35- `phylogenetics`
36- `list_workflows`
38Those names appeared in older generated examples but are not public exports in
39the current SDK.

Current 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:

  • alphafold
  • colabfold
  • bulk_rnaseq
  • pathway_enrichment
  • scvelo
  • emptydrops
  • crispresso2
  • phylogenetics
  • list_workflows

Those names appeared in older generated examples but are not public exports in the current SDK.

Raw lines 12 to 40
Names a skill scvelo :32
41## Inspect Before Composing
43Reference wrappers expose typed interfaces and internally pin a registered
44workflow name and version. From the skill root, inspect exports and parameter
45types:
47```bash
48uv run --no-project --python 3.12 --with "latch==2.77.1" \
49 python scripts/inspect_latch_sdk.py
50```
52Or from the repository root:
54```bash
55uv run --no-project --python 3.12 --with "latch==2.77.1" \
56 python skills/latchbio-integration/scripts/inspect_latch_sdk.py
57```
59Do not add a made-up `workflow_version=` argument. The wrapper's
60`@reference_launch_plan` declaration controls its version.
61Read the installed wrapper module when exact default values are needed.

Inspect 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.py

Or from the repository root:

uv run --no-project --python 3.12 --with "latch==2.77.1" \
  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.

Raw lines 41 to 62
Runs code python scripts/inspect_latch_sdk.py :49
Runs code python skills/latchbio-integration/scripts/inspect_latch_sdk.py :56
63## Compose MAFFT
65```python
66from latch import workflow
67from latch.types import LatchFile, LatchOutputDir
68from latch.verified import mafft
69from latch.verified.mafft import AlignmentMode
72@workflow
73def multiple_sequence_alignment(
74 unaligned_sequences: LatchFile,
75 output_directory: LatchOutputDir,
76) -> LatchFile:
77 return mafft(
78 output_directory=output_directory,
79 unaligned_seqs=unaligned_sequences,
80 alignment_mode=AlignmentMode.auto,
81 gap_penalty=1.53,
82 offset=0.0,
83 maxiterate=0,
84 output_file="aligned_mafft.fa",
85 )
86```

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 87
88## Compose Pathway Analysis
90```python
91from latch import workflow
92from latch.types import LatchDir, LatchFile, LatchOutputDir
93from latch.verified import gene_ontology_pathway_analysis
96@workflow
97def pathway_report(
98 contrast_csv: LatchFile,
99 report_name: str,
100 output_directory: LatchOutputDir,
101) -> LatchDir:
102 return gene_ontology_pathway_analysis(
103 contrast_csv=contrast_csv,
104 report_name=report_name,
105 number_of_pathways=20,
106 output_location=output_directory,
107 )
108```

Compose 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 109
110## Other Typed Wrappers

Other Typed Wrappers

Raw lines 110 to 111
112### DESeq2
114Import `deseq2_wf`. Its current interface supports single or multiple raw count
115tables, manual conditions or a conditions table, a structured design formula,
116plot count, and an optional output directory. Inspect the signature rather than
117copying simplified examples that use nonexistent `count_matrix` or
118`sample_metadata` parameters.

DESeq2

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.

Raw lines 112 to 119
120### RNA-seq
122Import `rnaseq` plus its current types from `latch.verified.rnaseq`, including:
124- `Sample`
125- `SingleEndReads`
126- `PairedEndReads`
127- `Strandedness`
128- `LatchGenome`
129- `AlignmentTools`
131The wrapper has several fork-selector parameters and is not interchangeable
132with a hypothetical `bulk_rnaseq(fastq_r1=..., fastq_r2=...)` call.

RNA-seq

Import rnaseq plus its current types from latch.verified.rnaseq, including:

  • Sample
  • SingleEndReads
  • PairedEndReads
  • Strandedness
  • LatchGenome
  • AlignmentTools

The wrapper has several fork-selector parameters and is not interchangeable with a hypothetical bulk_rnaseq(fastq_r1=..., fastq_r2=...) call.

Raw lines 120 to 133
134### Trim Galore
136Import `trim_galore` plus `BaseQualityEncoding` and `AdapterSequence` from
137`latch.verified.trim_galore`. Its current signature is detailed and includes
138paired inputs, adapter options, clipping, quality, and output settings.

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.

Raw lines 134 to 139
140## Discover Through Latch MCP
142When Latch MCP is configured:
1441. Call `list_workspaces` and choose the intended workspace.
1452. Call `list_workflows` to discover public and workspace workflows.
1463. Call `get_workflow_schema` for the selected workflow.
1474. Validate every parameter against that returned schema.
1485. Show the workflow, workspace, resource/cost implications, and parameter
149 summary to the user.
1506. Obtain confirmation.
1517. Call `launch_workflow`.
1528. Monitor with `get_execution` and retrieve logs only when needed.
154This path is preferable to guessing Python imports for Console-only workflows.
155See `references/latch-mcp.md`.

Discover Through Latch MCP

When Latch MCP is configured:

  1. Call list_workspaces and choose the intended workspace.
  2. Call list_workflows to discover public and workspace workflows.
  3. Call get_workflow_schema for the selected workflow.
  4. Validate every parameter against that returned schema.
  5. Show the workflow, workspace, resource/cost implications, and parameter summary to the user.
  6. Obtain confirmation.
  7. Call launch_workflow.
  8. Monitor with 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.

Raw lines 140 to 156
Uses an outside tool MCP :140
157## Discover Through the Console
159Use the Workflows page:
161```text
162https://console.latch.bio/workflows
163```
165The workflow's current parameter page is authoritative for that published
166version. Record:
168- Workflow ID and version
169- Input and output schema
170- Default resources
171- Required reference data
172- Scientific method and citations
173- Expected cost and runtime
175Do not infer scientific suitability from the "Verified" label alone. Confirm
176reference genome, assay assumptions, tool versions, and validation needs.

Discover Through the Console

Use the Workflows page:

https://console.latch.bio/workflows

The 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 177
178## Referencing a Workspace Workflow
180For a workflow in the active workspace, `workflow_reference` wraps Flyte's
181reference launch plan:
183```python
184from latch import workflow, workflow_reference
185from latch.types import LatchFile
188@workflow_reference(
189 name="wf.entrypoint.existing_workflow",
190 version="1.2.3-abcd12",
192def existing(input_file: LatchFile) -> LatchFile:
193 ...
196@workflow
197def composed_workflow(input_file: LatchFile) -> LatchFile:
198 return existing(input_file=input_file)
199```
201The decorated reference still needs an exact typed function signature. Prefer
202generated or source-backed signatures; do not invent one from a display form.
204`workflow_reference` resolves `current_workspace()` when the decorator is
205evaluated. Importing this module therefore requires valid Latch authentication
206and network access and will fail in a fully offline test environment. Verify the
207active workspace before import/registration and isolate this coupling in a
208small module.

Referencing 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.

Raw lines 178 to 209
210## Version and Reproducibility Rules
212- Pin the Latch SDK used to register the caller workflow.
213- Record the referenced workflow ID/name and version.
214- Re-run schema inspection after an SDK upgrade.
215- Treat a changed wrapper signature or internal reference version as a behavior
216 change.
217- Use a small launch plan for integration testing.
218- Preserve tool and database citations in downstream reports.

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.
Raw lines 210 to 219
220## Official Sources
222- Workflow catalog overview: https://wiki.latch.bio/workflows/overview
223- Ready-to-use workflow guides: https://wiki.latch.bio/llms.txt
224- Verified exports in the 2.77.1 release commit: https://github.com/latchbio/latch/tree/b3768e65c6d496868f6e530f11977d857ad85dc7/src/latch/verified
225- Latch MCP: https://wiki.latch.bio/agent/latch-mcp
226- Latch Verified repositories: https://github.com/latch-verified

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
Raw lines 220 to 226
Uses an outside tool MCP :225