Sequence QC, alignment, and BAM processing. Wraps FastQC, BWA/Bowtie2, SAMtools for automated read-to-BAM pipelines.
You are the Seq Wrangler, a specialised agent for sequence data QC, alignment, and BAM processing.
Fire this skill when the user says any of:
Do NOT fire when:
vcf-annotator)rnaseq-de)methylation-clock)Without this skill, aligning FASTQ reads to a reference genome requires manually coordinating 6+ tools (FastQC, fastp, BWA/Bowtie2/Minimap2, samtools sort/fixmate/markdup/index), managing intermediate files, and producing no reproducibility record. Seq Wrangler automates the full read-to-BAM pipeline, enforces MAPQ filtering, marks duplicates, computes per-sample statistics, and generates a reproducibility bundle in a single command.
| Format | Extension | Required fields |
|--------|-----------|----------------|
| FASTQ (SE) | .fastq.gz, .fq.gz | Single-end reads |
| FASTQ (PE) | .fastq.gz, .fq.gz | R1 + R2 paired reads |
| Samplesheet | .csv | sample, fastq1, fastq2 (optional) |
| Aligner index | prefix | Pre-built BWA/Bowtie2/Minimap2 index |
--run-fastqc)--trim)samtools viewsamtools sort -nsamtools fixmatesamtools sortsamtools markdupsamtools index--run-multiqc)# Demo (no external tools needed)
python skills/seq-wrangler/seq_wrangler.py --demo --output /tmp/demo
# Single sample paired-end
python skills/seq-wrangler/seq_wrangler.py \
--r1 sample_R1.fastq.gz \
--r2 sample_R2.fastq.gz \
--index ref/hg38 \
--aligner bowtie2 \
--output results/
# Single sample single-end
python skills/seq-wrangler/seq_wrangler.py \
--r1 sample.fastq.gz \
--index ref/hg38 \
--aligner bwa \
--output results/
# Batch mode via samplesheet
python skills/seq-wrangler/seq_wrangler.py \
--samplesheet samples.csv \
--index ref/hg38 \
--output results/
# With trimming and duplicate removal
python skills/seq-wrangler/seq_wrangler.py \
--r1 sample_R1.fastq.gz --r2 sample_R2.fastq.gz \
--index ref/hg38 --aligner bowtie2 \
--trim --remove-duplicates --keep-sam \
--output results/
python skills/seq-wrangler/seq_wrangler.py --demo --output /tmp/demo
Expected output: Markdown report with synthetic flagstat (97.5% mapped, 8.7% duplicates) and coverage statistics for two demo samples (CTRL_REP1 paired-end, TREAT_REP1 single-end). No external tools required.
output/
├── report.md # Full alignment and QC report
├── summary.json # Per-sample statistics as JSON
├── bam/
│ └── sample_sorted.bam # Final sorted, markdup BAM
│ └── sample_sorted.bam.bai # BAM index
├── alignment/
│ └── sample.sam # Intermediate SAM (only with --keep-sam)
├── fastqc/ # FastQC reports (if --run-fastqc)
├── trimmed/ # Trimmed FASTQs (if --trim)
├── multiqc/ # MultiQC report (if --run-multiqc)
└── reproducibility/
│ └── commands.sh # Exact command to reproduce this run
│ └── environment.yml # Conda environment spec
│ └── checksums.sha256 # SHA-256 of all input files
│ └── run_metadata.json # Full run parameters and timestamp
Required:
samtools (BAM manipulation)bwa, bowtie2, or minimap2 (alignment)Optional:
fastqc: per-sample read QCfastp: adapter trimmingmultiqc: aggregated QC reportInstall via conda:
conda install -c bioconda samtools bowtie2 bwa minimap2 fastqc fastp multiqc
Memory for samtools sort: Uses 2G RAM per thread by default. On machines
with <8G RAM, use --threads 2 or --threads 3 to avoid OOM errors.
python3 vs python on Windows: Tests use sys.executable instead of
python3 for cross-platform compatibility. On Windows, python3 may not
exist in PATH.
Index prefix vs file: --index expects the aligner index prefix
(e.g. hg38_chr22), not a .fa or .bt2 file path. Build with
bowtie2-build genome.fa prefix first.
SAM files are deleted by default: Use --keep-sam to retain intermediate
SAM files. They can be 10x larger than the final BAM.
MAPQ filter removes unaligned reads: Default --mapq 20 filters out
reads that did not align or aligned poorly. Lower this value if you expect
low-quality data.
GRCh37 vs GRCh38: The --genome-build flag is for metadata and reporting
only. It does not affect alignment — always build your index from the correct
reference genome.
The agent (LLM) dispatches the FASTQ files and explains results. The skill (Python) executes all tool calls and generates files. The agent must NOT invent flagstat percentages, coverage values, or insert size statistics.
Trigger conditions:
align, fastq, bam, coverage, paired-end, bowtie2, bwaChaining partners:
rnaseq-de: pass final BAM for differential expressionmethylation-clock: pass BAM for methylation analysisequity-scorer: pass BAM for population equity metricsacmg: pass aligned BAM for variant calling upstreamSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer