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.
npx skills add majiayu000/claude-skill-registry --skill alignment-filtering --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- Filter Flags
- Common FLAG Values
- Filter by FLAG
- Keep Only Mapped Reads
- Keep Only Unmapped Reads
- Keep Only Properly Paired
- Remove Duplicates
- Remove Secondary and Supplementary
- Keep Only Primary Alignments
- Keep Read1 Only
- Keep Read2 Only
- Forward Strand Only
- Reverse Strand Only
- Filter by Mapping Quality
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
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.
