sc-fastq-qc
Load when checking raw single-cell FASTQ read quality (Phred / GC / adapter / length) before counting. Skip when reads are already counted (use sc-qc); bulk FASTQ (use bulkrna-read-qc).
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 161
- Forks
- 27
01 前言 Front Matter
- name
- sc-fastq-qc
- tags
- [ "singlecell", "scrna", "fastq", "qc", "read-quality" ]
- trigger
- scRNA FASTQ QC, FastQC single-cell, MultiQC single-cell, raw read quality, read-level QC
- description
- Load when checking raw single-cell FASTQ read quality (Phred / GC / adapter / length) before counting. Skip when reads are already counted (use sc-qc); bulk FASTQ (use bulkrna-read-qc).
02 资源文件 7
- 参考文档references/methodology.md6.0 KB
- 参考文档references/output_contract.md2.7 KB
- 参考文档references/parameters.md778 B
- 参考文档references/r_visualization.md288 B
- 脚本sc_fastq_qc.py19.1 KB
- 脚本tests/test_fastqc_paths.py947 B
- 脚本tests/test_sc_fastq_qc.py3.1 KB
03 SKILL.md 正文
sc-fastq-qc
Use from a step
This is CLI_ONLY: it reads FASTQ files and optionally starts FastQC/MultiQC.
from skills._sdk.notebook import run_cli
run_cli("sc-fastq-qc", "--input", "data/sample_R1.fastq.gz",
"--read2", "data/sample_R2.fastq.gz",
inputs=["data/sample_R1.fastq.gz", "data/sample_R2.fastq.gz"])
The demo renders synthetic summary tables; it does not read FASTQ or test
the external tools. There is no _api.py for this skill.
When to use
The user has raw scRNA-seq FASTQ files (one or more, or a directory of
samples) and wants per-file / per-sample / per-base quality summaries
before running sc-count or cellranger. Python summaries always run.
FastQC and MultiQC add reports when installed; a tool that is present but
fails is a hard error, not a fallback to a successful Python-only run.
Inputs & Outputs
Inputs
- Input kinds:
file,directory - Modalities: scrna
- File types:
.fastq,.fq, and their.gzvariants - FASTQ structure: valid first record
- Directory layouts (any):
fastq-collection
Outputs
tables/fastq_per_base_quality.csvtables/fastq_per_file_summary.csvtables/fastq_per_sample_summary.csvfigures/fastq_file_quality.pngfigures/fastq_q30_summary.pngfigures/fastq_read_structure.pngfigures/per_base_quality.pngfigures/manifest.json,figure_data/manifest.json, plot-data CSV filesreproducibility/commands.sh,reproducibility/requirements.txt- Optional external reports under
artifacts/fastqc/andartifacts/multiqc/ report.mdresult.json
Flow
- Discover FASTQ files and choose one sample (
--sampledisambiguates a directory). - Summarize the first
--max-readsrecords per file in Python. - Run FastQC when present, then MultiQC when both tools are present.
- Render four figures from the Python summaries; external HTML is separate.
- Write three tables,
report.mdandresult.json.
Gotchas
--max-reads 20000caps Python summaries only.tables/fastq_per_file_summary.csvrecords sampled depth. FastQC processes the full files. This is a prefix sample, not random sampling.--r-enhancedis accepted but produces no R plots. This skill emits Python figures only. Pass freely, expect no R Enhanced output.figures/manifest.jsonrecords per-figure status;result.jsonlists external tool availability and commands underdata.external_tools._lib/upstream.py:choose_fastq_samplerejects ambiguous multi-sample directories. Run once per sample with--sample; one invocation does not batch every sample.
Key CLI
# Demo (synthetic summary tables, no FASTQ or external tools)
python skills/singlecell/scrna/sc-fastq-qc/sc_fastq_qc.py --demo --output /tmp/sc_fastq_qc_demo
# Single-file with paired-end
python skills/singlecell/scrna/sc-fastq-qc/sc_fastq_qc.py \
--input sample_R1.fastq.gz --read2 sample_R2.fastq.gz --output results/
# Choose a sample and increase Python sampling depth
python skills/singlecell/scrna/sc-fastq-qc/sc_fastq_qc.py \
--input fastq_dir/ --sample sample_A --output results/ --max-reads 100000 --threads 8
See also
references/parameters.md— every CLI flag and tuning hintreferences/methodology.md— FastQC integration + Python fallback rationalereferences/output_contract.md— table column schemas + figure roles- Adjacent skills:
sc-count(next step — FASTQ → AnnData),bulkrna-read-qc(bulk RNA-seq variant),sc-qc(downstream count-matrix QC)
Dependencies
Python packages this skill's script needs. They are not installed for you — check before a long run.
anndata, matplotlib, numpy, pandas, scanpy, scipy, seaborn
04 同仓库更多 Skills
demo-skill
A fixture skill for the skill environment tests. Use it for nothing else.
fake-domains
Test fixture for the golden deployment in tests/entry. Load never; it has no script.
replace-me-skill
Load when copying this directory to bootstrap a new OmicsClaw skill. Skip when an existing skill already covers the request.
spatial-velocity
Load when estimating RNA velocity on a spatial AnnData with `layers["spliced"]` + `layers["unspliced"]` via scVelo (stochastic / deterministic / dynamical) or veloVI (deep generative). Skip when input lacks the spliced/unspliced layers (must be quantified upstream by velocyto / kb-python / STARsolo); non-spatial scRNA velocity (use sc-velocity).
spatial-trajectory
Load when inferring pseudotime / lineage trajectories on a preprocessed spatial AnnData via DPT (default — diffusion pseudotime), CellRank (terminal-state + fate-probability), or Palantir (waypoint branch probabilities). Skip when the data has spliced/unspliced layers and you want velocity-driven dynamics (use spatial-velocity); non-spatial scRNA pseudotime (use sc-pseudotime).
spatial-statistics
Load when running spatial autocorrelation / hotspot / co-occurrence / neighbourhood-enrichment / Ripley K stats on a clustered spatial AnnData via squidpy. Skip when ranking spatially variable genes (use spatial-genes); tissue domain detection (use spatial-domains).