alignment-level-QC

Calculates technical mapping statistics for any aligned BAM file (ChIP or ATAC). It assesses the performance of the aligner itself by generating metrics on read depth, mapping quality, error rates, and read group data using samtools and Picard.Use this skill to check "how well the reads mapped" or to validate BAM formatting/sorting before further processing. Do NOT use this skill for biological signal validation (like checking for peaks or open chromatin) or for filtering/removing reads.

16 stars

Best use case

alignment-level-QC is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Calculates technical mapping statistics for any aligned BAM file (ChIP or ATAC). It assesses the performance of the aligner itself by generating metrics on read depth, mapping quality, error rates, and read group data using samtools and Picard.Use this skill to check "how well the reads mapped" or to validate BAM formatting/sorting before further processing. Do NOT use this skill for biological signal validation (like checking for peaks or open chromatin) or for filtering/removing reads.

Teams using alignment-level-QC should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/alignment-level-qc/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/alignment-level-qc/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/alignment-level-qc/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How alignment-level-QC Compares

Feature / Agentalignment-level-QCStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Calculates technical mapping statistics for any aligned BAM file (ChIP or ATAC). It assesses the performance of the aligner itself by generating metrics on read depth, mapping quality, error rates, and read group data using samtools and Picard.Use this skill to check "how well the reads mapped" or to validate BAM formatting/sorting before further processing. Do NOT use this skill for biological signal validation (like checking for peaks or open chromatin) or for filtering/removing reads.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Alignment Quality Control for ChIP-seq/ATAC-seq

## Overview

Perform comprehensive **preliminary alignment-level quality control** for ChIP-seq and ATAC-seq BAM files using **samtools**, **Picard**, and **MultiQC**.  

Main steps include:
- Initialize the project directory.
- Refer to the **Inputs & Outputs** section to check inputs and build the output architecture. All the output file should located in `${proj_dir}` in Step 0.
- Sort and add read groups if missing in the BAM file.
- Run preliminary QC metrics
- **Generate MultiQC report**  

---

## When to use this skill

- Use skill when you want to perform alignment-level quality control for ChIP-seq or ATAC-seq BAM files.

---

## Inputs & Outputs

### Inputs

<sample>.bam

### Outputs

```bash
alignment_qc/
  ${sample}.bam                        # Original input
  ${sample}.sorted.bam                 # (Optional) Created if sorting was needed
  ${sample}.RG.bam                     # (Optional) Created if RG was needed
  ${sample}.RG.bam.bai                 # Index file
  qc_results/
    ${sample}.flagstat.txt
    ${sample}.stats.txt
    ${sample}.insertsize_metrics.txt
    ${sample}.dup_metrics.txt
    alignment_qc_report.html      # Visual MultiQC report
    qc_summary.txt                # Pass/Warn/Fail table
  temp/
    ${sample}.markdup.bam            # Intermediate file (safe to delete later)
    ...
```
---

## Decision Tree

### Step 0: Initialize Project

Call:

- `mcp__project-init-tools__project_init`

with:

- `sample`: all
- `task`: alignment_qc

The tool will:

- Create `${sample}_alignment_qc` directory.
- Return the full path of the `${sample}_alignment_qc` directory, which will be used as `${proj_dir}`.

### Step 1: Check and Fix BAMs
- Ensure all BAM files are coordinate-sorted, have Read Groups, and are indexed.
*This tool will skip files that are already correct and only create temporary files when fixes are needed.*

Call: 

- mcp__qc-tools__check_and_fix_bams

with:
- `bam_files`: List of BAM files to process.
- `temp_dir`: ${proj_dir}/temp

### Step 2: Run Alignment QC Metrics

Call:

- mcp__qc-tools__run_bam_qc

with:
- `bam_files`: List of BAM files to process.
- `qc_dir`: ${proj_dir}/qc_results
- `temp_dir`: ${proj_dir}/temp

Step 3: Generate Summary Report

Call:

