# bioinformatics-fundamentals

A skill that gives your agent the basics of SAM/BAM, AGP and sequencing. Useful when region filters return an empty BAM or break read pairs.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 440 installs · ★ 22
- Author: Delphine-L
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Delphine-L/claude_global/tree/HEAD/skills/bioinformatics/fundamentals/SKILL.md
- Updated: 2026-05-14
- HTML: https://affpapa.org/en/nevibecode/skills/bioinformatics-fundamentals

## What it does

The skill hands your agent reference knowledge for genomics: SAM bitwise flags, CIGAR, MAPQ, the AGP assembly format, and how PacBio HiFi, Hi-C and Illumina data behave. Inside are flag tables, breakdowns of common mistakes, and command patterns for `samtools` and `bamtools`. The agent pulls this in when you debug alignment, filtering or assembly coordinates.

The usual trap is filtering paired reads by region. Apply `-L` with a BED file first and then a pair filter, and the pairs fall apart — you get an empty file. The correct order is the reverse: `-f 2` first, region second. The skill explains why, and notes that `isProperPair` in `bamtools` is stricter than samtools `-f 2`.

It needs `Read`, `Grep`, `Glob` and `Bash`, since it reads files and runs commands like `samtools view`. One thing to keep in mind: Hi-C pairs are meant to land on distant loci, so region filtering breaks them more easily than anything else. Check pair counts before and after, don't trust the number at a glance.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Delphine-L/claude_global --skill bioinformatics-fundamentals -a claude-code
```
```bash
npx skills add Delphine-L/claude_global --skill fundamentals -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/fundamentals/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/fundamentals/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Delphine-L/claude_global --skill fundamentals -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/fundamentals/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Delphine-L/claude_global --skill fundamentals -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/fundamentals/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Delphine-L/claude_global fundamentals
```

2. **Manually: put the files in place**
- File: `.github/skills/fundamentals/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Delphine-L/claude_global --skill fundamentals -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Delphine-L/claude_global --path skills/bioinformatics/fundamentals
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/fundamentals/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Delphine-L/claude_global --skill fundamentals -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Delphine-L/claude_global/tree/HEAD/skills/bioinformatics/fundamentals/SKILL.md

## When to use it
- decode SAM bitwise flags and build the right combination
- fix an empty BAM after region filtering
- validate AGP coordinates and unloc assignments
- tell a proper pair from a flag match
- pick a mapper for HiFi, Hi-C or short reads

## Example prompts
- Why does samtools view with -L regions.bed give me an empty BAM on paired reads?
- Break down flags 99 and 147 — is that a proper pair?
- Check this AGP assembly file for coordinate and unloc errors

## Similar
- [pysam](https://affpapa.org/en/nevibecode/skills/pysam.md) — skill · 1900 installs
- [dbsnp-database](https://affpapa.org/en/nevibecode/skills/dbsnp-database.md) — skill · 2200 installs
- [tooluniverse-spatial-omics-analysis](https://affpapa.org/en/nevibecode/skills/tooluniverse-spatial-omics-analysis.md) — skill · 360 installs
- [ukb-topmed-phewas-skill](https://affpapa.org/en/nevibecode/skills/ukb-topmed-phewas-skill.md) — skill · 13 installs
- [clinvar-database](https://affpapa.org/en/nevibecode/skills/clinvar-database.md) — skill · 2200 installs
- [database-lookup](https://affpapa.org/en/nevibecode/skills/database-lookup.md) — skill · 2100 installs

From the same set: [delphine-l/claude_global](https://affpapa.org/en/nevibecode/by/delphine-l/claude_global.md) — 2 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
