genome-read-alignment
Skill4 starsChanged 12 days agoMITView on GitHub
Align short reads to a reference genome with BWA-MEM2, sort and index with samtools, and mark duplicates with 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-alignment-qcSkill
- 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
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read group string (@RG\tID:...\tSM:...\tPL:...\tLB:...\tPU:...).
- Very specific: line 32
Run bwa-mem2 mem with the read group, piping output to samtools sort to produce a coordinate-sorted BAM.
- Distinctive: line 54
Read group string malformed or missing required fields (ID, SM).
≈ “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-read-alignment
Use When
- User needs to align FASTQ reads to a reference genome.
- User wants to produce a coordinate-sorted, indexed BAM file.
- User needs to mark PCR or optical duplicates in aligned reads.
- User wants to add read group information (@RG) to alignments.
Inputs
- Required:
- Trimmed FASTQ file(s) (single-end or paired-end).
- Reference FASTA, pre-indexed for BWA-MEM2.
- Optional:
- Read group string (
@RG\tID:...\tSM:...\tPL:...\tLB:...\tPU:...). - Number of threads (default: 4).
- Output directory (default: current directory).
- Temporary directory for sorting/dedup intermediates.
- Optical duplicate pixel distance (default: 2500 for patterned flowcells).
- Mark-duplicate tool choice:
picard(default) orsamtools markdup.
- Read group string (
Workflow
- Validate that reference index files exist (
.0123,.amb,.ann,.bwt.2bit.64,.pac,.fai,.dict). - Construct a read group string from sample metadata if one is not provided (fields: ID, SM, PL, LB, PU).
- Run
bwa-mem2 memwith the read group, piping output tosamtools sortto produce a coordinate-sorted BAM. - Index the sorted BAM with
samtools index. - Mark duplicates with
picard MarkDuplicates(orsamtools markdupif selected). - Index the deduplicated BAM.
- Report alignment summary: total reads, mapped reads, properly paired reads, duplicate reads, mapping rate.
Output Contract
- Coordinate-sorted deduplicated BAM file (
.bam). - BAM index file (
.bai). - Duplicate metrics file (picard MarkDuplicates output).
- Alignment summary statistics (total, mapped, properly paired, duplicates, mapping rate).
Limits
- BWA-MEM2, samtools, and picard must be installed and available on
$PATH. - The BWA-MEM2 index must be pre-built (
bwa-mem2 index <ref.fa>). - Memory scales with reference genome size (~8 GB for human GRCh38).
- Picard requires a Java runtime (Java 8+).
- This skill handles single-sample alignment only; multi-sample merging is out of scope.
- Common failure cases:
- Reference index files missing or incomplete (e.g.,
.bwt.2bit.64absent). - Read group string malformed or missing required fields (ID, SM).
- Insufficient memory for BWA-MEM2 index loading (~8 GB for human genome).
- Reference index files missing or incomplete (e.g.,
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.

