$npx -y skills add K-Dense-AI/scientific-agent-skills --skill latchbio-integrationLatch platform for bioinformatics workflows. Build pipelines with Latch SDK, @workflow/@task decorators, deploy serverless workflows, LatchFile/LatchDir, Nextflow/Snakemake integration.
| 1 | # LatchBio Integration |
| 2 | |
| 3 | ## Overview |
| 4 | |
| 5 | Latch is a Python framework for building and deploying bioinformatics workflows as serverless pipelines. Built on Flyte, create workflows with @workflow/@task decorators, manage cloud data with LatchFile/LatchDir, configure resources, and integrate Nextflow/Snakemake pipelines. |
| 6 | |
| 7 | ## Core Capabilities |
| 8 | |
| 9 | The Latch platform provides four main areas of functionality: |
| 10 | |
| 11 | ### 1. Workflow Creation and Deployment |
| 12 | - Define serverless workflows using Python decorators |
| 13 | - Support for native Python, Nextflow, and Snakemake pipelines |
| 14 | - Automatic containerization with Docker |
| 15 | - Auto-generated no-code user interfaces |
| 16 | - Version control and reproducibility |
| 17 | |
| 18 | ### 2. Data Management |
| 19 | - Cloud storage abstractions (LatchFile, LatchDir) |
| 20 | - Structured data organization with Registry (Projects → Tables → Records) |
| 21 | - Type-safe data operations with links and enums |
| 22 | - Automatic file transfer between local and cloud |
| 23 | - Glob pattern matching for file selection |
| 24 | |
| 25 | ### 3. Resource Configuration |
| 26 | - Pre-configured task decorators (@small_task, @large_task, @small_gpu_task, @large_gpu_task) |
| 27 | - Custom resource specifications (CPU, memory, GPU, storage) |
| 28 | - GPU support (K80, V100, A100) |
| 29 | - Timeout and storage configuration |
| 30 | - Cost optimization strategies |
| 31 | |
| 32 | ### 4. Verified Workflows |
| 33 | - Production-ready pre-built pipelines |
| 34 | - Bulk RNA-seq, DESeq2, pathway analysis |
| 35 | - AlphaFold and ColabFold for protein structure prediction |
| 36 | - Single-cell tools (ArchR, scVelo, emptyDropsR) |
| 37 | - CRISPR analysis, phylogenetics, and more |
| 38 | |
| 39 | ## Quick Start |
| 40 | |
| 41 | ### Installation and Setup |
| 42 | |
| 43 | ```bash |
| 44 | # Install Latch SDK |
| 45 | uv pip install latch |
| 46 | |
| 47 | # Login to Latch |
| 48 | latch login |
| 49 | |
| 50 | # Initialize a new workflow |
| 51 | latch init my-workflow |
| 52 | |
| 53 | # Register workflow to platform |
| 54 | latch register my-workflow |
| 55 | ``` |
| 56 | |
| 57 | **Prerequisites:** |
| 58 | - Docker installed and running |
| 59 | - Latch account credentials |
| 60 | - Python 3.8+ |
| 61 | |
| 62 | ### Basic Workflow Example |
| 63 | |
| 64 | ```python |
| 65 | from latch import workflow, small_task |
| 66 | from latch.types import LatchFile |
| 67 | |
| 68 | @small_task |
| 69 | def process_file(input_file: LatchFile) -> LatchFile: |
| 70 | """Process a single file""" |
| 71 | # Processing logic |
| 72 | return output_file |
| 73 | |
| 74 | @workflow |
| 75 | def my_workflow(input_file: LatchFile) -> LatchFile: |
| 76 | """ |
| 77 | My bioinformatics workflow |
| 78 | |
| 79 | Args: |
| 80 | input_file: Input data file |
| 81 | """ |
| 82 | return process_file(input_file=input_file) |
| 83 | ``` |
| 84 | |
| 85 | ## When to Use This Skill |
| 86 | |
| 87 | This skill should be used when encountering any of the following scenarios: |
| 88 | |
| 89 | **Workflow Development:** |
| 90 | - "Create a Latch workflow for RNA-seq analysis" |
| 91 | - "Deploy my pipeline to Latch" |
| 92 | - "Convert my Nextflow pipeline to Latch" |
| 93 | - "Add GPU support to my workflow" |
| 94 | - Working with `@workflow`, `@task` decorators |
| 95 | |
| 96 | **Data Management:** |
| 97 | - "Organize my sequencing data in Latch Registry" |
| 98 | - "How do I use LatchFile and LatchDir?" |
| 99 | - "Set up sample tracking in Latch" |
| 100 | - Working with `latch:///` paths |
| 101 | |
| 102 | **Resource Configuration:** |
| 103 | - "Configure GPU for AlphaFold on Latch" |
| 104 | - "My task is running out of memory" |
| 105 | - "How do I optimize workflow costs?" |
| 106 | - Working with task decorators |
| 107 | |
| 108 | **Verified Workflows:** |
| 109 | - "Run AlphaFold on Latch" |
| 110 | - "Use DESeq2 for differential expression" |
| 111 | - "Available pre-built workflows" |
| 112 | - Using `latch.verified` module |
| 113 | |
| 114 | ## Detailed Documentation |
| 115 | |
| 116 | This skill includes comprehensive reference documentation organized by capability: |
| 117 | |
| 118 | ### references/workflow-creation.md |
| 119 | **Read this for:** |
| 120 | - Creating and registering workflows |
| 121 | - Task definition and decorators |
| 122 | - Supporting Python, Nextflow, Snakemake |
| 123 | - Launch plans and conditional sections |
| 124 | - Workflow execution (CLI and programmatic) |
| 125 | - Multi-step and parallel pipelines |
| 126 | - Troubleshooting registration issues |
| 127 | |
| 128 | **Key topics:** |
| 129 | - `latch init` and `latch register` commands |
| 130 | - `@workflow` and `@task` decorators |
| 131 | - LatchFile and LatchDir basics |
| 132 | - Type annotations and docstrings |
| 133 | - Launch plans with preset parameters |
| 134 | - Conditional UI sections |
| 135 | |
| 136 | ### references/data-management.md |
| 137 | **Read this for:** |
| 138 | - Cloud storage with LatchFile and LatchDir |
| 139 | - Registry system (Projects, Tables, Records) |
| 140 | - Linked records and relationships |
| 141 | - Enum and typed columns |
| 142 | - Bulk operations and transactions |
| 143 | - Integration with workflows |
| 144 | - Account and workspace management |
| 145 | |
| 146 | **Key topics:** |
| 147 | - `latch:///` path format |
| 148 | - File transfer and glob patterns |
| 149 | - Creating and querying Registry tables |
| 150 | - Column types (string, number, file, link, enum) |
| 151 | - Record CRUD operations |
| 152 | - Workflow-Registry integration |
| 153 | |
| 154 | ### references/resource-configuration.md |
| 155 | **Read this for:** |
| 156 | - Task resource decorators |
| 157 | - Custom CPU, memory, GPU configuration |
| 158 | - GPU types (K80, V100, A100) |
| 159 | - Timeout and storage settings |
| 160 | - Resource optimization strategies |
| 161 | - Cost-effective workflow design |
| 162 | - Monitoring and debugging |
| 163 | |
| 164 | **Key topics:** |
| 165 | - `@small_task`, `@large_t |