bio-genome-intervals-interval-arithmetic
Core interval arithmetic operations including intersect, subtract, merge, complement, map, and groupby using bedtools and pybedtools. Use when finding overlapping regions, removing overlaps, combining adjacent intervals, or transferring annotations between interval files.
npx skills add BioTender-max/awesome-bio-agent-skills --skill interval-arithmetic --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. # Interval Arithmetic **"Perform set operations on genomic intervals"** → Intersect, subtract, merge, or complement BED/GFF intervals to identify overlapping or unique regions. - CLI: `bedtools intersect -a file1.bed -b file2.bed`, `bedtools merge`, `bedtools subtract` - Python: `a.intersect(b)`, `a.subtract(b)`, `a.merge()` (pybedtools) Core set operations on genomic intervals using bedtools (CLI) and pybedtools (Python). ## Intersect - Find Overlapping Regions ### CLI ```bash # Find overlapping intervals (report A entries that overlap B) bedtools intersect -a peaks.bed -b genes.bed > overlapping.bed # Report original A intervals (default behavior) bedtools intersect -a peaks.bed -b genes.bed > peaks_in_genes.bed # Report overlapping
- Version Compatibility
- Intersect - Find Overlapping Regions
- CLI
- Python
- Subtract - Remove Overlapping Regions
- Merge - Combine Overlapping/Adjacent Intervals
- Complement - Get Uncovered Regions
- Cluster - Group Overlapping Intervals
- Multiinter - Find Multi-way Overlaps
- Jaccard - Similarity Metric
- Fisher's Exact Test
- Shuffle - Random Permutation
- Map - Transfer Values Between Files
- Map Operations
Find overlapping intervals (report A entries that overlap B) bedtools intersect -a peaks.bed -b genes.bed > overlapping.bed Report original A intervals (default behavior) bedtools intersect -a peaks.bed -b genes.bed > peaks_in_genes.bed Report overlapping portion only bedtools intersect -a peaks.bed -b genes.bed > overlap_regions.bed Report both A and B fields bedtools intersect -a peaks.bed -b genes.bed -wa -wb > with_gene_info.bed Write original A entries that overlap B (-u for unique) bedtools intersect -a peaks.bed -b genes.bed -u > peaks_overlapping_genes.bed
What does the bio-genome-intervals-interval-arithmetic skill do?
Core interval arithmetic operations including intersect, subtract, merge, complement, map, and groupby using bedtools and pybedtools. Use when finding overlapping regions, removing overlaps, combining adjacent intervals, or transferring annotations between interval files.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill interval-arithmetic --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.
