bio-genome-intervals-proximity-operations
Installation
SKILL.md
Version Compatibility
Reference examples tested with: bedtools 2.31+
Before using code patterns, verify installed versions match. If versions differ:
- Python:
pip show <package>thenhelp(module.function)to check signatures - CLI:
<tool> --versionthen<tool> --helpto 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.