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).
Files8
View on GitHubSKILL.mdskills/sc-fastq-qc/SKILL.md
GitHubsc-fastq-qc
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. Uses FastQC + MultiQC when
those tools are installed; falls back to a stable Python-only summary
otherwise so the skill always returns something useful.
Inputs & Outputs
<!-- AUTO-GENERATED from skill.yaml (interface) — do not edit by hand. Regenerate: python scripts/generate_skill_md.py <skill_dir> -->Inputs
- Input kinds:
file,directory - Modalities: scrna
- File types:
.fastq,.fq - FASTQ structure: valid first record
- Directory layouts (any):
fastq-collection
Outputs
tables/Summary.csvtables/barcodes.tsvtables/fastq_per_base_quality.csvtables/fastq_per_file_summary.csvtables/fastq_per_sample_summary.csvtables/features.tsvtables/genes.tsvtables/metrics_summary.csvfigures/fastq_file_quality.pngfigures/fastq_q30_summary.pngfigures/fastq_read_structure.pngfigures/per_base_quality.png3M-february-2018.txt737K-august-2016.txtAligned.sortedByCoord.out.bammultiqc_report.htmlpossorted_genome_bam.bamweb_summary.htmlreport.mdresult.json
Flow
- Discover FASTQ files from
--input(single file or directory). - If
fastqcis on$PATH, run it; ifmultiqcis on$PATH, run that too. - In parallel run a Python-only fallback that samples up to
--max-readsper FASTQ for Phred / GC / adapter / length. - Merge tool output + fallback into per-file / per-sample / per-base tables.
- Render quality + adapter / GC diagnostic figures.
- Emit
report.md+result.json.
Gotchas
--max-reads 20000(default) caps the Python-fallback path only. When FastQC is available the full FASTQ is processed; when not, only the first 20K reads per file are sampled. Sampling depth is recorded per file intables/fastq_per_file_summary.csv; bump--max-readsif a FASTQ has high variance across the file.--r-enhancedis accepted but produces no R plots. This skill emits Python figures only. Pass freely, expect no R Enhanced output.- Per-figure
status: "rendered"is local, not global. Theresult.jsoncarries astatusfield per figure (e.g.figures.per_base_quality.status == "rendered"). All four panels are emitted unconditionally (sc_fastq_qc.py:430-433), so absence of an entry typically means upstream tool failure rather than a configuration choice — inspectsummary.warningsbefore assuming a panel was suppressed.
Key CLI
# Demo (built-in synthetic FASTQ)
python omicsclaw.py run sc-fastq-qc --demo --output /tmp/sc_fastq_qc_demo
# Single-file with paired-end
python omicsclaw.py run sc-fastq-qc \
--input sample_R1.fastq.gz --read2 sample_R2.fastq.gz --output results/
# Directory of samples, deeper sampling for the Python fallback
python omicsclaw.py run sc-fastq-qc \
--input fastq_dir/ --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)