vimalinx/bio-agent / .claude/skills/tag-bam
tag-bam
VerifiedUse when you need to annotate BAM alignments with a two-character tag based on overlaps with BED, GFF, or VCF annotation files, such as labeling reads by feature class or interval source.
tag-bam
Quick Start
- Command:
tagBam -i reads.bam -files annot1.bed annot2.bed -labels A1 A2 > tagged.bam - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/tagBam - Full reference: See
references/help.md
When To Use This Tool
- Label reads by which annotation tracks they overlap.
- Populate BAM tags from file labels, annotation names, or annotation scores.
- Add interval-derived metadata to alignments before downstream filtering or QC.
- Apply same-strand or opposite-strand overlap rules while tagging.
Common Patterns
# 1) Tag reads by which annotation file they overlap
tagBam \
-i reads.bam \
-files genes.bed repeats.bed \
-labels GENE REP \
> tagged.bam
# 2) Populate the tag with the annotation name field on the same strand
tagBam \
-i reads.bam \
-files exons.bed \
-labels EXON \
-names \
-s \
> reads.named-tags.bam
# 3) Record full interval payloads for debugging or provenance
tagBam \
-i reads.bam \
-files loci.bed \
-labels LOCUS \
-intervals \
-tag YK \
> reads.interval-tags.bam
Recommended Workflow
- Choose the annotation files that define the tag source and decide whether the payload should be file labels, annotation names, scores, or full intervals.
- Choose the output tag name with
-tagif the defaultYBis not appropriate. - Add overlap and strand constraints with
-f,-s, or-Sbefore writing the tagged BAM stream to a new file. - Inspect a few records with a BAM viewer or
samtools viewto confirm the expected tags were attached.
Guardrails
-iand-filesare required, and you must also provide a tag payload source via-labels,-names, or-scores.-intervalsstill requires-labelsso the tool can record which annotation file contributed the interval.- The command writes BAM to stdout; redirect to a file or pipe into another BAM-aware tool.
- Custom tags supplied with
-tagmust be exactly two characters. - If you use
-labels, provide one label per annotation file. - Prefer
-hfor help; GNU-style--helpand--versionemit wrapper errors before usage text.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |