> ## Documentation Index
> Fetch the complete documentation index at: https://wiki.latch.bio/llms.txt
> Use this file to discover all available pages before exploring further.

# Launch Plans

> Learn how to define test data for workflows using LaunchPlan

## Overview

The `LaunchPlan` class allows you to create named groups of default parameters for your workflows. This enables users to quickly launch workflows with predefined parameter sets, making it easier to get started with common use cases.

## Constructor

```python theme={null}
LaunchPlan(
    workflow: PythonFunctionWorkflow,
    name: str,
    default_params: dict[str, Any],
    *,
    description: str | None = None,
)
```

### Parameters

* `workflow` (PythonFunctionWorkflow): The workflow function to which the default values apply. This is the function decorated with `@workflow` (See [example](https://github.com/latchbio-nfcore/methylseq/blob/96d58c8532a5c2ae6204e21209f71148bc78dc1e/wf/__init__.py#L20))
* `name` (str): A semantic identifier for the parameter values (e.g., 'Small Data', 'Production Run')
* `default_params` (dict\[str, Any]): A mapping of parameter names to their default values.
* `description` (str, optional): A description of what this launch plan represents.

## Usage

```python expandable theme={null}
LaunchPlan(
    nf_nf_core_methylseq,
    "Test Data",
    {
        "input": [
            Sample(
                sample="SRR389222_sub1",
                fastq_1=LatchFile(
                    "s3://latch-public/nf-core/methylseq/test_data/SRR389222_sub1.fastq.gz"
                ),
                fastq_2=None,
            ),
            Sample(
                sample="SRR389222_sub2",
                fastq_1=LatchFile(
                    "s3://latch-public/nf-core/methylseq/test_data/SRR389222_sub2.fastq.gz"
                ),
                fastq_2=None,
            ),
            Sample(
                sample="SRR389222_sub3",
                fastq_1=LatchFile(
                    "s3://latch-public/nf-core/methylseq/test_data/SRR389222_sub3.fastq.gz"
                ),
                fastq_2=None,
            ),
            Sample(
                sample="Ecoli_10K_methylated",
                fastq_1=LatchFile(
                    "s3://latch-public/nf-core/methylseq/test_data/Ecoli_10K_methylated_R1.fastq.gz"
                ),
                fastq_2=LatchFile(
                    "s3://latch-public/nf-core/methylseq/test_data/Ecoli_10K_methylated_R2.fastq.gz"
                ),
            ),
        ],
        "run_name": "Test_Run",
        "genome_source": "custom",
        "fasta": LatchFile("s3://latch-public/nf-core/methylseq/test_data/genome.fa"),
        "fasta_index": LatchFile(
            "s3://latch-public/nf-core/methylseq/test_data/genome.fa.fai"
        ),
    },
)

# Add more launch plans here...
```

<Card title="Example" icon="github" horizontal href="https://github.com/latchbio-nfcore/methylseq/blob/96d58c8532a5c2ae6204e21209f71148bc78dc1e/wf/__init__.py#L250">
  See a full example of how `LaunchPlan` is used in the `nf-core/methylseq` workflow.
</Card>

## How It Works

1. When you register your workflow, the launch plans are automatically created
2. The default parameters appear under the "Test Data" dropdown button in the Latch Console.
3. Users can select a launch plan to pre-populate the workflow form
4. Users can still modify any of the pre-filled parameters before execution

## Summary

The `LaunchPlan` class provides a powerful way to create predefined parameter sets for your workflows, improving the user experience by:

* Reducing setup time with pre-configured parameters
* Providing guidance on appropriate parameter values
* Supporting multiple use cases with different launch plans
* Maintaining flexibility for users to customize as needed

By creating well-named and well-described launch plans, you can make your workflows more accessible to users with different levels of expertise and different use case requirements.
