Agent skill · Code Review & Quality

bio-alignment-filtering

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.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill alignment-filtering --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 7 KB
Bundled scripts: none
Path: skills/analysis/alignment-filtering/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Alignment Filtering Filter alignments by flags, quality, and regions using samtools and pysam. ## Filter Flags | Option | Description | |--------|-------------| | `-f FLAG` | Include reads with ALL bits set | | `-F FLAG` | Exclude reads with ANY bits set | | `-G FLAG` | Exclude reads with ALL bits set | | `-q MAPQ` | Minimum mapping quality | | `-L BED` | Include reads overlapping regions | ## Common FLAG Values | Flag | Hex | Meaning | |------|-----|---------| | 1 | 0x1 | Paired | | 2 | 0x2 | Proper pair | | 4 | 0x4 | Unmapped | | 8 | 0x8 | Mate unmapped | | 16 | 0x10 | Reverse strand | | 32 | 0x20 | Mate reverse strand | | 64 | 0x40 | First in pair (read1) | | 128 | 0x80 | Second in pair (read2) | | 256 | 0x100 | Secondary alignment | | 512 | 0x200 | Failed QC | | 1024 | 0x400 | Duplicate | | 2048 | 0x800 | Supplementary | ## Filter by FLAG ### Keep Only Mapped Reads ```bash samtools view -F 4 -o mapped.bam input.bam ``` ### Keep Only Unmapped Reads ```bash samtools view -f 4 -o unmapped.bam input.bam ``` ### Keep Only Properly Paired ```bash samtools view -f 2 -o proper.bam input.bam ``` ### Remove Duplicates ```bash samtools view -F 1024 -o nodup.bam input.bam ``` ### Remove

What's inside
Steps it walks through
  1. Filter Flags
  2. Common FLAG Values
  3. Filter by FLAG
  4. Keep Only Mapped Reads
  5. Keep Only Unmapped Reads
  6. Keep Only Properly Paired
  7. Remove Duplicates
  8. Remove Secondary and Supplementary
  9. Keep Only Primary Alignments
  10. Keep Read1 Only
  11. Keep Read2 Only
  12. Forward Strand Only
  13. Reverse Strand Only
  14. Filter by Mapping Quality
Ships with 1 file
  • metadata.json
Commands it runs
samtools view -F 4 -o mapped.bam input.bam
samtools view -f 4 -o unmapped.bam input.bam
samtools view -f 2 -o proper.bam input.bam
samtools view -F 1024 -o nodup.bam input.bam
samtools view -F 2304 -o primary.bam input.bam
samtools view -F 256 -F 2048 -o primary.bam input.bam
Or combined: -F 2304
samtools view -f 64 -o read1.bam input.bam
samtools view -f 128 -o read2.bam input.bam
samtools view -F 16 -o forward.bam input.bam
More from claude-skill-registry
All skills →
About this skill
What does the bio-alignment-filtering skill do?

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.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill alignment-filtering --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going