Skip to content

vimalinx/bio-agent / .claude/skills/bedtools

bedtools

Unverified

Use when performing genome arithmetic on interval files (BED, BAM, BEDGRAPH), including intersection, merging, coverage, format conversion, or sequence extraction.

bedtools

Quick Start

  • Command: bedtools <subcommand> [options]
  • Local executable: /home/vimalinx/miniforge3/envs/bio/bin/bedtools
  • Version: 2.31.1
  • Full reference: See references/help.md for complete subcommand list and options

When To Use This Tool

  • Perform interval arithmetic on BED/BAM/BEDGRAPH/GFF-like genomic coordinates.
  • This is the default tool for overlap, merge, coverage, complement, and FASTA extraction tasks.
  • Use it whenever the job is fundamentally about genomic intervals rather than alignments or variants.
  • Choose the subcommand first; bedtools is a toolbox, not one operation.

Common Patterns

# 1) Intersect peaks with genes
bedtools intersect -a peaks.bed -b genes.bed > peaks_in_genes.bed
# 2) Merge overlapping intervals
bedtools merge -i intervals.sorted.bed > intervals.merged.bed
# 3) Compute coverage of intervals by alignments
bedtools coverage -a targets.bed -b sample.sorted.bam > targets.coverage.tsv
# 4) Extract sequences from a reference FASTA
bedtools getfasta -fi genome.fa -bed regions.bed -fo regions.fa

Recommended Workflow

  1. Make sure coordinate systems, chromosome names, and genome assembly all match.
  2. Sort interval inputs whenever the subcommand expects sorted data.
  3. Pick the specific subcommand that matches the biological question.
  4. Validate output shape and coordinate sanity before chaining into another tool.

Guardrails

  • BEDTools assumes interval semantics are correct; mixed assemblies or chr naming mismatches will silently distort results.
  • Many operations behave best or only correctly with sorted input.
  • Some interval-manipulation subcommands need a genome file for chromosome lengths.
  • Always check subcommand-specific help, because required flags differ substantially across subcommands.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 318kUpdated Claude CodeCodexUnverifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 318kUpdated Claude CodeCodexUnverifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 318kUpdated Claude CodeCodexUnverifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 196kUpdated Claude CodeCodexVerifiedInstall