pybedtools is a Python wrapper for Aaron Quinlan's BEDtools and extends these "genome algebra" programs by offering feature-level manipulations from with Python. See full online documentation, including installation instructions, at http://packages.python.org/pybedtools/.
Created by Ryan Dale 2010. Copyright 2010, 2011, 2012 Ryan Dale, all rights reserved.
pybedtools is released under the GPLv2 license; see LICENSE.txt for more info.
Dale RK, Pedersen BS, and Quinlan AR. 2011. Pybedtools: a flexible Python library for manipulating genomic datasets and annotations. Bioinformatics 27(24):3423-3424.
And the BEDTools manuscript:
Quinlan AR and Hall IM, 2010. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics 26(6):841–842.