/bio-genome-assembly-long-read-assembly
<!--
$ npx -y skills add FreedomIntelligence/OpenClaw-Medical-Skills --skill bio-genome-assembly-long-read-assembly --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/bio-genome-assembly-long-read-assembly
Context preview
The summary Claude sees to decide when to auto-load this skill.
<!--
SKILL.md
bio-genome-assembly-long-read-assembly.SKILL.md<!--
COPYRIGHT NOTICE
This file is part of the "Universal Biomedical Skills" project.
Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
All Rights Reserved.
#
This code is proprietary and confidential.
Unauthorized copying of this file, via any medium is strictly prohibited.
#
Provenance: Authenticated by MD BABU MIA
-->
--- name: bio-genome-assembly-long-read-assembly description: De novo genome assembly from Oxford Nanopore or PacBio long reads using Flye and Canu. Produces highly contiguous assemblies suitable for complete bacterial genomes and resolving complex regions. Use when assembling genomes from ONT or PacBio reads. tool_type: cli primary_tool: Flye measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
---
Long-Read Assembly
Assemble genomes from Oxford Nanopore (ONT) or PacBio long reads for highly contiguous assemblies.
Tool Comparison
| Tool | Speed | Memory | Best For | |------|-------|--------|----------| | Flye | Fast | Moderate | General purpose, bacteria, ONT | | Canu | Slow | High | High accuracy, complex genomes | | Wtdbg2 | Very fast | Low | Draft assemblies |
> **Note:** For PacBio HiFi data, see the dedicated **hifi-assembly** skill which covers hifiasm.
Flye
Installation
conda install -c bioconda flye
Basic Usage
# Oxford Nanopore
flye --nano-raw reads.fastq.gz --out-dir flye_output --threads 16
# PacBio CLR
flye --pacbio-raw reads.fastq.gz --out-dir flye_output --threads 16
# PacBio HiFi
flye --pacbio-hifi reads.fastq.gz --out-dir flye_output --threads 16
Read Type Options
| Option | Read Type | |--------|-----------| | `--nano-raw` | ONT regular reads | | `--nano-corr` | ONT corrected reads | | `--nano-hq` | ONT Q20+ reads (Guppy 5+) | | `--pacbio-raw` | PacBio CLR | | `--pacbio-corr` | PacBio corrected | | `--pacbio-hifi` | PacBio HiFi/CCS |
Key Options
| Option | Description | |--------|-------------| | `--out-dir` | Output directory | | `--threads` | Number of threads | | `--genome-size` | Estimated genome size (e.g., 5m, 100m) | | `--iterations` | Polishing iterations (default: 1) | | `--meta` | Metagenome mode | | `--plasmids` | Recover plasmids | | `--keep-haplotypes` | Don't collapse haplotypes | | `--scaffold` | Enable scaffolding |
Genome Size Estimation
# Estimate if unknown
flye --nano-raw reads.fq.gz --out-dir output --genome-size 5m
# Size formats: 1000, 1k, 1m, 1g
Output Files
flye_output/
├── assembly.fasta # Final assembly
├── assembly_graph.gfa # Assembly graph
├── assembly_info.txt # Contig statistics
└── flye.log # Log file
Bacterial Assembly
flye \
--nano-raw bacteria.fastq.gz \
--out-dir bacteria_assembly \
--genome-size 5m \
--threads 16Metagenome Assembly
flye \
--nano-raw metagenome.fastq.gz \
--out-dir meta_assembly \
--meta \
--threads 32With Plasmid Recovery
flye \
--nano-raw isolate.fastq.gz \
--out-dir assembly \
--plasmids \
--threads 16Canu
Installation
conda install -c bioconda canu
Basic Usage
# ONT reads
canu -p assembly -d canu_output genomeSize=5m -nanopore reads.fastq.gz
# PacBio HiFi
canu -p assembly -d canu_output genomeSize=5m -pacbio-hifi reads.fastq.gz
Key Options
| Option | Description | |--------|-------------| | `-p` | Assembly prefix | | `-d` | Output directory | | `genomeSize=` | Estimated size (required) | | `maxThreads=` | Max threads | | `maxMemory=` | Max memory (e.g., 64g) | | `useGrid=false` | Disable grid execution | | `correctedErrorRate=` | Expected error rate |
Read Type Options
| Option | Read Type | |--------|-----------| | `-nanopore` | ONT reads | | `-nanopore-raw` | ONT raw (deprecated) | | `-pacbio` | PacBio CLR | | `-pacbio-hifi` | PacBio HiFi/CCS |
Fast Mode
canu -p asm -d output genomeSize=5m \
-nanopore reads.fq.gz \
useGrid=false \
maxThreads=16 \
maxMemory=32gHigh-Quality Mode (PacBio HiFi)
canu -p asm -d output genomeSize=5m \
-pacbio-hifi reads.fq.gz \
correctedErrorRate=0.01Output Files
canu_output/
├── assembly.contigs.fasta # Contigs
├── assembly.unassembled.fasta
├── assembly.report
└── assembly.seqStore/
Wtdbg2 (Fast Draft)
Installation
conda install -c bioconda wtdbg
Basic Usage
# Assemble
wtdbg2 -x ont -g 5m -t 16 -i reads.fq.gz -o draft
# Consensus
wtpoa-cns -t 16 -i draft.ctg.lay.gz -o draft.ctg.fa
Platform Presets
| Preset | Platform | |--------|----------| | `-x ont` | ONT R9 | | `-x ccs` | PacBio HiFi | | `-x rs` | PacBio CLR | | `-x sq` | ONT R10 |
Complete Workflows
ONT Bacterial Assembly
#!/bin/bash
set -euo pipefail
READS=$1
OUTDIR=$2
SIZE=${3:-5m}
echo "=== ONT Bacterial Assembly ==="
# Flye assembly
flye \
--nano-raw $READS \
--out-dir ${OUTDIR}/flye \
--genome-size $SIZE \
--threads 16
# Stats
echo "Assembly statistics:"
cat ${OUTDIR}/flye/assembly_info.txt
echo "Assembly: ${OUTDIR}/flye/assembly.fasta"Hybrid Assembly (Long + Short)
#!/bin/bash
set -euo pipefail
LONG=$1
SHORT_R1=$2
SHORT_R2=$3
OUTDIR=$4
# 1. Long-read assembly with Flye
flye --nano-raw $LONG --out-dir ${OUTDIR}/flye --genome-size 5m --threads 16
# 2. Polish with short reads (Pilon)
# See assembly-polishing skillQuality Expectations
| Metric | Bacterial | Eukaryotic | |--------|-----------|------------| | Contigs | 1-10 | 100-1000+ | | N50 | >1 Mb | Variable | | Complete chromosomes | Often | Rare |
Troubleshooting
Low Contiguity
- Check coverage (need >30x)
- Try increasing iterations in Flye
- Consider supplementing with short reads
Memory Issues
- Use Flye (more memory efficient)
- Reduce threads
- Filter reads b
Read more
<!--
COPYRIGHT NOTICE
This file is part of the "Universal Biomedical Skills" project.
Copyright (c) 2026 MD BABU MIA, PhD <md.babu.mia@mssm.edu>
All Rights Reserved.
#
This code is proprietary and confidential.
Unauthorized copying of this file, via any medium is strictly prohibited.
#
Provenance: Authenticated by MD BABU MIA
-->
--- name: bio-genome-assembly-long-read-assembly description: De novo genome assembly from Oxford Nanopore or PacBio long reads using Flye and Canu. Produces highly contiguous assemblies suitable for complete bacterial genomes and resolving complex regions. Use when assembling genomes from ONT or PacBio reads. tool_type: cli primary_tool: Flye measurable_outcome: Execute skill workflow successfully with valid output within 15 minutes. allowed-tools:
- read_file
- run_shell_command
---
Long-Read Assembly
Assemble genomes from Oxford Nanopore (ONT) or PacBio long reads for highly contiguous assemblies.
Tool Comparison
| Tool | Speed | Memory | Best For | |------|-------|--------|----------| | Flye | Fast | Moderate | General purpose, bacteria, ONT | | Canu | Slow | High | High accuracy, complex genomes | | Wtdbg2 | Very fast | Low | Draft assemblies |
> **Note:** For PacBio HiFi data, see the dedicated **hifi-assembly** skill which covers hifiasm.
Flye
Installation
conda install -c bioconda flye
Basic Usage
# Oxford Nanopore flye --nano-raw reads.fastq.gz --out-dir flye_output --threads 16 # PacBio CLR flye --pacbio-raw reads.fastq.gz --out-dir flye_output --threads 16 # PacBio HiFi flye --pacbio-hifi reads.fastq.gz --out-dir flye_output --threads 16
Read Type Options
| Option | Read Type | |--------|-----------| | `--nano-raw` | ONT regular reads | | `--nano-corr` | ONT corrected reads | | `--nano-hq` | ONT Q20+ reads (Guppy 5+) | | `--pacbio-raw` | PacBio CLR | | `--pacbio-corr` | PacBio corrected | | `--pacbio-hifi` | PacBio HiFi/CCS |
Key Options
| Option | Description | |--------|-------------| | `--out-dir` | Output directory | | `--threads` | Number of threads | | `--genome-size` | Estimated genome size (e.g., 5m, 100m) | | `--iterations` | Polishing iterations (default: 1) | | `--meta` | Metagenome mode | | `--plasmids` | Recover plasmids | | `--keep-haplotypes` | Don't collapse haplotypes | | `--scaffold` | Enable scaffolding |
Genome Size Estimation
# Estimate if unknown flye --nano-raw reads.fq.gz --out-dir output --genome-size 5m # Size formats: 1000, 1k, 1m, 1g
Output Files
flye_output/ ├── assembly.fasta # Final assembly ├── assembly_graph.gfa # Assembly graph ├── assembly_info.txt # Contig statistics └── flye.log # Log file
Bacterial Assembly
flye \
--nano-raw bacteria.fastq.gz \
--out-dir bacteria_assembly \
--genome-size 5m \
--threads 16Metagenome Assembly
flye \
--nano-raw metagenome.fastq.gz \
--out-dir meta_assembly \
--meta \
--threads 32With Plasmid Recovery
flye \
--nano-raw isolate.fastq.gz \
--out-dir assembly \
--plasmids \
--threads 16Canu
Installation
conda install -c bioconda canu
Basic Usage
# ONT reads canu -p assembly -d canu_output genomeSize=5m -nanopore reads.fastq.gz # PacBio HiFi canu -p assembly -d canu_output genomeSize=5m -pacbio-hifi reads.fastq.gz
Key Options
| Option | Description | |--------|-------------| | `-p` | Assembly prefix | | `-d` | Output directory | | `genomeSize=` | Estimated size (required) | | `maxThreads=` | Max threads | | `maxMemory=` | Max memory (e.g., 64g) | | `useGrid=false` | Disable grid execution | | `correctedErrorRate=` | Expected error rate |
Read Type Options
| Option | Read Type | |--------|-----------| | `-nanopore` | ONT reads | | `-nanopore-raw` | ONT raw (deprecated) | | `-pacbio` | PacBio CLR | | `-pacbio-hifi` | PacBio HiFi/CCS |
Fast Mode
canu -p asm -d output genomeSize=5m \
-nanopore reads.fq.gz \
useGrid=false \
maxThreads=16 \
maxMemory=32gHigh-Quality Mode (PacBio HiFi)
canu -p asm -d output genomeSize=5m \
-pacbio-hifi reads.fq.gz \
correctedErrorRate=0.01Output Files
canu_output/ ├── assembly.contigs.fasta # Contigs ├── assembly.unassembled.fasta ├── assembly.report └── assembly.seqStore/
Wtdbg2 (Fast Draft)
Installation
conda install -c bioconda wtdbg
Basic Usage
# Assemble wtdbg2 -x ont -g 5m -t 16 -i reads.fq.gz -o draft # Consensus wtpoa-cns -t 16 -i draft.ctg.lay.gz -o draft.ctg.fa
Platform Presets
| Preset | Platform | |--------|----------| | `-x ont` | ONT R9 | | `-x ccs` | PacBio HiFi | | `-x rs` | PacBio CLR | | `-x sq` | ONT R10 |
Complete Workflows
ONT Bacterial Assembly
#!/bin/bash
set -euo pipefail
READS=$1
OUTDIR=$2
SIZE=${3:-5m}
echo "=== ONT Bacterial Assembly ==="
# Flye assembly
flye \
--nano-raw $READS \
--out-dir ${OUTDIR}/flye \
--genome-size $SIZE \
--threads 16
# Stats
echo "Assembly statistics:"
cat ${OUTDIR}/flye/assembly_info.txt
echo "Assembly: ${OUTDIR}/flye/assembly.fasta"Hybrid Assembly (Long + Short)
#!/bin/bash
set -euo pipefail
LONG=$1
SHORT_R1=$2
SHORT_R2=$3
OUTDIR=$4
# 1. Long-read assembly with Flye
flye --nano-raw $LONG --out-dir ${OUTDIR}/flye --genome-size 5m --threads 16
# 2. Polish with short reads (Pilon)
# See assembly-polishing skillQuality Expectations
| Metric | Bacterial | Eukaryotic | |--------|-----------|------------| | Contigs | 1-10 | 100-1000+ | | N50 | >1 Mb | Variable | | Complete chromosomes | Often | Rare |
Troubleshooting
Low Contiguity
- Check coverage (need >30x)
- Try increasing iterations in Flye
- Consider supplementing with short reads
Memory Issues
- Use Flye (more memory efficient)
- Reduce threads
- Filter reads b
The largest open-source medical AI skill library for OpenClaw.
Other skills on openclaw-medical-skills.
- /aav-vector-design-agent
<!--
Open skill - /adaptyv
Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use
Open skill - /adhd-daily-planner
Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that
Open skill - /aeon
This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations
Open skill - /agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.
Open skill - /agentd-drug-discovery
<!--
Open skill

