Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

ngs-fastq-qc — Codex skill: what it does, how to install

Checks FASTQ files, runs FastQC and MultiQC, interprets quality signals, and can create trimmed reads while keeping raw inputs intact.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill ngs-fastq-qc -a codex
Open on GitHub

What ngs-fastq-qc does

This skill validates FASTQ paths, R1/R2 pairing, and run settings before local quality control. It can use FastQC and MultiQC for reports, then choose a trimming branch with fastp or Cutadapt. Explicit adapter or primer sequences are passed to Cutadapt when automatic handling is not appropriate.

The local runner is run_fastq_qc.py; it validates the setup before Snakemake execution. A run directory contains run_manifest.json, config.json, validation data, logs, artifact_index.json, summary.md, FastQC/MultiQC results, and qc_interpretation.json. The interpretation covers end-of-read quality loss, duplication, poly-G artifacts, contamination signals, and pairing problems.

Raw FASTQ files are never overwritten, and the original QC reports remain available when trimmed FASTQs are produced. Required tools depend on the selected branch and can include FastQC, MultiQC, fastp, Cutadapt, and seqkit.

What it helps with

  • validate R1/R2 pairing before downstream analysis
  • generate FastQC and MultiQC reports
  • interpret quality loss at read ends
  • trim adapters or primers with Cutadapt
  • produce trimmed FASTQs without overwriting raw reads

Example prompts for the agent

  • Run FASTQ QC for samplesheet.csv and summarize the findings from qc_interpretation.json.
  • Check sampleA_R1.fastq.gz and sampleA_R2.fastq.gz with the local run_fastq_qc.py runner.
  • Use the Cutadapt branch for samplesheet.csv with adapter AGATCGGAAGAGC, keeping the raw FASTQs unchanged.

How to install ngs-fastq-qc

1Skills CLI (Vercel)

npx skills add openai/plugins --skill ngs-fastq-qc -a codex

2Manually: put the files in place

.agents/skills/ngs-fastq-qc/SKILL.md

For all projects use ~/.agents/skills/

Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them

Questions about ngs-fastq-qc

How do I install ngs-fastq-qc in Codex?

Run npx skills add openai/plugins --skill ngs-fastq-qc, then run npx skills add openai/plugins --skill ngs-fastq-qc -a codex. The skill file is placed at .agents/skills/ngs-fastq-qc/SKILL.md.

What does ngs-fastq-qc do?

It validates FASTQ inputs, runs local FastQC and MultiQC, interprets quality findings, and can invoke fastp or Cutadapt for an optional trimming branch.

Does trimming replace the original FASTQ files?

No. The skill keeps raw FASTQ inputs unchanged and preserves the original QC reports when trimmed outputs are created.

Source text

SKILL.md · MIT
---
name: ngs-fastq-qc
description: Validate FASTQ inputs, run local FastQC/MultiQC QC, interpret QC signals, and optionally execute fastp or Cutadapt trimming branches without overwriting raw reads.
---

# FASTQ QC

Use this skill for QC-only, trimming-first, or FASTQ quality interpretation workflows. This skill can execute the plugin-owned local FastQ QC runner when the user approves a local run. It should decide whether trimming or additional investigation is warranted; it should not blindly trim by default.

## Essential Inputs

Confirm:

- FASTQ paths and pairing convention
- whether output should be QC-only or trimmed FASTQs
- known adapter or primer sequences
- organism if contamination screening or host depletion is requested
- output directory
- whether FASTQs are raw, demultiplexed, previously trimmed, or downloaded from an archive
- whether downstream analysis expects original read lengths, UMIs, or inline barcodes

## Public Tools

Default tool set:

- `FastQC` for raw read QC
- `MultiQC` for project-level summary
- `fastp` for all-in-one QC/trimming when acceptable
- `Cutadapt` when primer/adapter handling needs explicit sequences
- `seqkit` for quick counts, stats, and subsampling

## Preflight

```bash
python plugins/ngs-analysis/scripts/ngs_preflight.py --pipeline fastq_qc --emit-install-plan
```

## Local Execution

Use the plugin-owned runner for local artifact-producing FASTQ QC:

```bash
python plugins/ngs-analysis/scripts/run_fastq_qc.py \
  --sample-sheet samplesheet.csv \
  --execute
```

Single paired sample:

```bash
python plugins/ngs-analysis/scripts/run_fastq_qc.py \
  --sample sampleA \
  --r1 sampleA_R1.fastq.gz \
  --r2 sampleA_R2.fastq.gz \
  --execute
```

Optional trimming branch:

```bash
python plugins/ngs-analysis/scripts/run_fastq_qc.py \
  --sample-sheet samplesheet.csv \
  --trim-mode fastp \
  --execute
```

For explicit adapters:

```bash
python plugins/ngs-analysis/scripts/run_fastq_qc.py \
  --sample-sheet samplesheet.csv \
  --trim-mode cutadapt \
  --adapter-r1 AGATCGGAAGAGC \
  --adapter-r2 AGATCGGAAGAGC \
  --execute
```

The runner performs pre-execution validation before Snakemake execution. It writes a timestamped run directory with `run_manifest.json`, `config.json`, `validation/`, `workflow/Snakefile`, logs, `artifact_index.json`, `summary.md`, FastQC/MultiQC outputs, and `qc_interpretation.json` after successful execution.

## Interpretation Rules

Inspect raw QC before recommending trimming:

- Per-base quality drop at the read end: consider quality trimming, but preserve enough length for alignment or amplicon merging.
- Adapter or primer signal: use `cutadapt` when explicit sequences matter; use `fastp` only when automatic handling is acceptable.
- Poly-G or patterned-flowcell artifacts: handle with a tool that explicitly supports the artifact and report the assumption.
- Overrepresented sequences: classify adapters, primers, rRNA, PhiX, host contamination, or true biology before filtering.
- Per-tile failures or severe quality shifts: flag possible run-level issues and avoid treating them as ordinary adapter contamination.
- High duplication: interpret by assay; it may be expected for amplicons, targeted panels, or low-input libraries.
- Pairing issues: verify R1/R2 file counts and read-name pairing before any downstream workflow.

Do not overwrite input FASTQs. Preserve the raw QC reports even when trimmed FASTQs are created.

## Kickoff Pattern

QC-only:

```bash
mkdir -p results/fastqc results/multiqc
fastqc -t 4 -o results/fastqc *.fastq.gz
multiqc results/fastqc -o results/multiqc
```

QC plus trimming:

```bash
fastp \
  -i sample_R1.fastq.gz \
  -I sample_R2.fastq.gz \
  -o results/trimmed/sample_R1.fastq.gz \
  -O results/trimmed/sample_R2.fastq.gz \
  --html results/fastp/sample.html \
  --json results/fastp/sample.json
multiqc results -o results/multiqc
```

## Output Review

Return a short QC interpretation with:

1. sample/read-pair inventory
2. QC modules that look normal
3. QC modules that require action or user confirmation
4. trimming or no-trimming recommendation with rationale
5. downstream caveats such as short reads, contaminated libraries, or failed pairs

When using the local runner, ground the response in the generated `qc_interpretation.json`, `summary.md`, and MultiQC report instead of relying only on expected artifacts.

© OpenAI · MIT · openai/plugins

Similar skills

All skills for Science and research →

From the same set422

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor