ngs-read-preprocessing
Adapter trimming, quality filtering, and per-sample QC reporting with fastp.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 4
- Forks
- 1
01 前言 Front Matter
- name
- ngs-read-preprocessing
- description
- Adapter trimming, quality filtering, and per-sample QC reporting with fastp.
02 资源文件 9
- 参考文档agents/claude.yaml275 B
- 参考文档agents/openai.yaml276 B
- 参考文档agents/README.md322 B
- 资产文件assets/.gitkeep—
- 参考文档config.yaml255 B
- 参考文档references/fastp.md4.3 KB
- 参考文档references/README.md68 B
- 脚本scripts/batch_run.sh4.7 KB
- 脚本scripts/run.sh2.2 KB
03 SKILL.md 正文
Skill: ngs-read-preprocessing
Use When
- The user wants to trim adapters from raw sequencing reads.
- The user needs to filter low-quality reads or bases before downstream alignment.
- The user wants to generate clean FASTQ files suitable for alignment or assembly.
- The user needs a per-sample HTML QC report showing before/after statistics.
- The user wants to perform polyG or polyX tail trimming for NextSeq/NovaSeq platforms.
- The user needs to apply minimum read length filtering after trimming.
Inputs
- Required:
- Input FASTQ R1 (
-i FILE) — single-end read file or forward reads for paired-end.
- Input FASTQ R1 (
- Optional:
- Input FASTQ R2 (
-I FILE) — reverse reads for paired-end sequencing. --outdir DIR— Output directory (default:fastp_results).--threads N— Number of worker threads (default: 4).--min-qual N— Minimum qualified quality phred value for sliding window filtering (default: 15).--min-len N— Minimum read length after trimming (default: 36 bp).--polyg— Enable polyG tail trimming (recommended for NextSeq/NovaSeq two-color chemistry).- Adapter sequences — auto-detected by default; user may supply explicit sequences via additional fastp flags.
- Additional fastp flags passed through as extra arguments.
- Input FASTQ R2 (
Workflow
- Validate that input FASTQ files exist and are readable.
- Detect single-end vs. paired-end mode from the provided inputs (
-ionly vs.-iand-I). - Run fastp with adapter auto-detection (or user-specified adapter sequences if provided).
- Apply quality filtering using a sliding window approach (default: Q15 qualified quality threshold).
- Apply length filtering to discard reads shorter than the minimum length (default: 36 bp).
- Enable polyG tail trimming for NextSeq/NovaSeq platforms if
--polygis specified. - Generate an HTML report and JSON statistics file with detailed before/after metrics.
- Report summary: reads before/after filtering, bases before/after, Q20/Q30 rates, and adapter trimming rate.
Output Contract
- Cleaned FASTQ file(s) — Trimmed and filtered reads (
<sample>_trimmed.fastq.gz; R1 and R2 for paired-end). - fastp HTML report — Per-sample visual QC summary (
<sample>_fastp.html). - fastp JSON report — Machine-readable statistics (
<sample>_fastp.json). - Summary statistics — Reads in/out, bases in/out, Q20/Q30 rates before and after filtering, adapter detection/trimming rate.
Limits
- fastp must be installed and available on
$PATH. - fastp is single-threaded by default; use
-w/--threadsto enable multi-threading (up to 16 threads). - This skill does not perform read alignment; use
genome-read-alignmentorrnaseq-read-alignmentfor that purpose. - This skill does not aggregate QC across multiple samples; use
ngs-quality-controlfor multi-sample QC aggregation with MultiQC. - UMI processing is supported by fastp but is not enabled by default; pass
--umiand related flags as extra arguments if needed. - Interleaved FASTQ input is not supported by the wrapper script; use fastp directly for interleaved input.
- Common failure cases:
- Paired-end FASTQ files with mismatched read counts causing fastp to abort.
- Incorrect adapter sequences provided, leading to untrimmed reads.
- Disk full during output writing, producing truncated FASTQ files.
04 同仓库更多 Skills
structured-intelligence-skill-creator
Create or update repository skills that conform to local templates, provider metadata requirements, registry rules, and validation workflows.
stat-survival-analysis
Estimate and compare survival functions using Kaplan-Meier curves and log-rank test, with optional Cox proportional hazards regression.
stat-pca
Perform PCA on a numeric data matrix to reduce dimensionality, visualize sample structure, and identify top contributing features.
stat-pairwise-correlation
Compute pairwise correlations and significance tests across all numeric variables, and produce a correlation heatmap.
stat-nonlinear-embedding
Embed high-dimensional data into 2D using t-SNE or UMAP for exploratory visualization of sample or cell relationships.
stat-logistic-regression
Fit a logistic regression model for binary outcomes, report odds ratios and model performance (AUC-ROC, confusion matrix).