- mcp__qc-tools__generate_qc_report

with:
- `qc_dir`: ${proj_dir}/qc_results

---

## Quality Assessment

### Key QC Metrics

- **Total reads** – overall sequencing depth  
- **Mapped reads (%)** – alignment efficiency  
- **Properly paired (%)** – valid pair fraction (paired-end)  
- **Duplicate rate (%)** – PCR duplication estimate  
- **Mitochondrial reads (%)** – mitochondrial contamination  
- **Insert size distribution** – fragment length profile  

All metrics are derived from `samtools`/`Picard` and summarized by MultiQC.

---

### Quality Thresholds

| Category | Criteria | Interpretation |
|-----------|-----------|----------------|
| **Pass** | All metrics within recommended thresholds | Suitable for downstream analysis |
| **Warn** | One or more borderline metrics | Likely acceptable; review recommended |
| **Fail** | Critical metrics outside acceptable ranges | Re-sequencing or reprocessing suggested |

---

## Report Generation

After MultiQC completes, generate a sample-wise summary (PASS/WARN/FAIL) per thresholds in `references/qc_metrics.md` and save it as:

```
qc_results/qc_summary.txt
```

---

## Resources

Use `references/qc_metrics.md` for:
- Metric definitions and recommended thresholds  
- Troubleshooting guidance  
- Readiness criteria for peak calling  
- Pointers to ENCODE/nf-core QC standards

Related Skills

bio-alignment-filtering

16
from diegosouzapw/awesome-omni-skill

Filter alignments by flags, mapping quality, and regions using samtools view and pysam. Use when extracting specific reads, removing low-quality alignments, or subsetting to target regions.

alignment-values-north-star

16
from diegosouzapw/awesome-omni-skill

Use when teams need shared direction and decision-making alignment. Invoke when starting new teams, scaling organizations, defining culture, establishing product vision, resolving misalignment, creating strategic clarity, or setting behavioral standards. Use when user mentions North Star, team values, mission, principles, guardrails, decision framework, or cultural alignment.

Advanced Typescript Type Level

16
from diegosouzapw/awesome-omni-skill

Master TypeScript type-level programming with conditional types, mapped types, template literals, and infer patterns. Use when writing advanced types, creating utility types, or solving complex type challenges.

root-level-project-instructions

16
from diegosouzapw/awesome-omni-skill

Root level project guidelines and initial steps to start and implement EEG processor

bio-alignment-validation

16
from diegosouzapw/awesome-omni-skill

Validate alignment quality with insert size distribution, proper pairing rates, GC bias, strand balance, and other post-alignment metrics. Use when verifying alignment data quality before variant calling or quantification.

highlevel

16
from diegosouzapw/awesome-omni-skill

Connect your AI assistant to GoHighLevel CRM via the official API v2. Manage contacts, conversations, calendars, pipelines, invoices, payments, workflows, and 30+ endpoint groups through natural language. Includes interactive setup wizard and 100+ pre-built, safe API commands. Python 3.6+ stdlib only — zero external dependencies.

bio-alignment-io

16
from diegosouzapw/awesome-omni-skill

Read, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

customer-discovery

16
from diegosouzapw/awesome-omni-skill

Find where potential customers discuss problems online and extract their language patterns. Provides starting points for community research, not exhaustive coverage.

create-prd

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "创建PRD", "写产品需求文档", "生成PRD", "新建PRD", "create PRD", "write product requirements document", or mentions "产品需求文档", "PRD模板". Automatically generates comprehensive Chinese PRD documents following 2026 best practices.

Create Jira Feature

16
from diegosouzapw/awesome-omni-skill

Implementation guide for creating Jira features representing strategic objectives and market problems

create-feature

16
from diegosouzapw/awesome-omni-skill

Creates Features following the T-Minus-15 process template. Features represent significant deliverables that contain multiple User Stories. Includes proper metadata, MoSCoW prioritization, effort estimates, deliverables, and benefit hypothesis.