vimalinx/bio-agent / .claude/skills/annot-tsv
annot-tsv
UnverifiedUse when you need to annotate regions in a target TSV/BED file with information from overlapping regions in a source file, transfer columns between files based on genomic overlap, or filter/drop overlapping records.
annot-tsv
CLI tool from htslib (1.22.1) that annotates regions in a target file using overlapping regions from a source file. Supports column transfer, conditional matching, special annotations (count, fraction, base pairs), and grep-like filtering. Coordinates are 1-based and inclusive by default.
Quick Start
- Command:
annot-tsv -s source.txt -t target.txt -c chr,beg,end -f info:INFO > output.txt - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/annot-tsv - Full reference: See
references/help.mdfor complete options and examples
When To Use This Tool
- Transferring annotation columns from a source file to overlapping regions in a target file
- Filtering records by overlap (print matching lines or drop overlapping regions with
-x) - Adding overlap statistics: count of overlapping regions (
cnt), fraction overlapped (frac), or base pairs overlapped (nbp) - Conditional annotation transfer requiring matching values in specified columns (
-m)
Common Patterns
# 1) Transfer INFO from overlapping source regions into the target table
annot-tsv \
-s source.txt \
-t target.txt \
-c chr,beg,end \
-f info:INFO \
> output.txt
# 2) Require matching type/sample columns before annotation transfer
annot-tsv \
-s src.txt.gz \
-t tgt.txt.gz \
-c chr,beg,end \
-m type,sample \
-f info
# 3) Use grep-like overlap filtering instead of column transfer
annot-tsv \
-s source.txt \
-t target.txt \
-c chr,beg,end \
-x
Recommended Workflow
- Identify the chromosome, start, and end column names/indices in both source and target files
- Determine which columns to transfer (
-f) and any required match conditions (-m) - Run a test annotation with a subset to verify column mapping and output format
- Execute the full annotation, redirecting stdout to output file or using
-o
Guardrails
- Coordinates are 1-based and inclusive by default; use
-Cto specify different conventions (e.g., BED is 0-based start) - Either source or target can be streamed from stdin, but not both simultaneously
- The
-x(drop overlaps) option is incompatible with-f(column transfer) - Use
--help, not-h, for usage output. Here-his the header-row option and requires an argument.
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: 192k | 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: 192k | 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: 192k | Updated | Claude CodeCodex | Verified | Install |