genome-alignment-qc
Skill4 starsChanged 12 days agoMITView on GitHub
Assess alignment quality with coverage depth, mapping rates, insert size, and on-target metrics using samtools, mosdepth, and picard.
In this repository56 other files it gives its agents.
- bioinformatics-env-setupSkill
- design-thermostable-mutationsSkill
- download-gdcSkill
- download-geoSkill
- download-sraSkill
- source-summarizerSkill
- genome-read-alignmentSkill
- genome-variant-annotationSkill
- genome-variant-callingSkill
- genome-variant-filteringSkill
- metagenome-assemblySkill
- metagenome-binningSkill
- metagenome-functional-profilingSkill
- metagenome-host-removalSkill
- metagenome-taxonomic-profilingSkill
- ncbi-eutilities-assistantSkill
- ngs-quality-controlSkill
- ngs-read-preprocessingSkill
- paper-to-briefSkill
- predict-protein-heat-stabilitySkill
- researchSkill
- rnaseq-alignment-qcSkill
- rnaseq-differential-expressionSkill
- rnaseq-functional-enrichmentSkill
- rnaseq-read-alignmentSkill
- rnaseq-read-countingSkill
- rnaseq-transcript-quantificationSkill
- rpsblast-assistantSkill
- scrnaseq-cellranger-countSkill
- scrnaseq-cell-type-annotationSkill
- scrnaseq-clusteringSkill
- scrnaseq-differential-expressionSkill
- scrnaseq-integrationSkill
- scrnaseq-quality-controlSkill
- scrnaseq-trajectory-analysisSkill
- search-enaSkill
- search-geoSkill
- search-gsaSkill
- search-ncbi-datasetsSkill
- search-sraSkill
- stat-analyze-distributionSkill
- stat-assess-data-qualitySkill
- stat-bayesian-estimationSkill
- stat-cluster-samplesSkill
- stat-compare-multiple-groupsSkill
- stat-compare-two-groupsSkill
- stat-fit-glmSkill
- stat-fit-linear-modelSkill
- stat-learn-bayesian-networkSkill
- stat-logistic-regressionSkill
- stat-nonlinear-embeddingSkill
- stat-pairwise-correlationSkill
- stat-pcaSkill
- stat-survival-analysisSkill
- structured-intelligence-skill-creatorSkill
- <skill-id>Skill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
Run samtools stats and samtools flagstat for mapping summary.
- Very specific: line 29
Run samtools idxstats for per-chromosome read counts.
- Very specific: line 30
Run mosdepth for coverage distribution (genome-wide, or restricted to target BED).
- Distinctive: line 31
If target BED provided: compute on-target rate and per-target coverage statistics.
- Very specific: line 32
Run picard CollectInsertSizeMetrics for insert size distribution.
- Very specific: line 33
Run picard CollectAlignmentSummaryMetrics for detailed alignment statistics.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Skill: genome-alignment-qc
Use When
- User wants to evaluate BAM quality before variant calling.
- User needs to assess coverage depth and uniformity across the genome or target regions.
- User wants to check mapping rate, duplication rate, and insert size distribution.
- User needs to calculate on-target rate for whole-exome sequencing (WES).
- User wants to compare QC metrics across samples to detect batch effects.
Inputs
- Required:
- BAM file with index (
.bam+.bai).
- BAM file with index (
- Optional:
- Target BED file (for WES on-target metrics).
- Reference FASTA (required for picard metrics).
- Output directory (default: current directory).
- Per-base coverage flag (enables mosdepth per-base output; default: off).
Workflow
- Run
samtools statsandsamtools flagstatfor mapping summary. - Run
samtools idxstatsfor per-chromosome read counts. - Run
mosdepthfor coverage distribution (genome-wide, or restricted to target BED). - If target BED provided: compute on-target rate and per-target coverage statistics.
- Run
picard CollectInsertSizeMetricsfor insert size distribution. - Run
picard CollectAlignmentSummaryMetricsfor detailed alignment statistics. - Compile summary: mapping rate, duplicate rate, mean coverage, coverage uniformity (CV), median insert size, on-target rate (if WES).
- Flag metrics outside recommended thresholds (see
knowledge/sources/genomics/quality-thresholds.md).
Output Contract
samtools statsandsamtools flagstatoutput files.mosdepthcoverage files (.mosdepth.global.dist.txt,.per-base.bed.gzif enabled).- Picard insert size metrics file and histogram.
- Picard alignment summary metrics file.
- Compiled QC summary with key metrics and threshold flags.
Limits
- samtools, mosdepth, and picard must be installed and available on
$PATH. - mosdepth per-base output can be very large for WGS (~10 GB for 30x human).
- Picard requires a Java runtime (Java 8+).
- Reference FASTA is required for picard metrics but not for samtools/mosdepth.
- This skill reports metrics for a single BAM; multi-sample comparison is out of scope.
- Common failure cases:
- BAM index (
.bai) missing or out of date relative to the BAM file. - Target BED file using different chromosome naming convention than the BAM (e.g.,
chr1vs1). - Picard failing due to missing reference FASTA sequence dictionary (
.dict).
- BAM index (
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

