Skip to content
Research
Skill

/genomics-qc

Load when running pre-alignment FASTQ quality control — Phred quality scores, Q20/Q30 rates,

BOOST
From plugin
omicsclaw
16188 skills
Install
$ npx -y skills add tiangzlab/omicsclaw --skill genomics-qc --agent claude-code

How 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/genomics-qc

Context preview

The summary Claude sees to decide when to auto-load this skill.

Load when running pre-alignment FASTQ quality control — Phred quality scores, Q20/Q30 rates,

SKILL.md

genomics-qc.SKILL.md
name: genomics-qc
description: Load when running pre-alignment FASTQ quality control — Phred quality scores, Q20/Q30 rates,
  GC / N content, read-length distribution, adapter-contamination detection. Skip when working with already-aligned
  BAMs (use genomics-alignment); peak / variant files are the input (use the relevant downstream skill).
trigger: sequencing QC, FastQC, read quality, adapter trimming, fastp
tags:
- genomics
- qc
- fastq
- phred
- adapter
- fastqc

genomics-qc

When to use

Load this skill for the file-based analysis named in the description. The function library and CLI share the same calculations; no external aligner, assembler, caller or annotation service is started.

Use from a step

from skills._sdk.notebook import load_skill, read_input, write_output
library = load_skill("genomics-qc")
data = read_input("input.fastq", reader=library.read_records)
result = library.analyze(data)
write_output(result, "tables/result.csv")
write_output(library.distribution_figure(result), "figures/distribution.png")

Run `examples/example_step.py` through the step runner for a small, hand-worked synthetic fixture. It asserts known summary values. The reader materializes the input in memory; use bounded FASTQ reads or pre-filter large genomic files before loading them.

API

<!-- api:begin generated from _api.py; regenerate with run.py api <skill dir> --write -->

`read_records(path: str | Path, *, max_reads: int=500000) -> pd.DataFrame`

Read records through read_input(path, reader=library.read_records).

:param path: Input file in the format documented under Inputs and outputs. :param max_reads: CLI default 500000 limits records materialized in memory. :returns: Parsed records as a DataFrame. :raises ValueError: Input values or file structure cannot be parsed.

`analyze(data: pd.DataFrame, *, max_reads: int=500000) -> pd.DataFrame`

Compute qc summaries and return a new table, leaving data unchanged.

:param data: Records containing sequence, quality. :param max_reads: CLI default 500000 limits the analyzed reads. :returns: Result table with diagnostics and summary in attrs['run_info']. :raises ValueError: Required columns are absent or records are empty or invalid.

`run_info(data: pd.DataFrame, *, keep: bool=True) -> dict`

Return analysis diagnostics and summary.

:param data: Result returned by analyze. :param keep: Keep diagnostics by default; the CLI passes False. :returns: Independent diagnostics dictionary. :raises ValueError: analyze has not populated diagnostics.

`distribution_figure(data: pd.DataFrame)`

Plot mean_quality values without writing files.

:param data: Result table containing mean_quality. :returns: Matplotlib Figure. :raises ValueError: The value column is absent or table is empty.

<!-- api:end -->

Methods and parameters

`analyze` returns a new DataFrame and leaves the input unchanged. `run_info(result)` returns the summary and method diagnostics. The CLI passes `keep=False` so diagnostics do not enter output tables. All calculations are deterministic; synthetic CLI demos retain seed 42.

Gotchas

  • `read_records` assumes Phred+33, accepts plain/gzip FASTQ, and rejects incomplete records or mismatched sequence/quality lengths.
  • `analyze` measures the first max_reads records (default 500000), tracks at most 300 quality positions and the 20 most frequent read lengths.
  • `run_info()["summary"]["adapter_contamination_pct"]` scans the last 20 bases for the first eight bases of two built-in adapter motifs. No trimming occurs.

Inputs and outputs

Input files:

  • File types: `.fastq`, `.fq`

CLI output files:

  • `tables/per_base_quality.csv`
  • `tables/qc_metrics.csv`
  • `tables/read_length_distribution.csv`
  • `report.md`
  • `result.json`

The library writes no files. Steps use `write_output`; the CLI owns the listed artifacts. Public figure functions return matplotlib Figures and do not add new CLI outputs.

CLI

python skills/genomics/genomics-qc/genomics_qc.py --input input_file --output results/
python skills/genomics/genomics-qc/genomics_qc.py --demo --output /tmp/genomics_qc_demo

See also

  • `references/parameters.md`
  • `references/methodology.md`
  • `references/output_contract.md`

Dependencies

`numpy`, `pandas`, `matplotlib`

Read more
Ships withomicsclaw

Conversational & memory-enabled AI research partner for multi-omics analysis. CLI + Desktop App (installers in Releases). From biological idea to full research paper.

Get the whole plugin

Other skills on omicsclaw.