Skip to content

K-Dense-AI/scientific-agent-skills / skills/latchbio-integration

latchbio-integration

Verified

Builds, registers, debugs, and operates bioinformatics workflows on Latch using the Python SDK, CLI, Latch Data and Registry, Nextflow, Snakemake, programmatic execution, and Latch MCP. Use when authoring or deploying Latch workflows, configuring resources or interfaces, moving data, integrating Registry, or launching and monitoring runs.

references/verified-workflows.md

View on GitHub
# 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.

## Current `latch.verified` Exports

In `latch==2.77.1`, `latch.verified` exports:

```python
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.

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

```bash
uv run --no-project --python 3.12 --with "latch==2.77.1" \
  python scripts/inspect_latch_sdk.py
```

Or from the repository root:

```bash
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.

## Compose MAFFT

```python
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",
    )
```

## Compose Pathway Analysis

```python
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,
    )
```

## Other Typed Wrappers

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

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

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

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

## Discover Through the Console

Use the Workflows page:

```text
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.

## Referencing a Workspace Workflow

For a workflow in the active workspace, `workflow_reference` wraps Flyte's
reference launch plan:

```python
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
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall