Skip to content
Back to skills

Genomics Assembly

ASecurity

Load when computing genome-assembly QC metrics — N50/N90, L50/L90, total length, contig count,

  • 8 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 6, 2026
datapythongobash

Works with

  • cli

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 6, 2026

npx -y skills add lilinji/GeneTind-Life-Skills --skill genomics-assembly --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Genomics Assembly?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Genomics Assembly
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lilinji-genomics-assembly/badge)](https://www.skillsdirectory.com/skills/lilinji-genomics-assembly)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
# AUTO-GENERATED header from skill.yaml — do not edit by hand.
# Edit skill.yaml, then run: python scripts/generate_skill_md.py <skill_dir>
name: genomics-assembly
description: Load when computing genome-assembly QC metrics — N50/N90, L50/L90, total length, contig count,
  GC content, longest-contig — from a FASTA produced by any assembler (SPAdes / Megahit / Flye / Canu).
  Skip when running the assembly itself; assessing alignment quality (use genomics-alignment).
version: 0.5.0
author: OmicsClaw
license: MIT
emoji: 🧬
tags:
- genomics
- assembly
- n50
- l50
- contig
- quast
- spades
- flye
requires:
- numpy
- pandas
---

# genomics-assembly

## When to use

The user has a FASTA from any de novo assembler (SPAdes, Megahit,
Flye, Canu, etc.) and wants standard QUAST-compatible quality
metrics: contig count, N50 / N90, L50 / L90, total length, longest
contig, GC content, optional completeness fraction (when
`--genome-size` is provided).

This skill does NOT run the assembly. It consumes the FASTA the
assembler emits.

## Inputs & Outputs

<!-- AUTO-GENERATED from skill.yaml (interface) — do not edit by hand. Regenerate: python scripts/generate_skill_md.py <skill_dir> -->

**Inputs**

- File types: `.fasta`, `.fa`

**Outputs**

- `tables/assembly_metrics.csv`
- `tables/contig_lengths.csv`
- `report.md`
- `result.json`

## Flow

1. Load FASTA (`--input <assembly.fasta>`) or generate a demo assembly at `output_dir/demo_assembly.fasta` (`genome_assembly.py:186`).
2. Parse contigs (`genome_assembly.py:52-67`); each line is uppercased on read so case is normalised.
3. Sort by length; compute cumulative N50 / N90 / L50 / L90 + total / longest + assembly-wide GC% from concatenated sequence.
4. If `--genome-size` is set and > 0, compute `completeness_pct = total_length / genome_size * 100`.
5. Write `tables/contig_lengths.csv` (`genome_assembly.py:309`) + `tables/assembly_metrics.csv` (`:312`) + `report.md` + `result.json`.

## Gotchas

- **No assembler is invoked.** This skill summarises an existing FASTA — it does not run SPAdes / Megahit / Flye / Canu. Run them upstream and feed the resulting FASTA here.
- **`--input` REQUIRED unless `--demo`.** `genome_assembly.py:290` raises `ValueError("--input required when not using --demo")`; non-existent paths raise `FileNotFoundError` at `:293`.
- **`--genome-size 0` (default) skips completeness.** Without an expected genome size (`genome_assembly.py:279`, default 0), the report omits the completeness column entirely. Pass `--genome-size 3000000000` for a human-scale assembly to populate it.
- **Soft-masked bases are normalised to uppercase before GC counting.** `genome_assembly.py:67` calls `line.upper()` per FASTA line, so lowercase soft-masked regions contribute identically to hard-masked / unmasked sequence in the GC%. There is no way to exclude soft-masked regions short of pre-filtering the FASTA.
- **Demo FASTA has 100 contigs of varying length.** `--demo` writes a fixed-pattern synthetic file useful for orchestrator smoke tests; the N50 it produces is not biologically meaningful.

## Key CLI

```bash
# Demo
python omicsclaw.py run genomics-assembly --demo --output /tmp/asm_demo

# Real assembly with completeness against expected size
python omicsclaw.py run genomics-assembly \
  --input my_assembly.fasta --output results/ \
  --genome-size 3100000000
```

## See also

- `references/parameters.md` — every CLI flag
- `references/methodology.md` — N50 / L50 definitions, GC interpretation
- `references/output_contract.md` — `tables/assembly_metrics.csv` schema
- Adjacent skills: `genomics-alignment` (downstream — map reads back to your assembly to validate), `genomics-qc` (upstream — FASTQ QC before assembly), `genomics-cnv-calling` (parallel — copy-number on a known reference instead of de novo)

Files in this skill

  • SKILL.md3.7 KB
  • genome_assembly.py11.2 KB
  • references/methodology.md838 B
  • references/output_contract.md781 B
  • references/parameters.md268 B
  • skill.yaml1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in data →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.