Skip to content
bedtools - the swiss army knife for genome arithmetic
C C++ Shell Makefile HTML Roff Other
Branch: master
Clone or download
arq5x Merge pull request #782 from 38/master
Fix issue 767 and 768
Latest commit ea5e914 Oct 26, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
data sync docs Dec 9, 2013
docs update docs for 2.29.0 Sep 3, 2019
genomes tab delimited mm10 Jan 2, 2016
scripts add a 'shift' tool Jan 19, 2016
src Merge pull request #782 from 38/master Oct 26, 2019
test Fix issue 767 and 768 Oct 25, 2019
tutorial Finished the stream transformer Feb 28, 2018
.gitignore Remove erroneously-committed test files Mar 25, 2019
.travis.yml Try running tests on OSX Mar 23, 2019
LICENSE change to MIT license Apr 24, 2019
Makefile Bug fix: issue762 support bam that has no text header Sep 17, 2019 update README Sep 3, 2019
a.bed Add test case Oct 23, 2019
b.bed Add test case Oct 23, 2019


bedtools - the swiss army knife for genome arithmetic

Download current version



Collectively, the bedtools utilities are a swiss-army knife of tools for a wide-range of genomics analysis tasks. The most widely-used tools enable genome arithmetic: that is, set theory on the genome. For example, bedtools allows one to intersect, merge, count, complement, and shuffle genomic intervals from multiple files in widely-used genomic file formats such as BAM, BED, GFF/GTF, VCF.

While each individual tool is designed to do a relatively simple task (e.g., intersect two interval files), quite sophisticated analyses can be conducted by combining multiple bedtools operations on the UNIX command line.


As of version 2.18, bedtools is substantially more scalable thanks to improvements we have made in the algorithm used to process datasets that are pre-sorted by chromosome and start position. As you can see in the plots below, the speed and memory consumption scale nicely with sorted data as compared to the poor scaling for unsorted data. The current version of bedtools intersect is as fast as (or slightly faster) than the bedops package's bedmap which uses a similar algorithm for sorted data. The plots below represent counting the number of intersecting alignments from exome capture BAM files against CCDS exons. The alignments have been converted to BED to facilitate comparisons to bedops. We compare to the bedmap --ec option because similar error checking is enforced by bedtools.

Note: bedtools could not complete when using 100 million alignments and the R-Tree algorithm used for unsorted data.

Speed Comparison Memory Comparison


First created through urgency and adrenaline by Aaron Quinlan Spring 2009. Maintained by the Quinlan Laboratory at the University of Virginia.

  1. Lead developers: Aaron Quinlan, Hao Hoou, Brent Pedersen, Neil Kindlon
  2. Significant contributions: Assaf Gordon, Royden Clark, John Marshall, Brent Pedersen, Ryan Dale
  3. Repository:
  4. Stable releases:
  5. Documentation:
  6. License: Released under MIT license


Please cite the following article if you use BEDTools in your research:

  • Quinlan AR and Hall IM, 2010. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics. 26, 6, pp. 841–842.

Also, if you use pybedtools, please cite the following.

  • Dale RK, Pedersen BS, and Quinlan AR. Pybedtools: a flexible Python library for manipulating genomic datasets and annotations. Bioinformatics (2011). doi:10.1093/bioinformatics/btr539
You can’t perform that action at this time.