Skip to content
Snippets Groups Projects
==============================
===        BEDTools        ===
==============================

Created by Aaron Quinlan Spring 2009.
Copyright 2009 Aaron Quinlan. All rights reserved.
http://code.google.com/p/bedtools

Released under GNU public license version 2 (GPL v2).

===Summary===  
BEDTools is a collection of utilities for comparing, summarizing, and 
intersecting genomic features in the ubiquitous UCSC Genome Browser BED format. 


===BEDTools===

intersectBed			Returns overlaps between two BED files.
pairToBed				Returns overlaps between a paired-end BED file and a regular BED file.
pairToPair				Returns overlaps between two paired-end BED files.
windowBed				Returns overlaps between two BED files within a user-defined window.
closestBed				Returns the closest feature to each entry in a BED file.
subtractBed				Removes the portion of an interval that is overlapped by another feature.
mergeBed				Merges overlapping features into a single feature.
coverageBed				Summarizes the depth and breadth of coverage of features in one BED file versus genomic intervals defined in another.
genomeCoverageBed		Creates either a histogram or a "per base" report of genome coverage.
fastaFromBed			Creates FASTA sequences from intervals define in a BED file.
maskFastaFromBed		Mask a fasta file based on BED coordinates.
shuffleBed				Randomly permute the locations of a BED (-i) file among a genome.
slopBed					Adjust each BED entry by a requested number of base pairs.
sortBed					Sorts a BED file by genomic position or size.
linksBed				Creates an HTML file of links to the UCSC or a custom browser.
complementBed			Returns all genomic intervals not spanned by the features in a BED file.


===Installation===
1.  Unpack the source downloaded tarball.
2.  cd into the expanded folder.
3.  Type "make clean" and hit enter.
4.  Type "make all" and hit enter.
5.  If you encountered no errors, then all of the BED Tools should now be in bin/
	If not, try to troubleshoot then email me: aaronquinlan at gmail dot com
6.  Copy the files in bin/ to ~/bin or if you have the privileges, to /usr/local/bin.
7.  Use the tools.


===Acknowledgments=== 
1.  Jim Kent, UCSC.  
Much of the code herein is based upon the genome binning algorithm that Jim developed for the UCSC Browser.  I am grateful for the clear explanation of the method and the open source code base.

2.  Michael Stromberg, Boston College.
I learned much of what I know about C++ style from Michael Stromberg.  I was formerly a C and Perl 
programmer and struggled to switch to C++.  The structure of BEDTools and much of the coding style
emulates Michael's. Thanks Mike!

3.  Galaxy.  
I had been using Galaxy for months prior to writing these tools.  Much of the functionality is based on what is
available on the Galaxy website.  I merely found it too slow to do several iterations of queries on a website,
especially with large sequencing datasets.  Regardless, I am grateful to the Galaxy team for creating such a
useful site.

4.  Ira Hall, UVa.
Discussions between Ira and I are largely the motivation for these tools.  We are frequently tracking 
down ad hoc ideas and these tools were originally designed to facilitate such tangents.

5.  Royden Clark, UVa
Royden is the resident UCSC browser expert.  He has helped me immensely by teaching me how to squeeze every last bit of functionality from the browser.  Also, the algorithmic concept behind the genomeCoverageBed program is Royden's.

6.  Fitz Elliot, UVa
Fitz kindly taught me the ways of version control with git.  For those that are constantly confused by CVS and SVN, try git. I think you'll be happy.  

7. Loyal Goff, CSAIL, Broad.
Many thanks to Loyal for his assistance in making BED Tools "compilable" on the SUSE platform.  I appreciate your help and patience.


===Requests===
I would be grateful to learn of any problems or suggestions you have for improving these tools.