bio-genome-intervals-proximity-operations
Find nearest features, search within windows, and extend intervals using closest, window, flank, and slop operations. Use when performing TSS proximity analysis, assigning enhancers to genes, defining promoter regions, or finding nearby genomic features.
npx skills add BioTender-max/awesome-bio-agent-skills --skill proximity-operations --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.
## Version Compatibility Reference examples tested with: bedtools 2.31+ Before using code patterns, verify installed versions match. If versions differ: - Python: `pip show <package>` then `help(module.function)` to check signatures - CLI: `<tool> --version` then `<tool> --help` to confirm flags If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying. # Proximity Operations **"Find nearest features or extend intervals"** → Identify the closest genomic feature to each interval, or expand intervals by a fixed flank size. - CLI: `bedtools closest -a peaks.bed -b genes.bed`, `bedtools slop -b 1000` - Python: `a.closest(b)`, `a.slop(b=1000, g=genome)` (pybedtools) Operations for finding nearby features and extending intervals using bedtools and pybedtools. ## Closest - Find Nearest Feature ### CLI ```bash # Find nearest gene to each peak bedtools closest -a peaks.bed -b genes.bed > peaks_with_nearest.bed # Report distance to nearest feature bedtools closest -a peaks.bed -b genes.bed -d > with_distance.bed # Ignore overlapping features (find next nearest) bedtools closest -a peaks.bed -b
- Version Compatibility
- Closest - Find Nearest Feature
- CLI
- Python
- Window - Find Features Within Distance
- Slop - Extend Interval Boundaries
- Flank - Get Flanking Regions
- Shift - Move Intervals
- Common Patterns
- Find Peaks Within 10kb of TSS
- Create Promoter Regions
- Find Nearest Gene Within 100kb
- Enhancer-Gene Assignment
- Genome File Format
Find nearest gene to each peak bedtools closest -a peaks.bed -b genes.bed > peaks_with_nearest.bed Report distance to nearest feature bedtools closest -a peaks.bed -b genes.bed -d > with_distance.bed Ignore overlapping features (find next nearest) bedtools closest -a peaks.bed -b genes.bed -io > nearest_non_overlap.bed Ignore features on different strands bedtools closest -a peaks.bed -b genes.bed -s > same_strand.bed Ignore features on same strand (opposite strand only) bedtools closest -a peaks.bed -b genes.bed -S > opposite_strand.bed
What does the bio-genome-intervals-proximity-operations skill do?
Find nearest features, search within windows, and extend intervals using closest, window, flank, and slop operations. Use when performing TSS proximity analysis, assigning enhancers to genes, defining promoter regions, or finding nearby genomic features.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill proximity-operations --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 BioTender-max/awesome-bio-agent-skills, a repository with 135 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.
