From 1cb82b334f087d978f48cebe7a66e1e3c1f21e7c Mon Sep 17 00:00:00 2001
From: Aaron <aaronquinlan@gmail.com>
Date: Mon, 23 Jul 2012 22:10:22 -0400
Subject: [PATCH] include html

---
 docs/_build/html/content/advanced-usage.html  | 181 ++++++
 docs/_build/html/content/annotateBed.html     | 224 ++++++++
 docs/_build/html/content/bamToBed.html        | 229 ++++++++
 docs/_build/html/content/bed12ToBed6.html     | 177 ++++++
 docs/_build/html/content/bedToBam.html        | 202 +++++++
 docs/_build/html/content/bedToIgv.html        | 200 +++++++
 docs/_build/html/content/bedtools-suite.html  | 162 ++++++
 docs/_build/html/content/closestBed.html      | 251 +++++++++
 docs/_build/html/content/complementBed.html   | 163 ++++++
 docs/_build/html/content/coverageBed.html     | 317 +++++++++++
 docs/_build/html/content/example-usage.html   | 314 +++++++++++
 docs/_build/html/content/fastafromBed.html    | 240 ++++++++
 docs/_build/html/content/general-usage.html   | 521 ++++++++++++++++++
 .../html/content/genomecoverageBed.html       | 257 +++++++++
 docs/_build/html/content/groupBy.html         | 324 +++++++++++
 docs/_build/html/content/installation.html    | 135 +++++
 docs/_build/html/content/intersectBed.html    | 500 +++++++++++++++++
 docs/_build/html/content/linksBed.html        | 200 +++++++
 .../_build/html/content/maskfastafromBed.html | 194 +++++++
 docs/_build/html/content/mergeBed.html        | 244 ++++++++
 docs/_build/html/content/overlap.html         | 173 ++++++
 docs/_build/html/content/overview.html        | 506 +++++++++++++++++
 docs/_build/html/content/pairToBed.html       | 495 +++++++++++++++++
 docs/_build/html/content/pairToPair.html      | 237 ++++++++
 docs/_build/html/content/quick-start.html     | 161 ++++++
 docs/_build/html/content/shuffleBed.html      | 274 +++++++++
 docs/_build/html/content/slopBed.html         | 216 ++++++++
 docs/_build/html/content/sortBed.html         | 211 +++++++
 docs/_build/html/content/subtractBed.html     | 207 +++++++
 docs/_build/html/content/unionBedGraphs.html  | 296 ++++++++++
 docs/_build/html/content/windowBed.html       | 297 ++++++++++
 docs/_build/html/genindex.html                | 100 ++++
 docs/_build/html/index.html                   | 139 +++++
 docs/_build/html/search.html                  | 104 ++++
 34 files changed, 8451 insertions(+)
 create mode 100644 docs/_build/html/content/advanced-usage.html
 create mode 100644 docs/_build/html/content/annotateBed.html
 create mode 100644 docs/_build/html/content/bamToBed.html
 create mode 100644 docs/_build/html/content/bed12ToBed6.html
 create mode 100644 docs/_build/html/content/bedToBam.html
 create mode 100644 docs/_build/html/content/bedToIgv.html
 create mode 100644 docs/_build/html/content/bedtools-suite.html
 create mode 100644 docs/_build/html/content/closestBed.html
 create mode 100644 docs/_build/html/content/complementBed.html
 create mode 100644 docs/_build/html/content/coverageBed.html
 create mode 100644 docs/_build/html/content/example-usage.html
 create mode 100644 docs/_build/html/content/fastafromBed.html
 create mode 100644 docs/_build/html/content/general-usage.html
 create mode 100644 docs/_build/html/content/genomecoverageBed.html
 create mode 100644 docs/_build/html/content/groupBy.html
 create mode 100644 docs/_build/html/content/installation.html
 create mode 100644 docs/_build/html/content/intersectBed.html
 create mode 100644 docs/_build/html/content/linksBed.html
 create mode 100644 docs/_build/html/content/maskfastafromBed.html
 create mode 100644 docs/_build/html/content/mergeBed.html
 create mode 100644 docs/_build/html/content/overlap.html
 create mode 100644 docs/_build/html/content/overview.html
 create mode 100644 docs/_build/html/content/pairToBed.html
 create mode 100644 docs/_build/html/content/pairToPair.html
 create mode 100644 docs/_build/html/content/quick-start.html
 create mode 100644 docs/_build/html/content/shuffleBed.html
 create mode 100644 docs/_build/html/content/slopBed.html
 create mode 100644 docs/_build/html/content/sortBed.html
 create mode 100644 docs/_build/html/content/subtractBed.html
 create mode 100644 docs/_build/html/content/unionBedGraphs.html
 create mode 100644 docs/_build/html/content/windowBed.html
 create mode 100644 docs/_build/html/genindex.html
 create mode 100644 docs/_build/html/index.html
 create mode 100644 docs/_build/html/search.html

diff --git a/docs/_build/html/content/advanced-usage.html b/docs/_build/html/content/advanced-usage.html
new file mode 100644
index 00000000..c00229ae
--- /dev/null
+++ b/docs/_build/html/content/advanced-usage.html
@@ -0,0 +1,181 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Advanced usage</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="prev" title="Example usage" href="example-usage.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="example-usage.html" title="Example usage"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="advanced-usage">
+<h1>Advanced usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="mask-all-regions-in-a-genome-except-for-targeted-capture-regions">
+<h2>7.1 Mask all regions in a genome except for targeted capture regions.<a class="headerlink" href="#mask-all-regions-in-a-genome-except-for-targeted-capture-regions" title="Permalink to this headline">¶</a></h2>
+<p># Add 500 bp up and downstream of each probe</p>
+<div class="highlight-python"><pre>slopBed -i probes.bed -b 500 &gt; probes.500bp.bed</pre>
+</div>
+<p># Get a BED file of all regions not covered by the probes (+500 bp up/down)</p>
+<div class="highlight-python"><pre>complementBed -i probes.500bp.bed -g hg18.genome &gt; probes.500bp.complement.bed</pre>
+</div>
+<p># Create a masked genome where all bases are masked except for the probes +500bp</p>
+<div class="highlight-python"><pre>maskFastaFromBed -in hg18.fa -bed probes.500bp.complement.bed -fo hg18.probecomplement.
+masked.fa</pre>
+</div>
+</div>
+<div class="section" id="screening-for-novel-snps">
+<h2>7.2 Screening for novel SNPs.<a class="headerlink" href="#screening-for-novel-snps" title="Permalink to this headline">¶</a></h2>
+<p># Find all SNPs that are not in dbSnp and not in the latest 1000 genomes calls</p>
+<div class="highlight-python"><pre>intersectBed -a snp.calls.bed -b dbSnp.bed -v | intersectBed -a stdin -b 1KG.bed
+-v &gt; snp.calls.novel.bed</pre>
+</div>
+<p>you can first use intersectBed with the &#8220;-f 1.0&#8221; option.</p>
+<div class="highlight-python"><pre>intersectBed -a features.bed -b windows.bed -f 1.0 | coverageBed -a stdin -b
+windows.bed &gt; windows.bed.coverage</pre>
+</div>
+</div>
+<div class="section" id="computing-the-coverage-of-bam-alignments-on-exons">
+<h2>7.4 Computing the coverage of BAM alignments on exons.<a class="headerlink" href="#computing-the-coverage-of-bam-alignments-on-exons" title="Permalink to this headline">¶</a></h2>
+<p># One can combine SAMtools with BEDtools to compute coverage directly from the BAM
+data by using bamToBed.</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam | coverageBed -a stdin -b exons.bed &gt; exons.bed.coverage</pre>
+</div>
+<p># Take it a step further and require that coverage be from properly-paired reads.</p>
+<div class="highlight-python"><pre>samtools view -bf 0x2 reads.bam | bamToBed -i stdin | coverageBed -a stdin -b
+exons.bed &gt; exons.bed.proper.coverage</pre>
+</div>
+</div>
+<div class="section" id="computing-coverage-separately-for-each-strand">
+<h2>7.5 Computing coverage separately for each strand.<a class="headerlink" href="#computing-coverage-separately-for-each-strand" title="Permalink to this headline">¶</a></h2>
+<p># Use grep to only look at forward strand features (i.e. those that end in &#8220;+&#8221;).</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam | grep \+$ | coverageBed -a stdin -b genes.bed &gt;
+genes.bed.forward.coverage</pre>
+</div>
+<p># Use grep to only look at reverse strand features (i.e. those that end in &#8220;-&#8221;).</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam | grep \-$ | coverageBed -a stdin -b genes.bed &gt;
+genes.bed.forward.coverage</pre>
+</div>
+</div>
+<div class="section" id="find-structural-variant-calls-that-are-private-to-one-sample">
+<h2>7.6 Find structural variant calls that are private to one sample.<a class="headerlink" href="#find-structural-variant-calls-that-are-private-to-one-sample" title="Permalink to this headline">¶</a></h2>
+<p># :</p>
+<div class="highlight-python"><pre>pairToPair -a sample1.sv.bedpe -b othersamples.sv.bedpe -type neither &gt;
+sample1.sv.private.bedpe</pre>
+</div>
+</div>
+<div class="section" id="exclude-sv-deletions-that-appear-to-be-alu-insertions-in-the-reference-genome">
+<h2>7.7 Exclude SV deletions that appear to be ALU insertions in the reference genome.<a class="headerlink" href="#exclude-sv-deletions-that-appear-to-be-alu-insertions-in-the-reference-genome" title="Permalink to this headline">¶</a></h2>
+<p># We&#8217;ll require that 90% of the inner span of the deletion be overlapped by a
+recent ALU.</p>
+<div class="highlight-python"><pre>pairToBed -a deletions.sv.bedpe -b ALUs.recent.bed -type notispan -f 0.80 &gt;
+deletions.notALUsinRef.bedpe</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Advanced usage</a><ul>
+<li><a class="reference internal" href="#mask-all-regions-in-a-genome-except-for-targeted-capture-regions">7.1 Mask all regions in a genome except for targeted capture regions.</a></li>
+<li><a class="reference internal" href="#screening-for-novel-snps">7.2 Screening for novel SNPs.</a></li>
+<li><a class="reference internal" href="#computing-the-coverage-of-bam-alignments-on-exons">7.4 Computing the coverage of BAM alignments on exons.</a></li>
+<li><a class="reference internal" href="#computing-coverage-separately-for-each-strand">7.5 Computing coverage separately for each strand.</a></li>
+<li><a class="reference internal" href="#find-structural-variant-calls-that-are-private-to-one-sample">7.6 Find structural variant calls that are private to one sample.</a></li>
+<li><a class="reference internal" href="#exclude-sv-deletions-that-appear-to-be-alu-insertions-in-the-reference-genome">7.7 Exclude SV deletions that appear to be ALU insertions in the reference genome.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="example-usage.html"
+                        title="previous chapter">Example usage</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/advanced-usage.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="example-usage.html" title="Example usage"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/annotateBed.html b/docs/_build/html/content/annotateBed.html
new file mode 100644
index 00000000..3ed77d0d
--- /dev/null
+++ b/docs/_build/html/content/annotateBed.html
@@ -0,0 +1,224 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.24 annotateBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="Example usage" href="example-usage.html" />
+    <link rel="prev" title="5.23 unionBedGraphs" href="unionBedGraphs.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="example-usage.html" title="Example usage"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="unionBedGraphs.html" title="5.23 unionBedGraphs"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="annotatebed">
+<h1>5.24 annotateBed<a class="headerlink" href="#annotatebed" title="Permalink to this headline">¶</a></h1>
+<p><strong>annotateBed</strong> annotates one BED/VCF/GFF file with the coverage and number of overlaps observed
+from multiple other BED/VCF/GFF files. In this way, it allows one to ask to what degree one feature
+coincides with multiple other feature types with a single command.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.24.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>annotateBed [OPTIONS] -i &lt;BED/GFF/VCF&gt; -files FILE1 FILE2 FILE3 ... FILEn</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-namesr</strong></td>
+<td>A list of names (one per file) to describe each file in -i. These names will be printed as a header line.</td>
+</tr>
+<tr class="row-odd"><td><strong>-counts</strong></td>
+<td>Report the count of features in each file that overlap -i. Default behavior is to report the fraction of -i covered by each file.</td>
+</tr>
+<tr class="row-even"><td><strong>-both</strong></td>
+<td>Report the count of features followed by the % coverage for each annotation file. Default is to report solely the fraction of -i covered by each file.</td>
+</tr>
+<tr class="row-odd"><td><strong>-s</strong></td>
+<td>Force strandedness. That is, only include hits in A that overlap B on the same strand. By default, hits are included without respect to strand.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior-annotate-one-file-with-coverage-from-others">
+<h2>5.24.2 Default behavior - annotate one file with coverage from others.<a class="headerlink" href="#default-behavior-annotate-one-file-with-coverage-from-others" title="Permalink to this headline">¶</a></h2>
+<p>By default, the fraction of each feature covered by each annotation file is reported after the complete
+feature in the file to be annotated.</p>
+<div class="highlight-python"><pre>cat variants.bed
+chr1 100  200   nasty 1  -
+chr2 500  1000  ugly  2  +
+chr3 1000 5000  big   3  -
+
+cat genes.bed
+chr1 150  200   geneA 1  +
+chr1 175  250   geneB 2  +
+chr3 0    10000 geneC 3  -
+
+cat conserve.bed
+chr1 0    10000 cons1 1  +
+chr2 700  10000 cons2 2  -
+chr3 4000 10000 cons3 3  +
+
+cat known_var.bed
+chr1 0    120   known1   -
+chr1 150  160   known2   -
+chr2 0    10000 known3   +
+
+annotateBed -i variants.bed -files genes.bed conserv.bed known_var.bed
+chr1 100  200  nasty 1 -  0.500000  1.000000  0.300000
+chr2 500  1000 ugly  2 +  0.000000  0.600000  1.000000
+chr3 1000 5000 big   3 -  1.000000  0.250000  0.000000</pre>
+</div>
+</div>
+<div class="section" id="report-the-count-of-hits-from-the-annotation-files">
+<h2>5.24.3 Report the count of hits from the annotation files<a class="headerlink" href="#report-the-count-of-hits-from-the-annotation-files" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>annotateBed -counts -i variants.bed -files genes.bed conserv.bed known_var.bed
+chr1 100  200  nasty 1 - 2 1 2
+chr2 500  1000 ugly  2 + 0 1 1
+chr3 1000 5000 big   3 - 1 1 0</pre>
+</div>
+</div>
+<div class="section" id="report-both-the-count-of-hits-and-the-fraction-covered-from-the-annotation-files">
+<h2>5.24.4 Report both the count of hits and the fraction covered from the annotation files<a class="headerlink" href="#report-both-the-count-of-hits-and-the-fraction-covered-from-the-annotation-files" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>annotateBed -both -i variants.bed -files genes.bed conserv.bed known_var.bed
+#chr start end  name  score +/-  cnt1 pct1     cnt2 pct2     cnt3 pct3
+chr1 100   200  nasty 1     -    2    0.500000 1    1.000000 2    0.300000
+chr2 500   1000 ugly  2     +    0    0.000000 1    0.600000 1    1.000000
+chr3 1000  5000 big   3     -    1    1.000000 1    0.250000 0    0.000000</pre>
+</div>
+</div>
+<div class="section" id="restrict-the-reporting-to-overlaps-on-the-same-strand">
+<h2>5.24.5 Restrict the reporting to overlaps on the same strand.<a class="headerlink" href="#restrict-the-reporting-to-overlaps-on-the-same-strand" title="Permalink to this headline">¶</a></h2>
+<p>Note: Compare with the result from 5.24.3</p>
+<div class="highlight-python"><pre>annotateBed -s -i variants.bed -files genes.bed conserv.bed known_var.bed
+chr1  100   200   nasty  var1  -  0.000000  0.000000  0.000000
+chr2  500   1000  ugly   var2  +  0.000000  0.000000  0.000000
+chr3  1000  5000  big    var3  -  1.000000  0.000000  0.000000</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.24 annotateBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.24.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior-annotate-one-file-with-coverage-from-others">5.24.2 Default behavior - annotate one file with coverage from others.</a></li>
+<li><a class="reference internal" href="#report-the-count-of-hits-from-the-annotation-files">5.24.3 Report the count of hits from the annotation files</a></li>
+<li><a class="reference internal" href="#report-both-the-count-of-hits-and-the-fraction-covered-from-the-annotation-files">5.24.4 Report both the count of hits and the fraction covered from the annotation files</a></li>
+<li><a class="reference internal" href="#restrict-the-reporting-to-overlaps-on-the-same-strand">5.24.5 Restrict the reporting to overlaps on the same strand.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="unionBedGraphs.html"
+                        title="previous chapter">5.23 unionBedGraphs</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="example-usage.html"
+                        title="next chapter">Example usage</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/annotateBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="example-usage.html" title="Example usage"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="unionBedGraphs.html" title="5.23 unionBedGraphs"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/bamToBed.html b/docs/_build/html/content/bamToBed.html
new file mode 100644
index 00000000..b9474496
--- /dev/null
+++ b/docs/_build/html/content/bamToBed.html
@@ -0,0 +1,229 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.4 bamToBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.5 windowBed" href="windowBed.html" />
+    <link rel="prev" title="5.3 pairToPair" href="pairToPair.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="windowBed.html" title="5.5 windowBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="pairToPair.html" title="5.3 pairToPair"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="bamtobed">
+<h1>5.4 bamToBed<a class="headerlink" href="#bamtobed" title="Permalink to this headline">¶</a></h1>
+<p><strong>bamToBed</strong> is a general purpose tool that will convert sequence alignments in BAM format to either
+BED6, BED12 or BEDPE format. This enables one to convert BAM files for use with all of the other
+BEDTools. The CIGAR string is used to compute the alignment end coordinate in an &#8220;ungapped&#8221;
+fashion. That is, match (&#8220;M&#8221;), deletion (&#8220;D&#8221;), and splice (&#8220;N&#8221;) operations are observed when computing
+alignment ends.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.4.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage:</strong></p>
+<div class="highlight-python"><pre>bamToBed [OPTIONS] -i &lt;BAM&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="3%" />
+<col width="97%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-bedpe</strong></td>
+<td><blockquote class="first">
+<div><dl class="docutils">
+<dt>Write BAM alignments in BEDPE format. Only one alignment from paired-end reads will be reported. Specifically, it each mate is aligned to the same chromosome, the BAM alignment reported will be the one where the BAM insert size is greater than zero. When the mate alignments are interchromosomal, the lexicographically lower chromosome will be reported first. Lastly, when an end is unmapped, the chromosome and strand will be set to &#8221;.&#8221; and the start and end coordinates will be set to -1. <em>By default, this is disabled and the output will be reported in BED format</em>.</dt>
+<dd><strong>NOTE: When using this option, it is required that the BAM file is sorted/grouped by the read name. This allows bamToBed to extract correct alignment coordinates for each end based on their respective CIGAR strings. It also assumes that the alignments for a given pair come in groups of twos. There is not yet a standard method for reporting multiple alignments using BAM. bamToBed will fail if an aligner does not report alignments in pairs</strong>.</dd>
+</dl>
+</div></blockquote>
+<p class="last">BAM files may be piped to bamToBed by specifying &#8220;-i stdin&#8221;. See example below.</p>
+</td>
+</tr>
+<tr class="row-odd"><td><strong>-bed12</strong></td>
+<td>Write &#8220;blocked&#8221; BED (a.k.a. BED12) format. This will convert &#8220;spliced&#8221; BAM alignments (denoted by the &#8220;N&#8221; CIGAR operation) to BED12.</td>
+</tr>
+<tr class="row-even"><td><strong>-ed</strong></td>
+<td>Use the &#8220;edit distance&#8221; tag (NM) for the BED score field. Default for BED is to use mapping quality. Default for BEDPE is to use the <em>minimum</em> of the two mapping qualities for the pair. When -ed is used with -bedpe, the total edit distance from the two mates is reported.</td>
+</tr>
+<tr class="row-odd"><td><strong>-tag</strong></td>
+<td>Use other <em>numeric</em> BAM alignment tag for BED score. Default for BED is to use mapping quality. Disallowed with BEDPE output.</td>
+</tr>
+<tr class="row-even"><td><strong>-color</strong></td>
+<td>An R,G,B string for the color used with BED12 format. Default is (255,0,0).</td>
+</tr>
+<tr class="row-odd"><td><strong>-split</strong></td>
+<td>Report each portion of a &#8220;split&#8221; BAM (i.e., having an &#8220;N&#8221; CIGAR operation) alignment as a distinct BED intervals.</td>
+</tr>
+</tbody>
+</table>
+<p>By default, each alignment in the BAM file is converted to a 6 column BED. The BED &#8220;name&#8221; field is
+comprised of the RNAME field in the BAM alignment. If mate information is available, the mate (e.g.,
+&#8220;/1&#8221; or &#8220;/2&#8221;) field will be appended to the name. The &#8220;score&#8221; field is the mapping quality score from the
+BAM alignment, unless the <strong>-ed</strong> option is used.</p>
+<p>Examples:</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam | head -5
+chr7   118970079   118970129   TUPAC_0001:3:1:0:1452#0/1   37   -
+chr7   118965072   118965122   TUPAC_0001:3:1:0:1452#0/2   37   +
+chr11  46769934    46769984    TUPAC_0001:3:1:0:1472#0/1   37   -
+
+bamToBed -i reads.bam -tag NM | head -5
+chr7   118970079   118970129   TUPAC_0001:3:1:0:1452#0/1   1    -
+chr7   118965072   118965122   TUPAC_0001:3:1:0:1452#0/2   3    +
+chr11  46769934    46769984    TUPAC_0001:3:1:0:1472#0/1   1    -
+
+bamToBed -i reads.bam -bedpe | head -3
+chr7   118965072   118965122   chr7   118970079   118970129
+       TUPAC_0001:3:1:0:1452#0 37     +     -
+chr11  46765606    46765656    chr11  46769934    46769984
+       TUPAC_0001:3:1:0:1472#0 37     +     -
+chr20  54704674    54704724    chr20  54708987    54709037
+       TUPAC_0001:3:1:1:1833#0 37     +</pre>
+</div>
+<p>One can easily use samtools and bamToBed together as part of a UNIX pipe. In this example, we will
+only convert properly-paired (BAM flag == 0x2) reads to BED format.</p>
+<div class="highlight-python"><pre>samtools view -bf 0x2 reads.bam | bamToBed -i stdin | head
+chr7   118970079   118970129   TUPAC_0001:3:1:0:1452#0/1   37   -
+chr7   118965072   118965122   TUPAC_0001:3:1:0:1452#0/2   37   +
+chr11  46769934    46769984    TUPAC_0001:3:1:0:1472#0/1   37   -
+chr11  46765606    46765656    TUPAC_0001:3:1:0:1472#0/2   37   +
+chr20  54704674    54704724    TUPAC_0001:3:1:1:1833#0/1   37   +
+chr20  54708987    54709037    TUPAC_0001:3:1:1:1833#0/2   37   -
+chrX   9380413     9380463     TUPAC_0001:3:1:1:285#0/1    0    -
+chrX   9375861     9375911     TUPAC_0001:3:1:1:285#0/2    0    +
+chrX   131756978   131757028   TUPAC_0001:3:1:2:523#0/1    37   +
+chrX   131761790   131761840   TUPAC_0001:3:1:2:523#0/2    37   -</pre>
+</div>
+</div>
+<div class="section" id="split-creating-bed12-features-from-spliced-bam-entries">
+<h2>5.4.2 (-split)Creating BED12 features from &#8220;spliced&#8221; BAM entries.<a class="headerlink" href="#split-creating-bed12-features-from-spliced-bam-entries" title="Permalink to this headline">¶</a></h2>
+<p>bamToBed will, by default, create a BED6 feature that represents the entire span of a spliced/split
+BAM alignment. However, when using the <strong>-split</strong> command, a BED12 feature is reported where BED
+blocks will be created for each aligned portion of the sequencing read.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Exons       ***************                                    **********
+
+BED/BAM A      ^^^^^^^^^^^^....................................^^^^
+
+Result      ===============                                    ====</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.4 bamToBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.4.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#split-creating-bed12-features-from-spliced-bam-entries">5.4.2 (-split)Creating BED12 features from &#8220;spliced&#8221; BAM entries.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="pairToPair.html"
+                        title="previous chapter">5.3 pairToPair</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="windowBed.html"
+                        title="next chapter">5.5 windowBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/bamToBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="windowBed.html" title="5.5 windowBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="pairToPair.html" title="5.3 pairToPair"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/bed12ToBed6.html b/docs/_build/html/content/bed12ToBed6.html
new file mode 100644
index 00000000..40a4c8af
--- /dev/null
+++ b/docs/_build/html/content/bed12ToBed6.html
@@ -0,0 +1,177 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.21 bed12ToBed6</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.22 groupBy" href="groupBy.html" />
+    <link rel="prev" title="5.20 bedToIgv" href="bedToIgv.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="groupBy.html" title="5.22 groupBy"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="bedToIgv.html" title="5.20 bedToIgv"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="bed12tobed6">
+<h1>5.21 bed12ToBed6<a class="headerlink" href="#bed12tobed6" title="Permalink to this headline">¶</a></h1>
+<p><strong>bed12ToBed6</strong> is a convenience tool that converts BED features in BED12 (a.k.a. &#8220;blocked&#8221; BED
+features such as genes) to discrete BED6 features. For example, in the case of a gene with six exons,
+bed12ToBed6 would create six separate BED6 features (i.e., one for each exon).</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.21.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>bed12ToBed6 [OPTIONS] -i &lt;BED12&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-i</strong></td>
+<td>The BED12 file that should be split into discrete BED6 features. <em>Use &#8220;stdin&#8221; when using piped input</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.21.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>head data/knownGene.hg18.chr21.bed | tail -n 3
+chr21 10079666  10120808   uc002yiv.1  0  -  10081686  1 0 1 2 0 6 0 8
+      0     4   528,91,101,215, 0,1930,39750,40927,
+chr21 10080031  10081687   uc002yiw.1  0  -  10080031  1 0 0 8 0 0 3 1
+      0     2   200,91,    0,1565,
+chr21 10081660  10120796   uc002yix.2  0  -  10081660  1 0 0 8 1 6 6 0
+      0     3   27,101,223,0,37756,38913,
+
+head data/knownGene.hg18.chr21.bed | tail -n 3 | bed12ToBed6 -i stdin
+chr21 10079666  10080194  uc002yiv.1 0  -
+chr21 10081596  10081687  uc002yiv.1 0  -
+chr21 10119416  10119517  uc002yiv.1 0  -
+chr21 10120593  10120808  uc002yiv.1 0  -
+chr21 10080031  10080231  uc002yiw.1 0  -
+chr21 10081596  10081687  uc002yiw.1 0  -
+chr21 10081660  10081687  uc002yix.2 0  -
+chr21 10119416  10119517  uc002yix.2 0  -
+chr21 10120573  10120796  uc002yix.2 0  -</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.21 bed12ToBed6</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.21.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.21.2 Default behavior</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="bedToIgv.html"
+                        title="previous chapter">5.20 bedToIgv</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="groupBy.html"
+                        title="next chapter">5.22 groupBy</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/bed12ToBed6.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="groupBy.html" title="5.22 groupBy"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="bedToIgv.html" title="5.20 bedToIgv"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/bedToBam.html b/docs/_build/html/content/bedToBam.html
new file mode 100644
index 00000000..cff13ae9
--- /dev/null
+++ b/docs/_build/html/content/bedToBam.html
@@ -0,0 +1,202 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.18 bedToBam</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.19 overlap" href="overlap.html" />
+    <link rel="prev" title="5.17 complementBed" href="complementBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="overlap.html" title="5.19 overlap"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="complementBed.html" title="5.17 complementBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="bedtobam">
+<h1>5.18 bedToBam<a class="headerlink" href="#bedtobam" title="Permalink to this headline">¶</a></h1>
+<p><strong>bedToBam</strong> converts features in a feature file to BAM format. This is useful as an efficient means of
+storing large genome annotations in a compact, indexed format for visualization purposes.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.18.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>bedToBam [OPTIONS] -i &lt;BED/GFF/VCF&gt; -g &lt;GENOME&gt; &gt; &lt;BAM&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="11%" />
+<col width="89%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-mapq</strong></td>
+<td>Set a mapping quality (SAM MAPQ field) value for all BED entries. <em>Default: 255</em></td>
+</tr>
+<tr class="row-odd"><td><strong>-ubam</strong></td>
+<td>Write uncompressed BAM output. The default is write compressed BAM output.</td>
+</tr>
+<tr class="row-even"><td><strong>-bed12</strong></td>
+<td>Indicate that the input BED file is in BED12 (a.k.a &#8220;blocked&#8221; BED) format. In this case, bedToBam will convert blocked BED features (e.g., gene annotaions) into &#8220;spliced&#8221; BAM alignments by creating an appropriate CIGAR string.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.18.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>The default behavior is to assume that the input file is in unblocked format. For example:</p>
+<div class="highlight-python"><pre>head -5 rmsk.hg18.chr21.bed
+chr21 9719768  9721892  ALR/Alpha  1004  +
+chr21 9721905  9725582  ALR/Alpha  1010  +
+chr21 9725582  9725977  L1PA3 3288 +
+chr21 9726021  9729309  ALR/Alpha  1051  +
+chr21 9729320  9729809  L1PA3 3897 -
+
+bedToBam -i rmsk.hg18.chr21.bed -g human.hg18.genome &gt; rmsk.hg18.chr21.bam
+
+samtools view rmsk.hg18.chr21.bam | head -5
+ALR/Alpha  0   chr21 9719769  255  2124M *  0  0  *  *
+ALR/Alpha  0   chr21 9721906  255  3677M *  0  0  *  *
+L1PA3      0   chr21 9725583  255  395M  *  0  0  *  *
+ALR/Alpha  0   chr21 9726022  255  3288M *  0  0  *  *
+L1PA3      16  chr21 9729321  255  489M  *  0  0  *  *</pre>
+</div>
+</div>
+<div class="section" id="creating-spliced-bam-entries-from-blocked-bed-features">
+<h2>5.18.3 Creating &#8220;spliced&#8221; BAM entries from &#8220;blocked&#8221; BED features<a class="headerlink" href="#creating-spliced-bam-entries-from-blocked-bed-features" title="Permalink to this headline">¶</a></h2>
+<p>Optionally, <strong>bedToBam</strong> will create spliced BAM entries from &#8220;blocked&#8221; BED features by using the
+-bed12 option. This will create CIGAR strings in the BAM output that will be displayed as &#8220;spliced&#8221;
+alignments. The image illustrates this behavior, as the top track is a BAM representation (using
+bedToBam) of a BED file of UCSC genes.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>bedToBam -i knownGene.hg18.chr21.bed -g human.hg18.genome -bed12 &gt; knownGene.bam
+
+samtools view knownGene.bam | head -2
+uc002yip.1  16   chr21 9928614   2                       5                        5
+
+298M1784N71M1411N93M3963N80M1927N106M3608N81M1769N62M11856N89M98N82M816N61M6910N65M
+738N64M146N100M1647N120M6478N162M1485N51M6777N60M9274N54M880N54M1229N54M2377N54M112
+68N58M2666N109M2885N158M     *   0  0  *  *
+uc002yiq.1  16   chr21 9928614   2                       5                        5
+
+298M1784N71M1411N93M3963N80M1927N106M3608N81M1769N62M11856N89M98N82M816N61M6910N65M
+738N64M146N100M1647N120M6478N162M1485N51M6777N60M10208N54M1229N54M2377N54M11268N58M
+2666N109M2885N158M       *   0   0  *  *</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.18 bedToBam</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.18.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.18.2 Default behavior</a></li>
+<li><a class="reference internal" href="#creating-spliced-bam-entries-from-blocked-bed-features">5.18.3 Creating &#8220;spliced&#8221; BAM entries from &#8220;blocked&#8221; BED features</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="complementBed.html"
+                        title="previous chapter">5.17 complementBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="overlap.html"
+                        title="next chapter">5.19 overlap</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/bedToBam.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="overlap.html" title="5.19 overlap"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="complementBed.html" title="5.17 complementBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/bedToIgv.html b/docs/_build/html/content/bedToIgv.html
new file mode 100644
index 00000000..3ffe4393
--- /dev/null
+++ b/docs/_build/html/content/bedToIgv.html
@@ -0,0 +1,200 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.20 bedToIgv</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.21 bed12ToBed6" href="bed12ToBed6.html" />
+    <link rel="prev" title="5.19 overlap" href="overlap.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="bed12ToBed6.html" title="5.21 bed12ToBed6"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="overlap.html" title="5.19 overlap"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="bedtoigv">
+<h1>5.20 bedToIgv<a class="headerlink" href="#bedtoigv" title="Permalink to this headline">¶</a></h1>
+<p><strong>bedToIgv</strong> creates an IGV (<a class="reference external" href="http://www.broadinstitute.org/igv/">http://www.broadinstitute.org/igv/</a>) batch script (see: <a class="reference external" href="http://">http://</a>
+www.broadinstitute.org/igv/batch for details) such that a ??snapshot?? will be taken at each features in a
+feature file. This is useful as an efficient means for quickly collecting images of primary data at several
+loci for subsequent screening, etc.</p>
+<p><strong>NOTE: One must use IGV version 1.5 or higher.</strong></p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.20.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>bedToIgv [OPTIONS] -i &lt;BED/GFF/VCF&gt; &gt; &lt;igv.batch&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="9%" />
+<col width="91%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-path</strong></td>
+<td>The full path to which the IGV snapshots should be written. <em>Default: ./</em></td>
+</tr>
+<tr class="row-odd"><td><strong>-sess</strong></td>
+<td>The full path to an existing IGV session file to be loaded prior to taking snapshots. <em>Default is for no session to be loaded and the assumption is that you already have IGV open and loaded with your relevant data prior to running the batch script</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-sort</strong></td>
+<td>The type of BAM sorting you would like to apply to each image. <strong>Valid sorting options</strong>: <em>base, position, strand, quality, sample, and readGroup Default is to apply no sorting at all</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-clps</strong></td>
+<td>Collapse the aligned reads prior to taking a snapshot. <em>Default is to not collapse</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-name</strong></td>
+<td>Use the &#8220;name&#8221; field (column 4) for each image&#8217;s filename. <em>Default is to use the &#8220;chr:start-pos.ext&#8221;</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-slop</strong></td>
+<td>Number of flanking base pairs on the left &amp; right of the image.</td>
+</tr>
+<tr class="row-even"><td><strong>-img</strong></td>
+<td>The type of image to be created. <strong>Valid options</strong>: <em>png, eps, svg Default is png</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.20.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>bedToIgv -i data/rmsk.hg18.chr21.bed | head -9
+snapshotDirectory ./
+goto chr21:9719768-9721892
+snapshot chr21:9719768-9721892.png
+goto chr21:9721905-9725582
+snapshot chr21:9721905-9725582.png
+goto chr21:9725582-9725977
+snapshot chr21:9725582-9725977.png
+goto chr21:9726021-9729309
+snapshot chr21:9726021-9729309.png</pre>
+</div>
+</div>
+<div class="section" id="using-a-bedtoigv-batch-script-within-igv">
+<h2>5.20.3 Using a bedToIgv batch script within IGV.<a class="headerlink" href="#using-a-bedtoigv-batch-script-within-igv" title="Permalink to this headline">¶</a></h2>
+<p>Once an IGV batch script has been created with <strong>bedToIgv</strong>, it is simply a matter of running it from
+within IGV.</p>
+<p>For example, first create the batch script:</p>
+<div class="highlight-python"><pre>bedToIgv -i data/rmsk.hg18.chr21.bed &gt; rmsk.igv.batch</pre>
+</div>
+<p>Then, open and launch the batch script from within IGV. This will immediately cause IGV to begin
+taking snapshots of your requested regions.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.20 bedToIgv</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.20.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.20.2 Default behavior</a></li>
+<li><a class="reference internal" href="#using-a-bedtoigv-batch-script-within-igv">5.20.3 Using a bedToIgv batch script within IGV.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="overlap.html"
+                        title="previous chapter">5.19 overlap</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="bed12ToBed6.html"
+                        title="next chapter">5.21 bed12ToBed6</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/bedToIgv.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="bed12ToBed6.html" title="5.21 bed12ToBed6"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="overlap.html" title="5.19 overlap"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/bedtools-suite.html b/docs/_build/html/content/bedtools-suite.html
new file mode 100644
index 00000000..ae9e0af5
--- /dev/null
+++ b/docs/_build/html/content/bedtools-suite.html
@@ -0,0 +1,162 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>The BEDTools suite</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="5.1 intersect" href="intersectBed.html" />
+    <link rel="prev" title="General usage" href="general-usage.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="intersectBed.html" title="5.1 intersect"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="general-usage.html" title="General usage"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="the-bedtools-suite">
+<h1>The BEDTools suite<a class="headerlink" href="#the-bedtools-suite" title="Permalink to this headline">¶</a></h1>
+<p>This section covers the functionality and default / optional usage for each of the available BEDTools.
+Example &#8220;figures&#8221; are provided in some cases in an effort to convey the purpose of the tool. The
+behavior of each available parameter is discussed for each tool in abstract terms. More concrete usage
+examples are provided in <strong>Section 6</strong>.</p>
+<div class="section" id="table-of-contents">
+<h2>Table of contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h2>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="intersectBed.html">5.1 intersect</a></li>
+<li class="toctree-l1"><a class="reference internal" href="pairToBed.html">5.2 pairToBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="pairToPair.html">5.3 pairToPair</a></li>
+<li class="toctree-l1"><a class="reference internal" href="bamToBed.html">5.4 bamToBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="windowBed.html">5.5 windowBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="closestBed.html">5.6 closestBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="subtractBed.html">5.7 subtractBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="mergeBed.html">5.8 mergeBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="coverageBed.html">5.9 coverageBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="genomecoverageBed.html">5.10 genomeCoverageBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="fastafromBed.html">5.11 fastaFromBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="maskfastafromBed.html">5.12 maskFastaFromBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="shuffleBed.html">5.13 shuffleBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="slopBed.html">5.14 slopBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="sortBed.html">5.15 sortBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="linksBed.html">5.16 linksBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="complementBed.html">5.17 complementBed</a></li>
+<li class="toctree-l1"><a class="reference internal" href="bedToBam.html">5.18 bedToBam</a></li>
+<li class="toctree-l1"><a class="reference internal" href="overlap.html">5.19 overlap</a></li>
+<li class="toctree-l1"><a class="reference internal" href="bedToIgv.html">5.20 bedToIgv</a></li>
+<li class="toctree-l1"><a class="reference internal" href="bed12ToBed6.html">5.21 bed12ToBed6</a></li>
+<li class="toctree-l1"><a class="reference internal" href="groupBy.html">5.22 groupBy</a></li>
+<li class="toctree-l1"><a class="reference internal" href="unionBedGraphs.html">5.23 unionBedGraphs</a></li>
+<li class="toctree-l1"><a class="reference internal" href="annotateBed.html">5.24 annotateBed</a></li>
+</ul>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">The BEDTools suite</a><ul>
+<li><a class="reference internal" href="#table-of-contents">Table of contents</a><ul>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="general-usage.html"
+                        title="previous chapter">General usage</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="intersectBed.html"
+                        title="next chapter">5.1 intersect</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/bedtools-suite.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="intersectBed.html" title="5.1 intersect"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="general-usage.html" title="General usage"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/closestBed.html b/docs/_build/html/content/closestBed.html
new file mode 100644
index 00000000..b03bc8da
--- /dev/null
+++ b/docs/_build/html/content/closestBed.html
@@ -0,0 +1,251 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.6 closestBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.7 subtractBed" href="subtractBed.html" />
+    <link rel="prev" title="5.5 windowBed" href="windowBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="subtractBed.html" title="5.7 subtractBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="windowBed.html" title="5.5 windowBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="closestbed">
+<h1>5.6 closestBed<a class="headerlink" href="#closestbed" title="Permalink to this headline">¶</a></h1>
+<p>Similar to <strong>intersectBed, closestBed</strong> searches for overlapping features in A and B. In the event that
+no feature in B overlaps the current feature in A, <strong>closestBed</strong> will report the <em>closest</em> (that is, least
+genomic distance from the start or end of A) feature in B. For example, one might want to find which
+is the closest gene to a significant GWAS polymorphism. Note that <strong>closestBed</strong> will report an
+overlapping feature as the closest&#8212;that is, it does not restrict to closest <em>non-overlapping</em> feature.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.6.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage:</strong></p>
+<div class="highlight-python"><pre>closestBed [OPTIONS] -a &lt;BED/GFF/VCF&gt; -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-s</strong></td>
+<td>Force strandedness. That is, find the closest feature in B overlaps A on the same strand. <em>By default, this is disabled</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-d</strong></td>
+<td>In addition to the closest feature in B, report its distance to A as an extra column. The reported distance for overlapping features will be 0.</td>
+</tr>
+<tr class="row-even"><td><strong>-t</strong></td>
+<td><p class="first">How ties for closest feature should be handled. This occurs when two features in B have exactly the same overlap with a feature in A. <em>By default, all such features in B are reported</em>.</p>
+<blockquote class="last">
+<div><p>Here are the other choices controlling how ties are handled:</p>
+<p><em>all-</em>   Report all ties (default).</p>
+<p><em>first-</em>   Report the first tie that occurred in the B file.</p>
+<p><em>last-</em>   Report the last tie that occurred in the B file.</p>
+</div></blockquote>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.6.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p><strong>closestBed</strong> first searches for features in B that overlap a feature in A. If overlaps are found, the feature
+in B that overlaps the highest fraction of A is reported. If no overlaps are found, <strong>closestBed</strong> looks for
+the feature in B that is <em>closest</em> (that is, least genomic distance to the start or end of A) to A. For
+example, in the figure below, feature B1 would be reported as the closest feature to A1.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BED FILE A                             *************
+
+BED File B         ^^^^^^^^                            ^^^^^^
+
+Result                                                 ======</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+
+cat B.bed
+chr1  500  1000
+chr1  1300 2000
+
+closestBed -a A.bed -b B.bed
+chr1  100  200  chr1  500  1000</pre>
+</div>
+</div>
+<div class="section" id="s-enforcing-strandedness">
+<h2>5.6.3 (-s)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#s-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as the -s option for intersectBed while scanning for the closest
+(overlapping or not) feature in B. See the discussion in the intersectBed section for details.</p>
+</div>
+<div class="section" id="t-controlling-how-ties-for-closest-are-broken">
+<h2>5.6.4 (-t)Controlling how ties for &#8220;closest&#8221; are broken<a class="headerlink" href="#t-controlling-how-ties-for-closest-are-broken" title="Permalink to this headline">¶</a></h2>
+<p>When there are two or more features in B that overlap the <em>same fraction</em> of A, <strong>closestBed</strong> will, by
+default, report both features in B. Imagine feature A is a SNP and file B contains genes. It can often
+occur that two gene annotations (e.g. opposite strands) in B will overlap the SNP. As mentioned, the
+default behavior is to report both such genes in B. However, the -t option allows one to optionally
+choose the just first or last feature (in terms of where it occurred in the input file, not chromosome
+position) that occurred in B.</p>
+<p>For example (note the difference between -l 200 and -l 300):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  101  rs1234
+
+cat B.bed
+chr1  0  1000  geneA  100  +
+chr1  0  1000  geneB  100  -
+
+closestBed -a A.bed -b B.bed
+chr1  100  101  rs1234  chr1  0  1000  geneA  100  +
+chr1  100  101  rs1234  chr1  0  1000  geneB  100  -
+
+closestBed -a A.bed -b B.bed -t all
+chr1  100  101  rs1234  chr1  0  1000  geneA  100  +
+chr1  100  101  rs1234  chr1  0  1000  geneB  100  -
+
+closestBed -a A.bed -b B.bed -t first
+chr1  100  101  rs1234  chr1  0  1000  geneA  100  +
+
+closestBed -a A.bed -b B.bed -t last
+chr1  100  101  rs1234  chr1  0  1000  geneB  100  -</pre>
+</div>
+</div>
+<div class="section" id="d-reporting-the-distance-to-the-closest-feature-in-base-pairs">
+<h2>5.6.5 (-d)Reporting the distance to the closest feature in base pairs<a class="headerlink" href="#d-reporting-the-distance-to-the-closest-feature-in-base-pairs" title="Permalink to this headline">¶</a></h2>
+<p>ClosestBed will optionally report the distance to the closest feature in the B file using the <strong>-d</strong> option.
+When a feature in B overlaps a feature in A, a distance of 0 is reported.</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  500  600
+
+cat B.bed
+chr1  500  1000
+chr1  1300 2000
+
+closestBed -a A.bed -b B.bed -d
+chr1  100  200  chr1  500  1000  300
+chr1  500  600  chr1  500  1000  0</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.6 closestBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.6.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.6.2 Default behavior</a></li>
+<li><a class="reference internal" href="#s-enforcing-strandedness">5.6.3 (-s)Enforcing &#8220;strandedness&#8221;</a></li>
+<li><a class="reference internal" href="#t-controlling-how-ties-for-closest-are-broken">5.6.4 (-t)Controlling how ties for &#8220;closest&#8221; are broken</a></li>
+<li><a class="reference internal" href="#d-reporting-the-distance-to-the-closest-feature-in-base-pairs">5.6.5 (-d)Reporting the distance to the closest feature in base pairs</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="windowBed.html"
+                        title="previous chapter">5.5 windowBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="subtractBed.html"
+                        title="next chapter">5.7 subtractBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/closestBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="subtractBed.html" title="5.7 subtractBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="windowBed.html" title="5.5 windowBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/complementBed.html b/docs/_build/html/content/complementBed.html
new file mode 100644
index 00000000..93daec4d
--- /dev/null
+++ b/docs/_build/html/content/complementBed.html
@@ -0,0 +1,163 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.17 complementBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.18 bedToBam" href="bedToBam.html" />
+    <link rel="prev" title="5.16 linksBed" href="linksBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="bedToBam.html" title="5.18 bedToBam"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="linksBed.html" title="5.16 linksBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="complementbed">
+<h1>5.17 complementBed<a class="headerlink" href="#complementbed" title="Permalink to this headline">¶</a></h1>
+<p><strong>complementBed</strong> returns the intervals in a genome that are not by the features in a feature file. An
+example usage of this tool would be to return the intervals of the genome that are not annotated as a
+repeat.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.17.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>complementBed [OPTIONS] -i &lt;BED/GFF/VCF&gt; -g &lt;GENOME&gt;</pre>
+</div>
+<p><strong>No additional options.</strong></p>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.17.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BED FILE A     *************   ***************     ******************
+
+Result      ===             ===               =====                  =======</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  400  500
+chr1  500  800
+
+cat my.genome
+chr1  1000
+
+complementBed -i A.bed -g my.genome
+chr1  0    100
+chr1  200  400
+chr1  800  1000</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.17 complementBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.17.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.17.2 Default behavior</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="linksBed.html"
+                        title="previous chapter">5.16 linksBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="bedToBam.html"
+                        title="next chapter">5.18 bedToBam</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/complementBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="bedToBam.html" title="5.18 bedToBam"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="linksBed.html" title="5.16 linksBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/coverageBed.html b/docs/_build/html/content/coverageBed.html
new file mode 100644
index 00000000..22e7da9d
--- /dev/null
+++ b/docs/_build/html/content/coverageBed.html
@@ -0,0 +1,317 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.9 coverageBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.10 genomeCoverageBed" href="genomecoverageBed.html" />
+    <link rel="prev" title="5.8 mergeBed" href="mergeBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="genomecoverageBed.html" title="5.10 genomeCoverageBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="mergeBed.html" title="5.8 mergeBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="coveragebed">
+<h1>5.9 coverageBed<a class="headerlink" href="#coveragebed" title="Permalink to this headline">¶</a></h1>
+<p><strong>coverageBed</strong> computes both the <em>depth</em> and <em>breadth</em> of coverage of features in file A across the features
+in file B. For example, <strong>coverageBed</strong> can compute the coverage of sequence alignments (file A) across 1
+kilobase (arbitrary) windows (file B) tiling a genome of interest. One advantage that <strong>coverageBed</strong>
+offers is that it not only <em>counts</em> the number of features that overlap an interval in file B, it also
+computes the fraction of bases in B interval that were overlapped by one or more features. Thus,
+<strong>coverageBed</strong> also computes the <em>breadth</em> of coverage for each interval in B.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.9.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>coverageBed [OPTIONS] -a &lt;BED/GFF/VCF&gt; -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="9%" />
+<col width="91%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-abam</strong></td>
+<td><blockquote class="first">
+<div>BAM file A. Each BAM alignment in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe: For example:</div></blockquote>
+<div class="last line-block">
+<div class="line">samtools view -b &lt;BAM&gt; | intersectBed -abam stdin -b genes.bed</div>
+</div>
+</td>
+</tr>
+<tr class="row-odd"><td><strong>-s</strong></td>
+<td>Force strandedness. That is, only features in A are only counted towards coverage in B if they are the same strand. <em>By default, this is disabled and coverage is counted without respect to strand</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-hist</strong></td>
+<td><p class="first">Report a histogram of coverage for each feature in B as well as a summary histogram for _all_ features in B.</p>
+<div class="line-block">
+<div class="line">Output (tab delimited) after each feature in B:</div>
+</div>
+<blockquote class="last">
+<div><div class="line-block">
+<div class="line">1) depth</div>
+<div class="line">2) # bases at depth</div>
+<div class="line">3) size of B</div>
+<div class="line">4) % of B at depth</div>
+</div>
+</div></blockquote>
+</td>
+</tr>
+<tr class="row-odd"><td><strong>-d</strong></td>
+<td>Report the depth at each position in each B feature. Positions reported are one based. Each position and depth follow the complete B feature.</td>
+</tr>
+<tr class="row-even"><td><strong>-split</strong></td>
+<td>Treat &#8220;split&#8221; BAM or BED12 entries as distinct BED intervals when computing coverage. For BAM files, this uses the CIGAR &#8220;N&#8221; and &#8220;D&#8221; operations to infer the blocks for computing coverage. For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12).</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.9.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>After each interval in B, <strong>coverageBed</strong> will report:</p>
+<ol class="arabic simple">
+<li>The number of features in A that overlapped (by at least one base pair) the B interval.</li>
+<li>The number of bases in B that had non-zero coverage from features in A.</li>
+<li>The length of the entry in B.</li>
+<li>The fraction of bases in B that had non-zero coverage from features in A.</li>
+</ol>
+<p>Below are the number of features in A (N=...) overlapping B and fraction of bases in B with coverage.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BED FILE B  ***************     ***************     ******    **************
+
+BED File A  ^^^^ ^^^^              ^^             ^^^^^^^^^    ^^^ ^^ ^^^^
+              ^^^^^^^^                                      ^^^^^ ^^^^^ ^^
+
+Result      [  N=3, 10/15 ]     [  N=1, 2/16 ]     [N=1,6/6]   [N=5, 11/12 ]</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  20  30
+chr1  30  40
+chr1  100 200
+
+cat B.bed
+chr1  0   100
+chr1  100 200
+chr2  0   100
+
+coverageBed -a A.bed -b B.bed
+chr1  0   100  3  30  100 0.3000000
+chr1  100 200  1  100 100 1.0000000
+chr2  0   100  0  0   100 0.0000000</pre>
+</div>
+</div>
+<div class="section" id="s-calculating-coverage-by-strand">
+<h2>5.9.4 (-s)Calculating coverage by strand<a class="headerlink" href="#s-calculating-coverage-by-strand" title="Permalink to this headline">¶</a></h2>
+<p>Use the &#8220;<strong>-s</strong>&#8221; option if one wants to only count coverage if features in A are on the same strand as the
+feature / window in B. This is especially useful for RNA-seq experiments.</p>
+<p>For example (note the difference in coverage with and without <strong>-s</strong>:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20  a1  1  -
+chr1  20  30  a2  1  -
+chr1  30  40  a3  1  -
+chr1  100 200 a4  1  +
+
+cat B.bed
+chr1  0   100 b1  1  +
+chr1  100 200 b2  1  -
+chr2  0   100 b3  1  +
+
+coverageBed -a A.bed -b B.bed
+chr1  0   100 b1  1  +  3  30  100  0.3000000
+chr1  100 200 b2  1  -  1  100 100  1.0000000
+chr2  0   100 b3  1  +  0  0   100  0.0000000
+
+coverageBed -a A.bed -b B.bed -s
+chr1  0   100 b1  1  +  0  0   100  0.0000000
+chr1  100 200 b2  1  -  0  0   100  0.0000000
+chr2  0   100 b3  1  +  0  0   100  0.0000000</pre>
+</div>
+</div>
+<div class="section" id="hist-creating-a-histogram-of-coverage-for-each-feature-in-the-b-file">
+<h2>5.9.5 (-hist)Creating a histogram of coverage for each feature in the B file<a class="headerlink" href="#hist-creating-a-histogram-of-coverage-for-each-feature-in-the-b-file" title="Permalink to this headline">¶</a></h2>
+<p>One should use the &#8220;<strong>-hist</strong>&#8221; option to create, for each interval in B, a histogram of coverage of the
+features in A across B.</p>
+<p>In this case, each entire feature in B will be reported, followed by the depth of coverage, the number of
+bases at that depth, the size of the feature, and the fraction covered. After all of the features in B have
+been reported, a histogram summarizing the coverage among all features in B will be reported.</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20  a1  1  -
+chr1  20  30  a2  1  -
+chr1  30  40  a3  1  -
+chr1  100 200 a4  1  +
+
+cat B.bed
+chr1  0   100 b1  1  +
+chr1  100 200 b2  1  -
+chr2  0   100 b3  1  +
+
+coverageBed -a A.bed -b B.bed -hist
+chr1  0   100 b1  1  +  0  70  100  0.7000000
+chr1  0   100 b1  1  +  1  30  100  0.3000000
+chr1  100 200 b2  1  -  1  100 100  1.0000000
+chr2  0   100 b3  1  +  0  100 100  1.0000000
+all   0   170 300 0.5666667
+all   1   130 300 0.4333333</pre>
+</div>
+</div>
+<div class="section" id="hist-reporting-the-per-base-of-coverage-for-each-feature-in-the-b-file">
+<h2>5.9.6 (-hist)Reporting the per-base of coverage for each feature in the B file<a class="headerlink" href="#hist-reporting-the-per-base-of-coverage-for-each-feature-in-the-b-file" title="Permalink to this headline">¶</a></h2>
+<p>One should use the &#8220;<strong>-d</strong>&#8221; option to create, for each interval in B, a detailed list of coverage at each of the
+positions across each B interval.</p>
+<p>The output will consist of a line for each one-based position in each B feature, followed by the coverage
+detected at that position.</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  0  5
+chr1  3  8
+chr1  4  8
+chr1  5  9
+
+cat B.bed
+chr1  0  10
+
+coverageBed -a A.bed -b B.bed -d
+chr1  0  10  B  1  1
+chr1  0  10  B  2  1
+chr1  0  10  B  3  1
+chr1  0  10  B  4  2
+chr1  0  10  B  5  3
+chr1  0  10  B  6  3
+chr1  0  10  B  7  3
+chr1  0  10  B  8  3
+chr1  0  10  B  9  1
+chr1  0  10  B  10 0</pre>
+</div>
+</div>
+<div class="section" id="split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features">
+<h2>5.9.7 (-split)Reporting coverage with spliced alignments or blocked BED features<a class="headerlink" href="#split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features" title="Permalink to this headline">¶</a></h2>
+<p>As described in section 1.3.19, coverageBed will, by default, screen for overlaps against the entire span
+of a spliced/split BAM alignment or blocked BED12 feature. When dealing with RNA-seq reads, for
+example, one typically wants to only tabulate coverage for the portions of the reads that come from
+exons (and ignore the interstitial intron sequence). The <strong>-split</strong> command allows for such coverage to be
+performed.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.9 coverageBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.9.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.9.2 Default behavior</a></li>
+<li><a class="reference internal" href="#s-calculating-coverage-by-strand">5.9.4 (-s)Calculating coverage by strand</a></li>
+<li><a class="reference internal" href="#hist-creating-a-histogram-of-coverage-for-each-feature-in-the-b-file">5.9.5 (-hist)Creating a histogram of coverage for each feature in the B file</a></li>
+<li><a class="reference internal" href="#hist-reporting-the-per-base-of-coverage-for-each-feature-in-the-b-file">5.9.6 (-hist)Reporting the per-base of coverage for each feature in the B file</a></li>
+<li><a class="reference internal" href="#split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features">5.9.7 (-split)Reporting coverage with spliced alignments or blocked BED features</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="mergeBed.html"
+                        title="previous chapter">5.8 mergeBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="genomecoverageBed.html"
+                        title="next chapter">5.10 genomeCoverageBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/coverageBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="genomecoverageBed.html" title="5.10 genomeCoverageBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="mergeBed.html" title="5.8 mergeBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/example-usage.html b/docs/_build/html/content/example-usage.html
new file mode 100644
index 00000000..452e45cf
--- /dev/null
+++ b/docs/_build/html/content/example-usage.html
@@ -0,0 +1,314 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Example usage</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="Advanced usage" href="advanced-usage.html" />
+    <link rel="prev" title="5.24 annotateBed" href="annotateBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="advanced-usage.html" title="Advanced usage"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="annotateBed.html" title="5.24 annotateBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="example-usage">
+<h1>Example usage<a class="headerlink" href="#example-usage" title="Permalink to this headline">¶</a></h1>
+<p>Below are several examples of basic BEDTools usage. Example BED files are provided in the
+/data directory of the BEDTools distribution.</p>
+<div class="section" id="intersectbed">
+<h2>6.1 intersectBed<a class="headerlink" href="#intersectbed" title="Permalink to this headline">¶</a></h2>
+<p>6.1.1 Report the base-pair overlap between sequence alignments and genes.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed</pre>
+</div>
+<p>6.1.2 Report whether each alignment overlaps one or more genes. If not, the alignment is not reported.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -u</pre>
+</div>
+<p>6.1.3 Report those alignments that overlap NO genes. Like &#8220;grep -v&#8221;</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -v</pre>
+</div>
+<p>6.1.4 Report the number of genes that each alignment overlaps.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -c</pre>
+</div>
+<p>6.1.5 Report the entire, original alignment entry for each overlap with a gene.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -wa</pre>
+</div>
+<p>6.1.6 Report the entire, original gene entry for each overlap with a gene.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -wb</pre>
+</div>
+<p>6.1.7 Report the entire, original alignment and gene entries for each overlap.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed -wa -wb</pre>
+</div>
+<p>6.1.8 Only report an overlap with a repeat if it spans at least 50% of the exon.</p>
+<div class="highlight-python"><pre>intersectBed -a exons.bed -b repeatMasker.bed -f 0.50</pre>
+</div>
+<p>6.1.9 Only report an overlap if comprises 50% of the structural variant and 50% of the segmental duplication. Thus, it is reciprocally at least a 50% overlap.</p>
+<div class="highlight-python"><pre>intersectBed -a SV.bed -b segmentalDups.bed -f 0.50 -r</pre>
+</div>
+<p>6.1.10 Read BED A from stdin. For example, find genes that overlap LINEs but not SINEs.</p>
+<div class="highlight-python"><pre>intersectBed -a genes.bed -b LINES.bed | intersectBed -a stdin -b SINEs.bed -v</pre>
+</div>
+<p>6.1.11 Retain only single-end BAM alignments that overlap exons.</p>
+<div class="highlight-python"><pre>intersectBed -abam reads.bam -b exons.bed &gt; reads.touchingExons.bam</pre>
+</div>
+<p>6.1.12 Retain only single-end BAM alignments that do not overlap simple sequence
+repeats.</p>
+<div class="highlight-python"><pre>intersectBed -abam reads.bam -b SSRs.bed -v &gt; reads.noSSRs.bam</pre>
+</div>
+</div>
+<div class="section" id="pairtobed">
+<h2>6.2 pairToBed<a class="headerlink" href="#pairtobed" title="Permalink to this headline">¶</a></h2>
+<p>6.2.1 Return all structural variants (in BEDPE format) that overlap with genes on either
+end.</p>
+<div class="highlight-python"><pre>pairToBed -a sv.bedpe -b genes &gt; sv.genes</pre>
+</div>
+<p>6.2.2 Return all structural variants (in BEDPE format) that overlap with genes on both
+end.</p>
+<div class="highlight-python"><pre>pairToBed -a sv.bedpe -b genes -type both &gt; sv.genes</pre>
+</div>
+<p>6.2.3 Retain only paired-end BAM alignments where neither end overlaps simple
+sequence repeats.</p>
+<div class="highlight-python"><pre>pairToBed -abam reads.bam -b SSRs.bed -type neither &gt; reads.noSSRs.bam</pre>
+</div>
+<p>6.2.4 Retain only paired-end BAM alignments where both ends overlap segmental
+duplications.</p>
+<div class="highlight-python"><pre>pairToBed -abam reads.bam -b segdups.bed -type both &gt; reads.SSRs.bam</pre>
+</div>
+<p>6.2.5 Retain only paired-end BAM alignments where neither or one and only one end
+overlaps segmental duplications.</p>
+<div class="highlight-python"><pre>pairToBed -abam reads.bam -b segdups.bed -type notboth &gt; reads.notbothSSRs.bam</pre>
+</div>
+</div>
+<div class="section" id="pairtopair">
+<h2>6.3 pairToPair<a class="headerlink" href="#pairtopair" title="Permalink to this headline">¶</a></h2>
+<p>6.3.1 Find all SVs (in BEDPE format) in sample 1 that are also in sample 2.</p>
+<div class="highlight-python"><pre>pairToPair -a 1.sv.bedpe -b 2.sv.bedpe | cut -f 1-10 &gt; 1.sv.in2.bedpe</pre>
+</div>
+<p>6.3.2 Find all SVs (in BEDPE format) in sample 1 that are not in sample 2.</p>
+<div class="highlight-python"><pre>pairToPair -a 1.sv.bedpe -b 2.sv.bedpe -type neither | cut -f 1-10 &gt;</pre>
+</div>
+<p>1.sv.notin2.bedpe</p>
+</div>
+<div class="section" id="bamtobed">
+<h2>6.4 bamToBed<a class="headerlink" href="#bamtobed" title="Permalink to this headline">¶</a></h2>
+<p>6.4.1 Convert BAM alignments to BED format.</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam &gt; reads.bed</pre>
+</div>
+<p>6.4.2 Convert BAM alignments to BED format using the BAM edit distance (NM) as the
+BED &#8220;score&#8221;.</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam -ed &gt; reads.bed</pre>
+</div>
+<p>6.4.3 Convert BAM alignments to BEDPE format.</p>
+<div class="highlight-python"><pre>bamToBed -i reads.bam -bedpe &gt; reads.bedpe</pre>
+</div>
+</div>
+<div class="section" id="windowbed">
+<h2>6.5 windowBed<a class="headerlink" href="#windowbed" title="Permalink to this headline">¶</a></h2>
+<p>6.5.1 Report all genes that are within 10000 bp upstream or downstream of CNVs.</p>
+<div class="highlight-python"><pre>windowBed -a CNVs.bed -b genes.bed -w 10000</pre>
+</div>
+<p>6.5.2 Report all genes that are within 10000 bp upstream or 5000 bp downstream of
+CNVs.</p>
+<div class="highlight-python"><pre>windowBed -a CNVs.bed -b genes.bed -l 10000 -r 5000</pre>
+</div>
+<p>6.5.3 Report all SNPs that are within 5000 bp upstream or 1000 bp downstream of genes.
+Define upstream and downstream based on strand.</p>
+<div class="highlight-python"><pre>windowBed -a genes.bed -b snps.bed -l 5000 -r 1000 -sw</pre>
+</div>
+</div>
+<div class="section" id="closestbed">
+<h2>6.6 closestBed<a class="headerlink" href="#closestbed" title="Permalink to this headline">¶</a></h2>
+<p>Note: By default, if there is a tie for closest, all ties will be reported. <strong>closestBed</strong> allows overlapping
+features to be the closest.</p>
+<p>6.6.1 Find the closest ALU to each gene.</p>
+<div class="highlight-python"><pre>closestBed -a genes.bed -b ALUs.bed</pre>
+</div>
+<p>6.6.2 Find the closest ALU to each gene, choosing the first ALU in the file if there is a
+tie.</p>
+<div class="highlight-python"><pre>closestBed -a genes.bed -b ALUs.bed -t first</pre>
+</div>
+<p>6.6.3 Find the closest ALU to each gene, choosing the last ALU in the file if there is a
+tie.</p>
+<div class="highlight-python"><pre>closestBed -a genes.bed -b ALUs.bed -t last</pre>
+</div>
+</div>
+<div class="section" id="subtractbed">
+<h2>6.7 subtractBed<a class="headerlink" href="#subtractbed" title="Permalink to this headline">¶</a></h2>
+<p>Note: If a feature in A is entirely &#8220;spanned&#8221; by any feature in B, it will not be reported.</p>
+<p>6.7.1 Remove introns from gene features. Exons will (should) be reported.</p>
+<div class="highlight-python"><pre>subtractBed -a genes.bed -b introns.bed</pre>
+</div>
+</div>
+<div class="section" id="mergebed">
+<h2>6.8 mergeBed<a class="headerlink" href="#mergebed" title="Permalink to this headline">¶</a></h2>
+<p>6.8.1 Merge overlapping repetitive elements into a single entry.</p>
+<div class="highlight-python"><pre>mergeBed -i repeatMasker.bed</pre>
+</div>
+<p>6.8.2 Merge overlapping repetitive elements into a single entry, returning the number of
+entries merged.</p>
+<div class="highlight-python"><pre>mergeBed -i repeatMasker.bed -n</pre>
+</div>
+<p>6.8.3 Merge nearby (within 1000 bp) repetitive elements into a single entry.</p>
+<div class="highlight-python"><pre>mergeBed -i repeatMasker.bed -d 1000</pre>
+</div>
+</div>
+<div class="section" id="coveragebed">
+<h2>6.9 coverageBed<a class="headerlink" href="#coveragebed" title="Permalink to this headline">¶</a></h2>
+<p>6.9.1 Compute the coverage of aligned sequences on 10 kilobase &#8220;windows&#8221; spanning the
+genome.</p>
+<div class="highlight-python"><pre>coverageBed -a reads.bed -b windows10kb.bed | head
+chr1 0     10000 0  10000 0.00
+chr1 10001 20000 33 10000 0.21
+chr1 20001 30000 42 10000 0.29
+chr1 30001 40000 71 10000 0.36</pre>
+</div>
+<p>6.9.2 Compute the coverage of aligned sequences on 10 kilobase &#8220;windows&#8221; spanning the
+genome and created a BEDGRAPH of the number of aligned reads in each window for
+display on the UCSC browser.</p>
+<div class="highlight-python"><pre>coverageBed -a reads.bed -b windows10kb.bed | cut -f 1-4 &gt; windows10kb.cov.bedg</pre>
+</div>
+<p>6.9.3 Compute the coverage of aligned sequences on 10 kilobase &#8220;windows&#8221; spanning the
+genome and created a BEDGRAPH of the fraction of each window covered by at least
+one aligned read for display on the UCSC browser.</p>
+<div class="highlight-python"><pre>coverageBed -a reads.bed -b windows10kb.bed | awk ??{OFS="\t"; print $1,$2,$3,$6}??
+&gt; windows10kb.pctcov.bedg</pre>
+</div>
+</div>
+<div class="section" id="complementbed">
+<h2>6.10 complementBed<a class="headerlink" href="#complementbed" title="Permalink to this headline">¶</a></h2>
+<p>6.10.1 Report all intervals in the human genome that are not covered by repetitive
+elements.</p>
+<div class="highlight-python"><pre>complementBed -i repeatMasker.bed -g hg18.genome</pre>
+</div>
+</div>
+<div class="section" id="shufflebed">
+<h2>6.11 shuffleBed<a class="headerlink" href="#shufflebed" title="Permalink to this headline">¶</a></h2>
+<p>6.11.1 Randomly place all discovered variants in the genome. However, prevent them
+from being placed in know genome gaps.</p>
+<div class="highlight-python"><pre>shuffleBed -i variants.bed -g hg18.genome -excl genome_gaps.bed</pre>
+</div>
+<p>6.11.2 Randomly place all discovered variants in the genome. However, prevent them
+from being placed in know genome gaps and require that the variants be randomly
+placed on the same chromosome.</p>
+<div class="highlight-python"><pre>shuffleBed -i variants.bed -g hg18.genome -excl genome_gaps.bed -chrom</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Example usage</a><ul>
+<li><a class="reference internal" href="#intersectbed">6.1 intersectBed</a></li>
+<li><a class="reference internal" href="#pairtobed">6.2 pairToBed</a></li>
+<li><a class="reference internal" href="#pairtopair">6.3 pairToPair</a></li>
+<li><a class="reference internal" href="#bamtobed">6.4 bamToBed</a></li>
+<li><a class="reference internal" href="#windowbed">6.5 windowBed</a></li>
+<li><a class="reference internal" href="#closestbed">6.6 closestBed</a></li>
+<li><a class="reference internal" href="#subtractbed">6.7 subtractBed</a></li>
+<li><a class="reference internal" href="#mergebed">6.8 mergeBed</a></li>
+<li><a class="reference internal" href="#coveragebed">6.9 coverageBed</a></li>
+<li><a class="reference internal" href="#complementbed">6.10 complementBed</a></li>
+<li><a class="reference internal" href="#shufflebed">6.11 shuffleBed</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="annotateBed.html"
+                        title="previous chapter">5.24 annotateBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="advanced-usage.html"
+                        title="next chapter">Advanced usage</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/example-usage.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="advanced-usage.html" title="Advanced usage"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="annotateBed.html" title="5.24 annotateBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/fastafromBed.html b/docs/_build/html/content/fastafromBed.html
new file mode 100644
index 00000000..62dedba0
--- /dev/null
+++ b/docs/_build/html/content/fastafromBed.html
@@ -0,0 +1,240 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.11 fastaFromBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.12 maskFastaFromBed" href="maskfastafromBed.html" />
+    <link rel="prev" title="5.10 genomeCoverageBed" href="genomecoverageBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="maskfastafromBed.html" title="5.12 maskFastaFromBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="genomecoverageBed.html" title="5.10 genomeCoverageBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="fastafrombed">
+<h1>5.11 fastaFromBed<a class="headerlink" href="#fastafrombed" title="Permalink to this headline">¶</a></h1>
+<p><strong>fastaFromBed</strong> extracts sequences from a FASTA file for each of the intervals defined in a BED file.
+The headers in the input FASTA file must exactly match the chromosome column in the BED file.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.11.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>fastaFromBed [OPTIONS] -fi &lt;input FASTA&gt; -bed &lt;BED/GFF/VCF&gt; -fo &lt;output FASTA&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-name</strong></td>
+<td>Use the &#8220;name&#8221; column in the BED file for the FASTA headers in the output FASTA file.</td>
+</tr>
+<tr class="row-odd"><td><strong>-tab</strong></td>
+<td>Report extract sequences in a tab-delimited format instead of in FASTA format.</td>
+</tr>
+<tr class="row-even"><td><strong>-s</strong></td>
+<td>Force strandedness. If the feature occupies the antisense strand, the sequence will be reverse complemented. <em>Default: strand information is ignored</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.11.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p><strong>fastaFromBed</strong> will extract the sequence defined by the coordinates in a BED interval and create a
+new FASTA entry in the output file for each extracted sequence. By default, the FASTA header for each
+extracted sequence will be formatted as follows: &#8220;&lt;chrom&gt;:&lt;start&gt;-&lt;end&gt;&#8221;.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>$ cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 5 10
+
+fastaFromBed -fi test.fa -bed test.bed -fo test.fa.out
+
+cat test.fa.out
+&gt;chr1:5-10
+AAACC</pre>
+</div>
+</div>
+<div class="section" id="using-the-bed-name-column-as-a-fasta-header">
+<h2>5.11.3 Using the BED &#8220;name&#8221; column as a FASTA header.<a class="headerlink" href="#using-the-bed-name-column-as-a-fasta-header" title="Permalink to this headline">¶</a></h2>
+<p>Using the <strong>-name</strong> option, one can set the FASTA header for each extracted sequence to be the &#8220;name&#8221;
+columns from the BED feature.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 5 10 myseq
+
+fastaFromBed -fi test.fa -bed test.bed -fo test.fa.out -name
+
+cat test.fa.out
+&gt;myseq
+AAACC</pre>
+</div>
+</div>
+<div class="section" id="creating-a-tab-delimited-output-file-in-lieu-of-fasta-output">
+<h2>5.11.4 Creating a tab-delimited output file in lieu of FASTA output.<a class="headerlink" href="#creating-a-tab-delimited-output-file-in-lieu-of-fasta-output" title="Permalink to this headline">¶</a></h2>
+<p>Using the <strong>-tab</strong> option, the <strong>-fo</strong> output file will be tab-delimited instead of in FASTA format.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 5 10 myseq
+
+fastaFromBed -fi test.fa -bed test.bed -fo test.fa.out.tab -name -tab
+
+cat test.fa.out
+myseq AAACC</pre>
+</div>
+</div>
+<div class="section" id="s-forcing-the-extracted-sequence-to-reflect-the-requested-strand">
+<h2>5.11.5 (-s)Forcing the extracted sequence to reflect the requested strand<a class="headerlink" href="#s-forcing-the-extracted-sequence-to-reflect-the-requested-strand" title="Permalink to this headline">¶</a></h2>
+<p><strong>fastaFromBed</strong> will extract the sequence in the orientation defined in the strand column when the &#8220;-s&#8221;
+option is used.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 20 25 forward 1 +
+chr1 20 25 reverse 1 -
+
+fastaFromBed -fi test.fa -bed test.bed -s -name -fo test.fa.out
+
+cat test.fa.out
+&gt;forward
+CGCTA
+&gt;reverse
+TAGCG</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.11 fastaFromBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.11.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.11.2 Default behavior</a></li>
+<li><a class="reference internal" href="#using-the-bed-name-column-as-a-fasta-header">5.11.3 Using the BED &#8220;name&#8221; column as a FASTA header.</a></li>
+<li><a class="reference internal" href="#creating-a-tab-delimited-output-file-in-lieu-of-fasta-output">5.11.4 Creating a tab-delimited output file in lieu of FASTA output.</a></li>
+<li><a class="reference internal" href="#s-forcing-the-extracted-sequence-to-reflect-the-requested-strand">5.11.5 (-s)Forcing the extracted sequence to reflect the requested strand</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="genomecoverageBed.html"
+                        title="previous chapter">5.10 genomeCoverageBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="maskfastafromBed.html"
+                        title="next chapter">5.12 maskFastaFromBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/fastafromBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="maskfastafromBed.html" title="5.12 maskFastaFromBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="genomecoverageBed.html" title="5.10 genomeCoverageBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/general-usage.html b/docs/_build/html/content/general-usage.html
new file mode 100644
index 00000000..b2527349
--- /dev/null
+++ b/docs/_build/html/content/general-usage.html
@@ -0,0 +1,521 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>General usage</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="prev" title="Quick start" href="quick-start.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="bedtools-suite.html" title="The BEDTools suite"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="quick-start.html" title="Quick start"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="general-usage">
+<h1>General usage<a class="headerlink" href="#general-usage" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="supported-file-formats">
+<h2>4.1 Supported file formats<a class="headerlink" href="#supported-file-formats" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="bed-format">
+<h3>4.1.1 BED format<a class="headerlink" href="#bed-format" title="Permalink to this headline">¶</a></h3>
+<p>As described on the UCSC Genome Browser website (see link below), the BED format is a concise and
+flexible way to represent genomic features and annotations. The BED format description supports up to
+12 columns, but only the first 3 are required for the UCSC browser, the Galaxy browser and for
+BEDTools. BEDTools allows one to use the &#8220;BED12&#8221; format (that is, all 12 fields listed below).
+However, only intersectBed, coverageBed, genomeCoverageBed, and bamToBed will obey the BED12
+&#8220;blocks&#8221; when computing overlaps, etc., via the <strong>&#8220;-split&#8221;</strong> option. For all other tools, the last six columns
+are not used for any comparisons by the BEDTools. Instead, they will use the entire span (start to end)
+of the BED12 entry to perform any relevant feature comparisons. The last six columns will be reported
+in the output of all comparisons.</p>
+<p>The file description below is modified from: <a class="reference external" href="http://genome.ucsc.edu/FAQ/FAQformat#format1">http://genome.ucsc.edu/FAQ/FAQformat#format1</a>.</p>
+<ol class="arabic simple">
+<li><strong>chrom</strong> - The name of the chromosome on which the genome feature exists.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;chr1&#8221;, &#8220;III&#8221;, &#8220;myChrom&#8221;, &#8220;contig1112.23&#8221;.</li>
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="2">
+<li><strong>start</strong> - The zero-based starting position of the feature in the chromosome.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The first base in a chromosome is numbered 0</em>.</li>
+<li><em>The start position in each BED feature is therefore interpreted to be 1 greater than the start position listed in the feature. For example, start=9, end=20 is interpreted to span bases 10 through 20,inclusive</em>.</li>
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="3">
+<li><strong>end</strong> - The one-based ending position of the feature in the chromosome.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The end position in each BED feature is one-based. See example above</em>.</li>
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="4">
+<li><strong>name</strong> - Defines the name of the BED feature.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;LINE&#8221;, &#8220;Exon3&#8221;, &#8220;HWIEAS_0001:3:1:0:266#0/1&#8221;, or &#8220;my_Feature&#8221;.</li>
+<li><em>This column is optional</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="5">
+<li><strong>score</strong> - The UCSC definition requires that a BED score range from 0 to 1000, inclusive. However, BEDTools allows any string to be stored in this field in order to allow greater flexibility in annotation features. For example, strings allow scientific notation for p-values, mean enrichment values, etc. It should be noted that this flexibility could prevent such annotations from being correctly displayed on the UCSC browser.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, 7.31E-05 (p-value), 0.33456 (mean enrichment value), &#8220;up&#8221;, &#8220;down&#8221;, etc.</li>
+<li><em>This column is optional</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="6">
+<li><strong>strand</strong> - Defines the strand - either &#8216;+&#8217; or &#8216;-&#8216;.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is optional</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="7">
+<li><strong>thickStart</strong> - The starting position at which the feature is drawn thickly.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="8">
+<li><strong>thickEnd</strong> - The ending position at which the feature is drawn thickly.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="9">
+<li><strong>itemRgb</strong> - An RGB value of the form R,G,B (e.g. 255,0,0).</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="10">
+<li><strong>blockCount</strong> - The number of blocks (exons) in the BED line.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="11">
+<li><strong>blockSizes</strong> - A comma-separated list of the block sizes.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="12">
+<li><strong>blockStarts</strong> - A comma-separated list of block starts.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Allowed yet ignored by BEDTools</em>.</li>
+</ul>
+</div></blockquote>
+<p>BEDTools requires that all BED input files (and input received from stdin) are <strong>tab-delimited</strong>. The following types of BED files are supported by BEDTools:</p>
+<ol class="arabic">
+<li><div class="first line-block">
+<div class="line"><strong>BED3</strong>: A BED file where each feature is described by <strong>chrom</strong>, <strong>start</strong>, and <strong>end</strong>.</div>
+<div class="line">For example: chr1          11873   14409</div>
+</div>
+</li>
+<li><div class="first line-block">
+<div class="line"><strong>BED4</strong>: A BED file where each feature is described by <strong>chrom</strong>, <strong>start</strong>, <strong>end</strong>, and <strong>name</strong>.</div>
+<div class="line">For example: chr1  11873  14409  uc001aaa.3</div>
+</div>
+</li>
+<li><div class="first line-block">
+<div class="line"><strong>BED5</strong>: A BED file where each feature is described by <strong>chrom</strong>, <strong>start</strong>, <strong>end</strong>, <strong>name</strong>, and <strong>score</strong>.</div>
+<div class="line">For example: chr1 11873 14409 uc001aaa.3 0</div>
+</div>
+</li>
+<li><div class="first line-block">
+<div class="line"><strong>BED6</strong>: A BED file where each feature is described by <strong>chrom</strong>, <strong>start</strong>, <strong>end</strong>, <strong>name</strong>, <strong>score</strong>, and <strong>strand</strong>.</div>
+<div class="line">For example: chr1 11873 14409 uc001aaa.3 0 +</div>
+</div>
+</li>
+<li><div class="first line-block">
+<div class="line"><strong>BED12</strong>: A BED file where each feature is described by all twelve columns listed above.</div>
+<div class="line">For example: chr1 11873 14409 uc001aaa.3 0 + 11873</div>
+<div class="line">11873 0 3 354,109,1189, 0,739,1347,</div>
+</div>
+</li>
+</ol>
+</div>
+<div class="section" id="bedpe-format">
+<h3>4.1.2 BEDPE format<a class="headerlink" href="#bedpe-format" title="Permalink to this headline">¶</a></h3>
+<p>We have defined a new file format (BEDPE) in order to concisely describe disjoint genome features,
+such as structural variations or paired-end sequence alignments. We chose to define a new format
+because the existing &#8220;blocked&#8221; BED format (a.k.a. BED12) does not allow inter-chromosomal feature
+definitions. In addition, BED12 only has one strand field, which is insufficient for paired-end sequence
+alignments, especially when studying structural variation.</p>
+<p>The BEDPE format is described below. The description is modified from: <a class="reference external" href="http://genome.ucsc.edu/FAQ/FAQformat#format1">http://genome.ucsc.edu/FAQ/FAQformat#format1</a>.</p>
+<ol class="arabic simple">
+<li><strong>chrom1</strong> - The name of the chromosome on which the <strong>first</strong> end of the feature exists.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;chr1&#8221;, &#8220;III&#8221;, &#8220;myChrom&#8221;, &#8220;contig1112.23&#8221;.</li>
+<li><em>This column is required</em>.</li>
+<li><em>Use &#8221;.&#8221; for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="2">
+<li><strong>start1</strong> - The zero-based starting position of the <strong>first</strong> end of the feature on <strong>chrom1</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The first base in a chromosome is numbered 0</em>.</li>
+<li><em>As with BED format, the start position in each BEDPE feature is therefore interpreted to be 1 greater than the start position listed in the feature. This column is required</em>.</li>
+<li><em>Use -1 for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="3">
+<li><strong>end1</strong> - The one-based ending position of the first end of the feature on <strong>chrom1</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The end position in each BEDPE feature is one-based</em>.</li>
+<li><em>This column is required</em>.</li>
+<li><em>Use -1 for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="4">
+<li><strong>chrom2</strong> - The name of the chromosome on which the <strong>second</strong> end of the feature exists.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;chr1&#8221;, &#8220;III&#8221;, &#8220;myChrom&#8221;, &#8220;contig1112.23&#8221;.</li>
+<li><em>This column is required</em>.</li>
+<li><em>Use &#8221;.&#8221; for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="5">
+<li><strong>start2</strong> - The zero-based starting position of the <strong>second</strong> end of the feature on <strong>chrom2</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The first base in a chromosome is numbered 0</em>.</li>
+<li><em>As with BED format, the start position in each BEDPE feature is therefore interpreted to be 1 greater than the start position listed in the feature. This column is required</em>.</li>
+<li><em>Use -1 for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="6">
+<li><strong>end2</strong> - The one-based ending position of the <strong>second</strong> end of the feature on <strong>chrom2</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>The end position in each BEDPE feature is one-based</em>.</li>
+<li><em>This column is required</em>.</li>
+<li><em>Use -1 for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="7">
+<li><strong>name</strong> - Defines the name of the BEDPE feature.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;LINE&#8221;, &#8220;Exon3&#8221;, &#8220;HWIEAS_0001:3:1:0:266#0/1&#8221;, or &#8220;my_Feature&#8221;.</li>
+<li><em>This column is optional</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="8">
+<li><strong>score</strong> - The UCSC definition requires that a BED score range from 0 to 1000, inclusive. <em>However, BEDTools allows any string to be stored in this field in order to allow greater flexibility in annotation features</em>. For example, strings allow scientific notation for p-values, mean enrichment values, etc. It should be noted that this flexibility could prevent such annotations from being correctly displayed on the UCSC browser.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, 7.31E-05 (p-value), 0.33456 (mean enrichment value), &#8220;up&#8221;, &#8220;down&#8221;, etc.</li>
+<li><em>This column is optional</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="9">
+<li><strong>strand1</strong> - Defines the strand for the first end of the feature. Either &#8216;+&#8217; or &#8216;-&#8216;.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is optional</em>.</li>
+<li><em>Use &#8221;.&#8221; for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="10">
+<li><strong>strand2</strong> - Defines the strand for the second end of the feature. Either &#8216;+&#8217; or &#8216;-&#8216;.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is optional</em>.</li>
+<li><em>Use &#8221;.&#8221; for unknown</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="11">
+<li><strong>Any number of additional, user-defined fields</strong> - BEDTools allows one to add as many additional fields to the normal, 10-column BEDPE format as necessary. These columns are merely &#8220;passed through&#8221; <strong>pairToBed</strong> and <strong>pairToPair</strong> and are not part of any analysis. One would use these additional columns to add extra information (e.g., edit distance for each end of an alignment, or &#8220;deletion&#8221;, &#8220;inversion&#8221;, etc.) to each BEDPE feature.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>These additional columns are optional</em>.</li>
+</ul>
+</div></blockquote>
+<p>Entries from an typical BEDPE file:</p>
+<div class="highlight-python"><pre>chr1  100   200   chr5  5000  5100  bedpe_example1  30   +  -
+chr9  1000  5000  chr9  3000  3800  bedpe_example2  100  +  -</pre>
+</div>
+<p>Entries from a BEDPE file with two custom fields added to each record:</p>
+<div class="highlight-python"><pre>chr1  10    20    chr5  50    60    a1     30       +    -  0  1
+chr9  30    40    chr9  80    90    a2     100      +    -  2  1</pre>
+</div>
+</div>
+<div class="section" id="gff-format">
+<h3>4.1.3 GFF format<a class="headerlink" href="#gff-format" title="Permalink to this headline">¶</a></h3>
+<p>The GFF format is described on the Sanger Institute&#8217;s website (<a class="reference external" href="http://www.sanger.ac.uk/resources/software/gff/spec.html">http://www.sanger.ac.uk/resources/software/gff/spec.html</a>). The GFF description below is modified from the definition at this URL. All nine columns in the GFF format description are required by BEDTools.</p>
+<ol class="arabic simple">
+<li><strong>seqname</strong> - The name of the sequence (e.g. chromosome) on which the feature exists.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;chr1&#8221;, &#8220;III&#8221;, &#8220;myChrom&#8221;, &#8220;contig1112.23&#8221;.</li>
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="2">
+<li><strong>source</strong> - The source of this feature. This field will normally be used to indicate the program making the prediction, or if it comes from public database annotation, or is experimentally verified, etc.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="3">
+<li><strong>feature</strong> - The feature type name. Equivalent to BED&#8217;s <strong>name</strong> field.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>Any string can be used</em>. For example, &#8220;exon&#8221;, etc.</li>
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="4">
+<li><strong>start</strong> - The one-based starting position of feature on <strong>seqname</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+<li><em>BEDTools accounts for the fact the GFF uses a one-based position and BED uses a zero-based start position</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="5">
+<li><strong>end</strong> - The one-based ending position of feature on <strong>seqname</strong>.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="6">
+<li><strong>score</strong> - A score assigned to the GFF feature. Like BED format, BEDTools allows any string to be stored in this field in order to allow greater flexibility in annotation features. We note that this differs from the GFF definition in the interest of flexibility.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="7">
+<li><strong>strand</strong> - Defines the strand. Use &#8216;+&#8217;, &#8216;-&#8216; or &#8216;.&#8217;</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="8">
+<li><strong>frame</strong> -  The frame of the coding sequence. Use &#8216;0&#8217;, &#8216;1&#8217;, &#8216;2&#8217;, or &#8216;.&#8217;.</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<ol class="arabic simple" start="9">
+<li><strong>attribute</strong> - Taken from <a class="reference external" href="http://www.sanger.ac.uk/resources/software/gff/spec.html">http://www.sanger.ac.uk/resources/software/gff/spec.html</a>: From version 2 onwards, the attribute field must have an tag value structure following the syntax used within objects in a .ace file, flattened onto one line by semicolon separators. Tags must be standard identifiers ([A-Za-z][<a href="#id2"><span class="problematic" id="id3">AZa-z0-9_</span></a>]*). Free text values must be quoted with double quotes. <em>Note: all non-printing characters in such free text value strings (e.g. newlines, tabs, control characters, etc) must be explicitly represented by their C (UNIX) style backslash-escaped representation (e.g. newlines as &#8216;n&#8217;, tabs as &#8216;t&#8217;)</em>. As in ACEDB, multiple values can follow a specific tag. The aim is to establish consistent use of particular tags, corresponding to an underlying implied ACEDB model if you want to think that way (but acedb is not required).</li>
+</ol>
+<blockquote>
+<div><ul class="simple">
+<li><em>This column is required</em>.</li>
+</ul>
+</div></blockquote>
+<p>An entry from an example GFF file :</p>
+<div class="highlight-python"><pre>seq1 BLASTX similarity 101 235 87.1 + 0 Target "HBA_HUMAN" 11 55 ;
+E_value 0.0003 dJ102G20 GD_mRNA coding_exon 7105 7201 . - 2 Sequence
+"dJ102G20.C1.1"</pre>
+</div>
+</div>
+<div class="section" id="id1">
+<h3>4.1.3 GFF format<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
+<p>Some of the BEDTools (e.g., genomeCoverageBed, complementBed, slopBed) need to know the size of
+the chromosomes for the organism for which your BED files are based. When using the UCSC Genome
+Browser, Ensemble, or Galaxy, you typically indicate which which species/genome build you are
+working. The way you do this for BEDTools is to create a &#8220;genome&#8221; file, which simply lists the names of
+the chromosomes (or scaffolds, etc.) and their size (in basepairs).</p>
+<p>Genome files must be <strong>tab-delimited</strong> and are structured as follows (this is an example for <em>C. elegans</em>):</p>
+<div class="highlight-python"><pre>chrI  15072421
+chrII 15279323
+...
+chrX  17718854
+chrM  13794</pre>
+</div>
+<p>BEDTools includes pre-defined genome files for human and mouse in the <strong>/genomes</strong> directory included
+in the BEDTools distribution.</p>
+</div>
+<div class="section" id="sam-bam-format">
+<h3>4.1.5 SAM/BAM format<a class="headerlink" href="#sam-bam-format" title="Permalink to this headline">¶</a></h3>
+<p>The SAM / BAM format is a powerful and widely-used format for storing sequence alignment data (see
+<a class="reference external" href="http://samtools.sourceforge.net/">http://samtools.sourceforge.net/</a> for more details). It has quickly become the standard format to which
+most DNA sequence alignment programs write their output. Currently, the following BEDTools
+support inout in BAM format: <em>intersectBed, windowBed, coverageBed, genomeCoverageBed,
+pairToBed, bamToBed</em>. Support for the BAM format in BEDTools allows one to (to name a few):
+compare sequence alignments to annotations, refine alignment datasets, screen for potential mutations
+and compute aligned sequence coverage.</p>
+<p>The details of how these tools work with BAM files are addressed in <strong>Section 5</strong> of this manual.</p>
+</div>
+<div class="section" id="vcf-format">
+<h3>4.1.6 VCF format<a class="headerlink" href="#vcf-format" title="Permalink to this headline">¶</a></h3>
+<p>The Variant Call Format (VCF) was conceived as part of the 1000 Genomes Project as a standardized
+means to report genetic variation calls from SNP, INDEL and structural variant detection programs
+(see <a class="reference external" href="http://www.1000genomes.org/wiki/doku.php?id=1000_genomes:analysis:vcf4.0">http://www.1000genomes.org/wiki/doku.php?id=1000_genomes:analysis:vcf4.0</a> for details).
+BEDTools now supports the latest version of this format (i.e, Version 4.0). As a result, BEDTools can
+be used to compare genetic variation calls with other genomic features.</p>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">General usage</a><ul>
+<li><a class="reference internal" href="#supported-file-formats">4.1 Supported file formats</a><ul>
+<li><a class="reference internal" href="#bed-format">4.1.1 BED format</a></li>
+<li><a class="reference internal" href="#bedpe-format">4.1.2 BEDPE format</a></li>
+<li><a class="reference internal" href="#gff-format">4.1.3 GFF format</a></li>
+<li><a class="reference internal" href="#id1">4.1.3 GFF format</a></li>
+<li><a class="reference internal" href="#sam-bam-format">4.1.5 SAM/BAM format</a></li>
+<li><a class="reference internal" href="#vcf-format">4.1.6 VCF format</a></li>
+</ul>
+</li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="quick-start.html"
+                        title="previous chapter">Quick start</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="bedtools-suite.html"
+                        title="next chapter">The BEDTools suite</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/general-usage.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="bedtools-suite.html" title="The BEDTools suite"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="quick-start.html" title="Quick start"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/genomecoverageBed.html b/docs/_build/html/content/genomecoverageBed.html
new file mode 100644
index 00000000..4b1d6b8c
--- /dev/null
+++ b/docs/_build/html/content/genomecoverageBed.html
@@ -0,0 +1,257 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.10 genomeCoverageBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.11 fastaFromBed" href="fastafromBed.html" />
+    <link rel="prev" title="5.9 coverageBed" href="coverageBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="fastafromBed.html" title="5.11 fastaFromBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="coverageBed.html" title="5.9 coverageBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="genomecoveragebed">
+<h1>5.10 genomeCoverageBed<a class="headerlink" href="#genomecoveragebed" title="Permalink to this headline">¶</a></h1>
+<p><strong>genomeCoverageBed</strong> computes a histogram of feature coverage (e.g., aligned sequences) for a given
+genome. Optionally, by using the <strong>-d</strong> option, it will report the depth of coverage at <em>each base</em> on each
+chromosome in the genome file (<strong>-g</strong>).</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.10.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>genomeCoverageBed [OPTIONS] -i &lt;BED&gt; -g &lt;GENOME&gt;</pre>
+</div>
+<p>NOTE: genomeCoverageBed requires that the input BED file be sorted by
+chromosome. A simple sort -k1,1 will suffice.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="9%" />
+<col width="91%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-ibam</strong></td>
+<td><blockquote class="first">
+<div>BAM file as input for coverage. Each BAM alignment in A added to the total coverage for the genome. Use &#8220;stdin&#8221; if passing it with a UNIX pipe: For example:</div></blockquote>
+<div class="last line-block">
+<div class="line">samtools view -b &lt;BAM&gt; | genomeCoverageBed -ibam stdin -g hg18.genome</div>
+</div>
+</td>
+</tr>
+<tr class="row-odd"><td><strong>-d</strong></td>
+<td>Report the depth at each genome position. <em>Default behavior is to report a histogram</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-max</strong></td>
+<td>Combine all positions with a depth &gt;= max into a single bin in the histogram.</td>
+</tr>
+<tr class="row-odd"><td><strong>-bg</strong></td>
+<td>Report depth in BedGraph format. For details, see: <a class="reference external" href="http://genome.ucsc.edu/goldenPath/help/bedgraph.html">http://genome.ucsc.edu/goldenPath/help/bedgraph.html</a></td>
+</tr>
+<tr class="row-even"><td><strong>-bga</strong></td>
+<td>Report depth in BedGraph format, as above (i.e., -bg). However with this option, regions with zero coverage are also reported. This allows one to quickly extract all regions of a genome with 0 coverage by applying: &#8220;grep -w 0$&#8221; to the output.</td>
+</tr>
+<tr class="row-odd"><td><strong>-split</strong></td>
+<td>Treat &#8220;split&#8221; BAM or BED12 entries as distinct BED intervals when computing coverage. For BAM files, this uses the CIGAR &#8220;N&#8221; and &#8220;D&#8221; operations to infer the blocks for computing coverage. For BED12 files, this uses the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12).</td>
+</tr>
+<tr class="row-even"><td><strong>-strand</strong></td>
+<td>Calculate coverage of intervals from a specific strand. With BED files, requires at least 6 columns (strand is column 6).</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.10.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>genomeCoverageBed</strong> will compute a histogram of coverage for the genome file provided.
+The default output format is as follows:
+1. chromosome (or entire genome)
+2. depth of coverage from features in input file
+3. number of bases on chromosome (or genome) with depth equal to column 2.
+4. size of chromosome (or entire genome) in base pairs
+5. fraction of bases on chromosome (or entire genome) with depth equal to column 2.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  20  30
+chr2  0   500
+
+cat my.genome
+chr1  1000
+chr2  500
+
+genomeCoverageBed -i A.bed -g my.genome
+chr1   0  980  1000  0.98
+chr1   1  20   1000  0.02
+chr2   1  500  500   1
+genome 0  980  1500  0.653333
+genome 1  520  1500  0.346667</pre>
+</div>
+</div>
+<div class="section" id="max-controlling-the-histogram-s-maximum-depth">
+<h2>5.10.3 (-max)Controlling the histogram&#8217;s maximum depth<a class="headerlink" href="#max-controlling-the-histogram-s-maximum-depth" title="Permalink to this headline">¶</a></h2>
+<p>Using the <strong>-max</strong> option, <strong>genomeCoverageBed</strong> will &#8220;lump&#8221; all positions in the genome having feature
+coverage greather than or equal to <strong>max</strong> into the <strong>max</strong> histogram bin. For example, if one sets <strong>-max</strong>
+equal to 50, the max depth reported in the output will be 50 and all positions with a depth &gt;= 50 will
+be represented in bin 50.</p>
+</div>
+<div class="section" id="d-reporting-per-base-genome-coverage">
+<h2>5.10.4 (-d)Reporting &#8220;per-base&#8221; genome coverage<a class="headerlink" href="#d-reporting-per-base-genome-coverage" title="Permalink to this headline">¶</a></h2>
+<p>Using the <strong>-d</strong> option, <strong>genomeCoverageBed</strong> will compute the depth of feature coverage for each base
+on each chromosome in genome file provided.</p>
+<p>The &#8220;per-base&#8221; output format is as follows:
+1. chromosome
+2. chromosome position
+3. depth (number) of features overlapping this chromosome position.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  20  30
+chr2  0   500
+
+cat my.genome
+chr1  1000
+chr2  500
+
+genomeCoverageBed -i A.bed -g my.genome -d | head -15 | tail -n 10
+chr1  6  0
+chr1  7  0
+chr1  8  0
+chr1  9  0
+chr1  10 0
+chr1  11 1
+chr1  12 1
+chr1  13 1
+chr1  14 1
+chr1  15 1</pre>
+</div>
+</div>
+<div class="section" id="split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features">
+<h2>5.1.13 (-split)Reporting coverage with spliced alignments or blocked BED features<a class="headerlink" href="#split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features" title="Permalink to this headline">¶</a></h2>
+<p>As described in section 1.3.19, genomeCoverageBed will, by default, screen for overlaps against the
+entire span of a spliced/split BAM alignment or blocked BED12 feature. When dealing with RNA-seq
+reads, for example, one typically wants to only screen for overlaps for the portions of the reads that
+come from exons (and ignore the interstitial intron sequence). The <strong>-split</strong> command allows for such
+overlaps to be performed.</p>
+<p>For additional details, please visit the Usage From The Wild site and have a look at example 5,
+contributed by Assaf Gordon.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.10 genomeCoverageBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.10.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.10.2 Default behavior</a></li>
+<li><a class="reference internal" href="#max-controlling-the-histogram-s-maximum-depth">5.10.3 (-max)Controlling the histogram&#8217;s maximum depth</a></li>
+<li><a class="reference internal" href="#d-reporting-per-base-genome-coverage">5.10.4 (-d)Reporting &#8220;per-base&#8221; genome coverage</a></li>
+<li><a class="reference internal" href="#split-reporting-coverage-with-spliced-alignments-or-blocked-bed-features">5.1.13 (-split)Reporting coverage with spliced alignments or blocked BED features</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="coverageBed.html"
+                        title="previous chapter">5.9 coverageBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="fastafromBed.html"
+                        title="next chapter">5.11 fastaFromBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/genomecoverageBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="fastafromBed.html" title="5.11 fastaFromBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="coverageBed.html" title="5.9 coverageBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/groupBy.html b/docs/_build/html/content/groupBy.html
new file mode 100644
index 00000000..82d21d4b
--- /dev/null
+++ b/docs/_build/html/content/groupBy.html
@@ -0,0 +1,324 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.22 groupBy</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.23 unionBedGraphs" href="unionBedGraphs.html" />
+    <link rel="prev" title="5.21 bed12ToBed6" href="bed12ToBed6.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="unionBedGraphs.html" title="5.23 unionBedGraphs"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="bed12ToBed6.html" title="5.21 bed12ToBed6"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="groupby">
+<h1>5.22 groupBy<a class="headerlink" href="#groupby" title="Permalink to this headline">¶</a></h1>
+<p><strong>groupBy</strong> is a useful tool that mimics the &#8220;groupBy&#8221; clause in database systems. Given a file or stream
+that is sorted by the appropriate &#8220;grouping columns&#8221;, groupBy will compute summary statistics on
+another column in the file or stream. This will work with output from all BEDTools as well as any other
+tab-delimited file or stream.</p>
+<p><strong>NOTE: When using groupBy, the input data must be ordered by the same
+columns as specified with the -grp argument. For example, if -grp is 1,2,3, the the
+data should be pre-grouped accordingly. When groupBy detects changes in the
+group columns it then summarizes all lines with that group</strong>.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.22.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>groupBy [OPTIONS] -i &lt;input&gt; -opCol &lt;input column&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="11%" />
+<col width="89%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-i</strong></td>
+<td><blockquote class="first">
+<div>The input file that should be grouped and summarized. <em>Use &#8220;stdin&#8221; when using piped input</em>.</div></blockquote>
+<p class="last"><strong>Note: if -i is omitted, input is assumed to come from standard input (stdin)</strong></p>
+</td>
+</tr>
+<tr class="row-odd"><td><strong>-g OR -grp</strong></td>
+<td>Specifies which column(s) (1-based) should be used to group the input. The columns must be comma-separated and each column must be explicitly listed. No ranges (e.g. 1-4) yet allowed. <em>Default: 1,2,3</em></td>
+</tr>
+<tr class="row-even"><td><strong>-c OR -opCol</strong></td>
+<td>Specify the column (1-based) that should be summarized. <em>Required</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-o OR -op</strong></td>
+<td><p class="first">Specify the operation that should be applied to <strong>opCol</strong>.</p>
+<div class="line-block">
+<div class="line">Valid operations:</div>
+</div>
+<blockquote>
+<div><div class="line-block">
+<div class="line"><strong>sum</strong> - <em>numeric only</em></div>
+<div class="line"><strong>count</strong> - <em>numeric or text</em></div>
+<div class="line"><strong>min</strong> - <em>numeric only</em></div>
+<div class="line"><strong>max</strong> - <em>numeric only</em></div>
+<div class="line"><strong>mean</strong> - <em>numeric only</em></div>
+<div class="line"><strong>stdev</strong> - <em>numeric only</em></div>
+<div class="line"><strong>median</strong> - <em>numeric only</em></div>
+<div class="line"><strong>mode</strong> - <em>numeric or text</em></div>
+<div class="line"><strong>antimode</strong> - <em>numeric or text</em></div>
+<div class="line"><strong>collapse</strong> (i.e., print a comma separated list) - <em>numeric or text</em></div>
+<div class="line"><strong>freqasc</strong> - <em>print a comma separated list of values observed and the number of times they were observed. Reported in ascending order of frequency</em></div>
+</div>
+</div></blockquote>
+<div class="line-block">
+<div class="line"><strong>freqdesc</strong> - <em>print a comma separated list of values observed and the number of times they were observed. Reported in descending order of frequency</em></div>
+</div>
+<blockquote class="last">
+<div><div class="line-block">
+<div class="line"><em>Default: sum</em></div>
+</div>
+</div></blockquote>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.22.2 Default behavior.<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Let&#8217;s imagine we have three incredibly interesting genetic variants that we are studying and we are
+interested in what annotated repeats these variants overlap.</p>
+<div class="highlight-python"><pre>cat variants.bed
+chr21  9719758 9729320 variant1
+chr21  9729310 9757478 variant2
+chr21  9795588 9796685 variant3
+
+intersectBed -a variants.bed -b repeats.bed -wa -wb &gt; variantsToRepeats.bed
+cat variantsToRepeats.bed
+chr21  9719758 9729320 variant1   chr21  9719768 9721892 ALR/Alpha   1004  +
+chr21  9719758 9729320 variant1   chr21  9721905 9725582 ALR/Alpha   1010  +
+chr21  9719758 9729320 variant1   chr21  9725582 9725977 L1PA3       3288  +
+chr21  9719758 9729320 variant1   chr21  9726021 9729309 ALR/Alpha   1051  +
+chr21  9729310 9757478 variant2   chr21  9729320 9729809 L1PA3       3897  -
+chr21  9729310 9757478 variant2   chr21  9729809 9730866 L1P1        8367  +
+chr21  9729310 9757478 variant2   chr21  9730866 9734026 ALR/Alpha   1036  -
+chr21  9729310 9757478 variant2   chr21  9734037 9757471 ALR/Alpha   1182  -
+chr21  9795588 9796685 variant3   chr21  9795589 9795713 (GAATG)n    308   +
+chr21  9795588 9796685 variant3   chr21  9795736 9795894 (GAATG)n    683   +
+chr21  9795588 9796685 variant3   chr21  9795911 9796007 (GAATG)n    345   +
+chr21  9795588 9796685 variant3   chr21  9796028 9796187 (GAATG)n    756   +
+chr21  9795588 9796685 variant3   chr21  9796202 9796615 (GAATG)n    891   +
+chr21  9795588 9796685 variant3   chr21  9796637 9796824 (GAATG)n    621   +</pre>
+</div>
+<p>We can see that variant1 overlaps with 3 repeats, variant2 with 4 and variant3 with 6. We can use
+groupBy to summarize the hits for each variant in several useful ways. The default behavior is to
+compute the <em>sum</em> of the opCol.</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -grp 1,2,3 -opCol 9
+chr21 9719758 9729320 6353
+chr21 9729310 9757478 14482
+chr21 9795588 9796685 3604</pre>
+</div>
+</div>
+<div class="section" id="computing-the-min-and-max">
+<h2>5.22.3 Computing the min and max.<a class="headerlink" href="#computing-the-min-and-max" title="Permalink to this headline">¶</a></h2>
+<p>Now let&#8217;s find the <em>min</em> and <em>max</em> repeat score for each variant. We do this by &#8220;grouping&#8221; on the variant
+coordinate columns (i.e. cols. 1,2 and 3) and ask for the min and max of the repeat score column (i.e.
+col. 9).</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -g 1,2,3 -c 9 -o min
+chr21 9719758 9729320 1004
+chr21 9729310 9757478 1036
+chr21 9795588 9796685 308</pre>
+</div>
+<p>We can also group on just the <em>name</em> column with similar effect.</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -grp 4 -opCol 9 -op min
+variant1 1004
+variant2 1036
+variant3 308</pre>
+</div>
+<p>What about the <em>max</em> score? Let&#8217;s keep the coordinates and the name of the variants so that we
+stay in BED format.</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -grp 1,2,3,4 -opCol 9 -op max
+chr21 9719758 9729320 variant1 3288
+chr21 9729310 9757478 variant2 8367
+chr21 9795588 9796685 variant3 891</pre>
+</div>
+</div>
+<div class="section" id="computing-the-mean-and-median">
+<h2>5.22.4 Computing the mean and median.<a class="headerlink" href="#computing-the-mean-and-median" title="Permalink to this headline">¶</a></h2>
+<p>Now let&#8217;s find the <em>mean</em> and <em>median</em> repeat score for each variant.</p>
+<div class="highlight-python"><pre>cat variantsToRepeats.bed | groupBy -g 1,2,3,4 -c 9 -o mean
+chr21 9719758 9729320 variant1 1588.25
+chr21 9729310 9757478 variant2 3620.5
+chr21 9795588 9796685 variant3 600.6667
+
+groupBy -i variantsToRepeats.bed -grp 1,2,3,4 -opCol 9 -op median
+chr21 9719758 9729320 variant1 1030.5
+chr21 9729310 9757478 variant2 2539.5
+chr21 9795588 9796685 variant3 652</pre>
+</div>
+</div>
+<div class="section" id="computing-the-mode-and-antimode">
+<h2>5.22.5 Computing the mode and &#8220;antimode&#8221;.<a class="headerlink" href="#computing-the-mode-and-antimode" title="Permalink to this headline">¶</a></h2>
+<p>Now let&#8217;s find the <em>mode</em> and <em>antimode</em> (i.e., the least frequent) repeat score for each variant (in this case
+they are identical).</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -grp 1,2,3,4 -opCol 9 -op mode
+chr21 9719758 9729320 variant1 1004
+chr21 9729310 9757478 variant2 1036
+chr21 9795588 9796685 variant3 308
+
+groupBy -i variantsToRepeats.bed -grp 1,2,3,4 -opCol 9 -op antimode
+chr21 9719758 9729320 variant1 1004
+chr21 9729310 9757478 variant2 1036
+chr21 9795588 9796685 variant3 308</pre>
+</div>
+</div>
+<div class="section" id="computing-the-count-of-lines-for-a-given-group">
+<h2>5.22.6 Computing the count of lines for a given group.<a class="headerlink" href="#computing-the-count-of-lines-for-a-given-group" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -g 1,2,3,4 -c 9 -c count
+chr21 9719758 9729320 variant1 4
+chr21 9729310 9757478 variant2 4
+chr21 9795588 9796685 variant3 6</pre>
+</div>
+</div>
+<div class="section" id="collapsing-listing-all-of-the-values-in-the-opcol-for-a-given-group">
+<h2>5.22.7 Collapsing: listing all of the values in the opCol for a given group.<a class="headerlink" href="#collapsing-listing-all-of-the-values-in-the-opcol-for-a-given-group" title="Permalink to this headline">¶</a></h2>
+<p>Now for something different. What if we wanted all of the names of the repeats listed on the same line
+as the variants? Use the collapse option. This &#8220;denormalizes&#8221; things. Now you have a list of all the
+repeats on a single line.</p>
+<div class="highlight-python"><pre>groupBy -i variantsToRepeats.bed -grp 1,2,3,4 -opCol 9 -op collapse
+chr21 9719758 9729320 variant1 ALR/Alpha,ALR/Alpha,L1PA3,ALR/Alpha,
+chr21 9729310 9757478 variant2 L1PA3,L1P1,ALR/Alpha,ALR/Alpha,
+chr21 9795588 9796685 variant3 (GAATG)n,(GAATG)n,(GAATG)n,(GAATG)n,(GAATG)n,(GAATG)n,</pre>
+</div>
+</div>
+<div class="section" id="computing-frequencies-freqasc-and-freqdesc">
+<h2>5.22.8 Computing frequencies: freqasc and freqdesc.<a class="headerlink" href="#computing-frequencies-freqasc-and-freqdesc" title="Permalink to this headline">¶</a></h2>
+<p>Now for something different. What if we wanted all of the names of the repeats listed on the same line
+as the variants? Use the collapse option. This &#8220;denormalizes&#8221; things. Now you have a list of all the
+repeats on a single line.</p>
+<div class="highlight-python"><pre>cat variantsToRepeats.bed | groupBy -g 1 -c 8 -o freqdesc
+chr21 (GAATG)n:6,ALR/Alpha:5,L1PA3:2,L1P1:1,
+
+cat variantsToRepeats.bed | groupBy -g 1 -c 8 -o freqasc
+chr21 L1P1:1,L1PA3:2,ALR/Alpha:5,(GAATG)n:6,</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.22 groupBy</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.22.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.22.2 Default behavior.</a></li>
+<li><a class="reference internal" href="#computing-the-min-and-max">5.22.3 Computing the min and max.</a></li>
+<li><a class="reference internal" href="#computing-the-mean-and-median">5.22.4 Computing the mean and median.</a></li>
+<li><a class="reference internal" href="#computing-the-mode-and-antimode">5.22.5 Computing the mode and &#8220;antimode&#8221;.</a></li>
+<li><a class="reference internal" href="#computing-the-count-of-lines-for-a-given-group">5.22.6 Computing the count of lines for a given group.</a></li>
+<li><a class="reference internal" href="#collapsing-listing-all-of-the-values-in-the-opcol-for-a-given-group">5.22.7 Collapsing: listing all of the values in the opCol for a given group.</a></li>
+<li><a class="reference internal" href="#computing-frequencies-freqasc-and-freqdesc">5.22.8 Computing frequencies: freqasc and freqdesc.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="bed12ToBed6.html"
+                        title="previous chapter">5.21 bed12ToBed6</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="unionBedGraphs.html"
+                        title="next chapter">5.23 unionBedGraphs</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/groupBy.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="unionBedGraphs.html" title="5.23 unionBedGraphs"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="bed12ToBed6.html" title="5.21 bed12ToBed6"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/installation.html b/docs/_build/html/content/installation.html
new file mode 100644
index 00000000..33119690
--- /dev/null
+++ b/docs/_build/html/content/installation.html
@@ -0,0 +1,135 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Installation</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="Quick start" href="quick-start.html" />
+    <link rel="prev" title="Overview" href="overview.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="quick-start.html" title="Quick start"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="overview.html" title="Overview"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="installation">
+<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
+<p>BEDTools is intended to run in a &#8220;command line&#8221; environment on UNIX, LINUX and Apple OS X
+operating systems. Installing BEDTools involves downloading the latest source code archive followed by
+compiling the source code into binaries on your local system. The following commands will install
+BEDTools in a local directory on a NIX or OS X machine. Note that the <strong>&#8220;&lt;version&gt;&#8221;</strong> refers to the
+latest posted version number on <a class="reference external" href="http://bedtools.googlecode.com/">http://bedtools.googlecode.com/</a>.</p>
+<p>Note: <em>The BEDTools &#8220;makefiles&#8221; use the GCC compiler. One should edit the Makefiles accordingly if
+one wants to use a different compiler.</em>:</p>
+<div class="highlight-python"><pre>curl http://bedtools.googlecode.com/files/BEDTools.&lt;version&gt;.tar.gz &gt; BEDTools.tar.gz
+tar -zxvf BEDTools.tar.gz
+cd BEDTools-&lt;version&gt;
+make clean
+make all
+ls bin</pre>
+</div>
+<p>At this point, one should copy the binaries in BEDTools/bin/ to either usr/local/bin/ or some
+other repository for commonly used UNIX tools in your environment. You will typically require
+administrator (e.g. &#8220;root&#8221; or &#8220;sudo&#8221;) privileges to copy to usr/local/bin/. If in doubt, contact you
+system administrator for help.</p>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="overview.html"
+                        title="previous chapter">Overview</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="quick-start.html"
+                        title="next chapter">Quick start</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/installation.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="quick-start.html" title="Quick start"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="overview.html" title="Overview"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/intersectBed.html b/docs/_build/html/content/intersectBed.html
new file mode 100644
index 00000000..58932995
--- /dev/null
+++ b/docs/_build/html/content/intersectBed.html
@@ -0,0 +1,500 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.1 intersect</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.2 pairToBed" href="pairToBed.html" />
+    <link rel="prev" title="The BEDTools suite" href="bedtools-suite.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="pairToBed.html" title="5.2 pairToBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="bedtools-suite.html" title="The BEDTools suite"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="intersect">
+<h1>5.1 intersect<a class="headerlink" href="#intersect" title="Permalink to this headline">¶</a></h1>
+<p>By far, the most common question asked of two sets of genomic features is whether or not any of the
+features in the two sets &#8220;overlap&#8221; with one another. This is known as feature intersection. <strong>bedtools intersect</strong>
+allows one to screen for overlaps between two sets of genomic features. Moreover, it allows one to have
+fine control as to how the intersections are reported. <strong>bedtools intersect</strong> works with both BED/GFF/VCF
+and BAM files as input.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.1.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage</strong>:</p>
+<div class="highlight-python"><pre>bedtools intersect [OPTIONS] [-a &lt;BED/GFF/VCF&gt; || -abam &lt;BAM&gt;] -b &lt;BED/GFF/VCF&gt;
+
+intersectBed [OPTIONS] [-a &lt;BED/GFF/VCF&gt; || -abam &lt;BAM&gt;] -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="10%" />
+<col width="90%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-a</strong></td>
+<td>BED/GFF/VCF file A. Each feature in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe.</td>
+</tr>
+<tr class="row-odd"><td><strong>-b</strong></td>
+<td>BED/GFF/VCF file B. Use &#8220;stdin&#8221; if passing B with a UNIX pipe.</td>
+</tr>
+<tr class="row-even"><td><strong>-abam</strong></td>
+<td>BAM file A. Each BAM alignment in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe: For example: samtools view -b &lt;BAM&gt; | bedtools intersect -abam stdin -b genes.bed</td>
+</tr>
+<tr class="row-odd"><td><strong>-ubam</strong></td>
+<td>Write uncompressed BAM output. The default is write compressed BAM output.</td>
+</tr>
+<tr class="row-even"><td><strong>-bed</strong></td>
+<td>When using BAM input (-abam), write output as BED. The default is to write output in BAM when using -abam. For example:   bedtools intersect -abam reads.bam -b genes.bed -bed</td>
+</tr>
+<tr class="row-odd"><td><strong>-wa</strong></td>
+<td>Write the original entry in A for each overlap.</td>
+</tr>
+<tr class="row-even"><td><strong>-wb</strong></td>
+<td>Write the original entry in B for each overlap. Useful for knowing what A overlaps. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-odd"><td><strong>-wo</strong></td>
+<td>Write the original A and B entries plus the number of base pairs of overlap between the two features. Only A features with overlap are reported. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-even"><td><strong>-wao</strong></td>
+<td>Write the original A and B entries plus the number of base pairs of overlap between the two features. However, A features w/o overlap are also reported with a NULL B feature and overlap = 0. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-odd"><td><strong>-u</strong></td>
+<td>Write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-even"><td><strong>-c</strong></td>
+<td>For each entry in A, report the number of hits in B while restricting to -f. Reports 0 for A entries that have no overlap with B. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-odd"><td><strong>-v</strong></td>
+<td>Only report those entries in A that have no overlap in B. Restricted by -f and -r.</td>
+</tr>
+<tr class="row-even"><td><strong>-f</strong></td>
+<td>Minimum overlap required as a fraction of A. Default is 1E-9 (i.e. 1bp).</td>
+</tr>
+<tr class="row-odd"><td><strong>-r</strong></td>
+<td>Require that the fraction of overlap be reciprocal for A and B. In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B.</td>
+</tr>
+<tr class="row-even"><td><strong>-s</strong></td>
+<td>Force &#8220;strandedness&#8221;. That is, only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand.</td>
+</tr>
+<tr class="row-odd"><td><strong>-split</strong></td>
+<td>Treat &#8220;split&#8221; BAM (i.e., having an &#8220;N&#8221; CIGAR operation) or BED12 entries as distinct BED intervals.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.1.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, if an overlap is found, <strong>bedtools intersect</strong> reports the shared interval between the two
+overlapping features.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15   20
+
+bedtools intersect -a A.bed -b B.bed
+chr1  15   20</pre>
+</div>
+<p>(<a class="reference external" href="../content/intersectBed-1.py">Source code</a>, <a class="reference external" href="../content/intersectBed-1.png">png</a>, <a class="reference external" href="../content/intersectBed-1.hires.png">hires.png</a>, <a class="reference external" href="../content/intersectBed-1.pdf">pdf</a>)</p>
+<div class="figure">
+<img alt="../_images/intersectBed-1.png" src="../_images/intersectBed-1.png" />
+</div>
+</div>
+<div class="section" id="wa-reporting-the-original-a-feature">
+<h2>5.1.3 (-wa) Reporting the original A feature<a class="headerlink" href="#wa-reporting-the-original-a-feature" title="Permalink to this headline">¶</a></h2>
+<p>Instead, one can force <strong>bedtools intersect</strong> to report the <em>original</em> <strong>&#8220;A&#8221;</strong> feature when an overlap is found. As
+shown below, the entire &#8220;A&#8221; feature is reported, not just the portion that overlaps with the &#8220;B&#8221; feature.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30   40
+
+cat B.bed
+chr1  15  20
+
+bedtools intersect -a A.bed -b B.bed -wa
+chr1  10   20</pre>
+</div>
+<p>(<a class="reference external" href="../content/intersectBed-2.py">Source code</a>, <a class="reference external" href="../content/intersectBed-2.png">png</a>, <a class="reference external" href="../content/intersectBed-2.hires.png">hires.png</a>, <a class="reference external" href="../content/intersectBed-2.pdf">pdf</a>)</p>
+<div class="figure">
+<img alt="../_images/intersectBed-2.png" src="../_images/intersectBed-2.png" />
+</div>
+</div>
+<div class="section" id="wb-reporting-the-original-b-feature">
+<h2>5.1.4 (-wb) Reporting the original B feature<a class="headerlink" href="#wb-reporting-the-original-b-feature" title="Permalink to this headline">¶</a></h2>
+<p>Similarly, one can force <strong>bedtools intersect</strong> to report the <em>original</em> <strong>&#8220;B&#8221;</strong> feature when an overlap is found. If
+just -wb is used, the overlapping portion of A will be reported followed by the <em>original</em> <strong>&#8220;B&#8221;</strong>. If both -wa
+and -wb are used, the <em>originals</em> of both <strong>&#8220;A&#8221;</strong> and <strong>&#8220;B&#8221;</strong> will be reported.</p>
+<p>For example (-wb alone):
+::
+For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15   20
+
+bedtools intersect -a A.bed -b B.bed -wb
+chr1  15  20  chr 15  20</pre>
+</div>
+<p>Now -wa and -wb:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15   20
+
+bedtools intersect -a A.bed -b B.bed -wa -wb
+chr1  10  20  chr 15  20</pre>
+</div>
+</div>
+<div class="section" id="u-reporting-the-presence-of-at-least-one-overlapping-feature">
+<h2>5.1.5 (-u) Reporting the presence of <em>at least one</em> overlapping feature<a class="headerlink" href="#u-reporting-the-presence-of-at-least-one-overlapping-feature" title="Permalink to this headline">¶</a></h2>
+<p>Frequently a feature in &#8220;A&#8221; will overlap with multiple features in &#8220;B&#8221;. By default, <strong>bedtools intersect</strong> will
+report each overlap as a separate output line. However, one may want to simply know that there is at
+least one overlap (or none). When one uses the -u option, &#8220;A&#8221; features that overlap with one or more
+&#8220;B&#8221; features are reported once. Those that overlap with no &#8220;B&#8221; features are not reported at all.</p>
+<p>For example (<em>without</em> -u):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15   20
+chr1  18   25
+
+bedtools intersect -a A.bed -b B.bed -wb
+chr1  10  20  chr 15  20
+chr1  10  20  chr 18  25</pre>
+</div>
+<p>For example (<em>with</em> -u):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15   20
+chr1  18   25
+
+bedtools intersect -a A.bed -b B.bed -u
+chr1  10  20</pre>
+</div>
+</div>
+<div class="section" id="c-reporting-the-number-of-overlapping-features">
+<h2>5.1.6 (-c) Reporting the number of overlapping features<a class="headerlink" href="#c-reporting-the-number-of-overlapping-features" title="Permalink to this headline">¶</a></h2>
+<p>The -c option reports a column after each &#8220;A&#8221; feature indicating the <em>number</em> (0 or more) of overlapping
+features found in &#8220;B&#8221;. Therefore, <em>each feature in A is reported once</em>.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1    10    20
+chr1    30    40
+
+cat B.bed
+chr1    15  20
+chr1    18  25
+
+bedtools intersect -a A.bed -b B.bed -u
+chr1    10    20    2
+chr1    30    40    0</pre>
+</div>
+</div>
+<div class="section" id="v-reporting-the-absence-of-any-overlapping-features">
+<h2>5.1.7 (-v) Reporting the absence of any overlapping features<a class="headerlink" href="#v-reporting-the-absence-of-any-overlapping-features" title="Permalink to this headline">¶</a></h2>
+<p>There will likely be cases where you&#8217;d like to know which &#8220;A&#8221; features do not overlap with any of the
+&#8220;B&#8221; features. Perhaps you&#8217;d like to know which SNPs don&#8217;t overlap with any gene annotations. The -v
+(an homage to &#8220;grep -v&#8221;) option will only report those &#8220;A&#8221; features that have no overlaps in &#8220;B&#8221;.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10  20
+chr1  30  40
+
+cat B.bed
+chr1  15  20
+
+bedtools intersect -a A.bed -b B.bed -v
+chr1  30   40</pre>
+</div>
+<p>(<a class="reference external" href="../content/intersectBed-3.py">Source code</a>, <a class="reference external" href="../content/intersectBed-3.png">png</a>, <a class="reference external" href="../content/intersectBed-3.hires.png">hires.png</a>, <a class="reference external" href="../content/intersectBed-3.pdf">pdf</a>)</p>
+<div class="figure">
+<img alt="../_images/intersectBed-3.png" src="../_images/intersectBed-3.png" />
+</div>
+</div>
+<div class="section" id="f-requiring-a-minimal-overlap-fraction">
+<h2>5.1.8 (-f) Requiring a minimal overlap fraction<a class="headerlink" href="#f-requiring-a-minimal-overlap-fraction" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>bedtools intersect</strong> will report an overlap between A and B so long as there is at least one base
+pair is overlapping. Yet sometimes you may want to restrict reported overlaps between A and B to cases
+where the feature in B overlaps at least X% (e.g. 50%) of the A feature. The -f option does exactly
+this.</p>
+<p>For example (note that the second B entry is not reported):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 100 200
+
+cat B.bed
+chr1 130 201
+chr1 180 220
+
+bedtools intersect -a A.bed -b B.bed -f 0.50 -wa -wb
+chr1 100 200 chr1 130 201</pre>
+</div>
+</div>
+<div class="section" id="r-combined-with-f-requiring-reciprocal-minimal-overlap-fraction">
+<h2>5.1.9 (-r, combined with -f)Requiring reciprocal minimal overlap fraction<a class="headerlink" href="#r-combined-with-f-requiring-reciprocal-minimal-overlap-fraction" title="Permalink to this headline">¶</a></h2>
+<p>Similarly, you may want to require that a minimal fraction of both the A and the B features is
+overlapped. For example, if feature A is 1kb and feature B is 1Mb, you might not want to report the
+overlap as feature A can overlap at most 1% of feature B. If one set -f to say, 0.02, and one also
+enable the -r (reciprocal overlap fraction required), this overlap would not be reported.</p>
+<p>For example (note that the second B entry is not reported):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 100 200
+
+cat B.bed
+chr1 130 201
+chr1 130 200000
+
+bedtools intersect -a A.bed -b B.bed -f 0.50 -r -wa -wb
+chr1 100 200 chr1 130 201</pre>
+</div>
+</div>
+<div class="section" id="s-enforcing-strandedness">
+<h2>5.1.10 (-s)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#s-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>bedtools intersect</strong> will report overlaps between features even if the features are on opposite
+strands. However, if strand information is present in both BED files and the &#8220;-s&#8221; option is used, overlaps
+will only be reported when features are on the same strand.</p>
+<p>For example (note that the second B entry is not reported):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 100 200 a1 100 +
+
+cat B.bed
+chr1 130 201 b1 100 -
+chr1 130 201 b2 100 +
+
+bedtools intersect -a A.bed -b B.bed -wa -wb -s
+chr1 100 200 a1 100 + chr1 130 201 b2 100 +</pre>
+</div>
+</div>
+<div class="section" id="abam-default-behavior-when-using-bam-input">
+<h2>5.1.11 (-abam)Default behavior when using BAM input<a class="headerlink" href="#abam-default-behavior-when-using-bam-input" title="Permalink to this headline">¶</a></h2>
+<p>When comparing alignments in BAM format (<strong>-abam</strong>) to features in BED format (<strong>-b</strong>), <strong>bedtools intersect</strong>
+will, <strong>by default</strong>, write the output in BAM format. That is, each alignment in the BAM file that meets
+the user&#8217;s criteria will be written (to standard output) in BAM format. This serves as a mechanism to
+create subsets of BAM alignments are of biological interest, etc. Note that only the mate in the BAM
+alignment is compared to the BED file. Thus, if only one end of a paired-end sequence overlaps with a
+feature in B, then that end will be written to the BAM output. By contrast, the other mate for the
+pair will not be written. One should use <strong>pairToBed(Section 5.2)</strong> if one wants each BAM alignment
+for a pair to be written to BAM output.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>bedtools intersect -abam reads.unsorted.bam -b simreps.bed | samtools view - | head -3
+
+BERTHA_0001:3:1:15:1362#0 99 chr4 9236904 0 50M = 9242033 5 1 7 9
+AGACGTTAACTTTACACACCTCTGCCAAGGTCCTCATCCTTGTATTGAAG W c T U ] b \ g c e g X g f c b f c c b d d g g V Y P W W _
+\c`dcdabdfW^a^gggfgd XT:A:R NM:i:0 SM:i:0 AM:i:0 X0:i:19 X1:i:2 XM:i:0 XO:i:0 XG:i:0 MD:Z:50
+BERTHA _0001:3:1:16:994#0 83 chr6 114221672 37 25S6M1I11M7S =
+114216196 -5493 G A A A G G C C A G A G T A T A G A A T A A A C A C A A C A A T G T C C A A G G T A C A C T G T T A
+gffeaaddddggggggedgcgeggdegggggffcgggggggegdfggfgf XT:A:M NM:i:3 SM:i:37 AM:i:37 XM:i:2 X O : i :
+1 XG:i:1 MD:Z:6A6T3
+BERTHA _0001:3:1:16:594#0 147 chr8 43835330 0 50M =
+43830893 -4487 CTTTGGGAGGGCTTTGTAGCCTATCTGGAAAAAGGAAATATCTTCCCATG U
+\e^bgeTdg_Kgcg`ggeggg_gggggggggddgdggVg\gWdfgfgff XT:A:R NM:i:2 SM:i:0 AM:i:0 X0:i:10 X1:i:7 X M : i :
+2 XO:i:0 XG:i:0 MD:Z:1A2T45</pre>
+</div>
+</div>
+<div class="section" id="bed-output-bed-format-when-using-bam-input">
+<h2>5.1.12 (-bed)Output BED format when using BAM input<a class="headerlink" href="#bed-output-bed-format-when-using-bam-input" title="Permalink to this headline">¶</a></h2>
+<p>When comparing alignments in BAM format (<strong>-abam</strong>) to features in BED format (<strong>-b</strong>), <strong>bedtools intersect</strong>
+will <strong>optionally</strong> write the output in BED format. That is, each alignment in the BAM file is converted
+to a 6 column BED feature and if overlaps are found (or not) based on the user&#8217;s criteria, the BAM
+alignment will be reported in BED format. The BED &#8220;name&#8221; field is comprised of the RNAME field in
+the BAM alignment. If mate information is available, the mate (e.g., &#8220;/1&#8221; or &#8220;/2&#8221;) field will be
+appended to the name. The &#8220;score&#8221; field is the mapping quality score from the BAM alignment.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>bedtools intersect -abam reads.unsorted.bam -b simreps.bed -bed | head -20
+
+chr4  9236903   9236953   BERTHA_0001:3:1:15:1362#0/1  0   +
+chr6  114221671 114221721 BERTHA_0001:3:1:16:994#0/1   37  -
+chr8  43835329  43835379  BERTHA_0001:3:1:16:594#0/2   0   -
+chr4  49110668  49110718  BERTHA_0001:3:1:31:487#0/1   23  +
+chr19 27732052  27732102  BERTHA_0001:3:1:32:890#0/2   46  +
+chr19 27732012  27732062  BERTHA_0001:3:1:45:1135#0/1  37  +
+chr10 117494252 117494302 BERTHA_0001:3:1:68:627#0/1   37  -
+chr19 27731966  27732016  BERTHA_0001:3:1:83:931#0/2   9   +
+chr8  48660075  48660125  BERTHA_0001:3:1:86:608#0/2   37  -
+chr9  34986400  34986450  BERTHA_0001:3:1:113:183#0/2  37  -
+chr10 42372771  42372821  BERTHA_0001:3:1:128:1932#0/1 3   -
+chr19 27731954  27732004  BERTHA_0001:3:1:130:1402#0/2 0   +
+chr10 42357337  42357387  BERTHA_0001:3:1:137:868#0/2  9   +
+chr1  159720631 159720681 BERTHA_0001:3:1:147:380#0/2  37  -
+chrX  58230155  58230205  BERTHA_0001:3:1:151:656#0/2  37  -
+chr5  142612746 142612796 BERTHA_0001:3:1:152:1893#0/1 37  -
+chr9  71795659  71795709  BERTHA_0001:3:1:177:387#0/1  37  +
+chr1  106240854 106240904 BERTHA_0001:3:1:194:928#0/1  37  -
+chr4  74128456  74128506  BERTHA_0001:3:1:221:724#0/1  37  -
+chr8  42606164  42606214  BERTHA_0001:3:1:244:962#0/1  37  +</pre>
+</div>
+</div>
+<div class="section" id="split-reporting-overlaps-with-spliced-alignments-or-blocked-bed-features">
+<h2>5.1.13 (-split)Reporting overlaps with spliced alignments or blocked BED features<a class="headerlink" href="#split-reporting-overlaps-with-spliced-alignments-or-blocked-bed-features" title="Permalink to this headline">¶</a></h2>
+<p>As described in section 1.3.19, bedtools intersect will, by default, screen for overlaps against the entire span
+of a spliced/split BAM alignment or blocked BED12 feature. When dealing with RNA-seq reads, for
+example, one typically wants to only screen for overlaps for the portions of the reads that come from
+exons (and ignore the interstitial intron sequence). The <strong>-split</strong> command allows for such overlaps to be
+performed.</p>
+<p>For example, the diagram below illustrates the <em>default</em> behavior. The blue dots represent the &#8220;split/
+spliced&#8221; portion of the alignment (i.e., CIGAR &#8220;N&#8221; operation). In this case, the two exon annotations
+are reported as overlapping with the &#8220;split&#8221; BAM alignment, but in addition, a third feature that
+overlaps the &#8220;split&#8221; portion of the alignment is also reported.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Exons       ---------------                                       ----------
+
+BED/BAM  A     ************.......................................****
+
+BED File B  ^^^^^^^^^^^^^^^                     ^^^^^^^^          ^^^^^^^^^^
+
+Result      ===============                     ========          ==========</pre>
+</div>
+<p>In contrast, when using the <strong>-split</strong> option, only the exon overlaps are reported.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Exons       ---------------                                       ----------
+
+BED/BAM  A     ************.......................................****
+
+BED File B  ^^^^^^^^^^^^^^^                     ^^^^^^^^          ^^^^^^^^^^
+
+Result      ===============                                       ==========</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.1 intersect</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.1.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.1.2 Default behavior</a></li>
+<li><a class="reference internal" href="#wa-reporting-the-original-a-feature">5.1.3 (-wa) Reporting the original A feature</a></li>
+<li><a class="reference internal" href="#wb-reporting-the-original-b-feature">5.1.4 (-wb) Reporting the original B feature</a></li>
+<li><a class="reference internal" href="#u-reporting-the-presence-of-at-least-one-overlapping-feature">5.1.5 (-u) Reporting the presence of <em>at least one</em> overlapping feature</a></li>
+<li><a class="reference internal" href="#c-reporting-the-number-of-overlapping-features">5.1.6 (-c) Reporting the number of overlapping features</a></li>
+<li><a class="reference internal" href="#v-reporting-the-absence-of-any-overlapping-features">5.1.7 (-v) Reporting the absence of any overlapping features</a></li>
+<li><a class="reference internal" href="#f-requiring-a-minimal-overlap-fraction">5.1.8 (-f) Requiring a minimal overlap fraction</a></li>
+<li><a class="reference internal" href="#r-combined-with-f-requiring-reciprocal-minimal-overlap-fraction">5.1.9 (-r, combined with -f)Requiring reciprocal minimal overlap fraction</a></li>
+<li><a class="reference internal" href="#s-enforcing-strandedness">5.1.10 (-s)Enforcing &#8220;strandedness&#8221;</a></li>
+<li><a class="reference internal" href="#abam-default-behavior-when-using-bam-input">5.1.11 (-abam)Default behavior when using BAM input</a></li>
+<li><a class="reference internal" href="#bed-output-bed-format-when-using-bam-input">5.1.12 (-bed)Output BED format when using BAM input</a></li>
+<li><a class="reference internal" href="#split-reporting-overlaps-with-spliced-alignments-or-blocked-bed-features">5.1.13 (-split)Reporting overlaps with spliced alignments or blocked BED features</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="bedtools-suite.html"
+                        title="previous chapter">The BEDTools suite</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="pairToBed.html"
+                        title="next chapter">5.2 pairToBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/intersectBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="pairToBed.html" title="5.2 pairToBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="bedtools-suite.html" title="The BEDTools suite"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/linksBed.html b/docs/_build/html/content/linksBed.html
new file mode 100644
index 00000000..5df5bc53
--- /dev/null
+++ b/docs/_build/html/content/linksBed.html
@@ -0,0 +1,200 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.16 linksBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.17 complementBed" href="complementBed.html" />
+    <link rel="prev" title="5.15 sortBed" href="sortBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="complementBed.html" title="5.17 complementBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="sortBed.html" title="5.15 sortBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="linksbed">
+<h1>5.16 linksBed<a class="headerlink" href="#linksbed" title="Permalink to this headline">¶</a></h1>
+<p>Creates an HTML file with links to an instance of the UCSC Genome Browser for all features /
+intervals in a file. This is useful for cases when one wants to manually inspect through a large set of
+annotations or features.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.16.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>linksBed [OPTIONS] -i &lt;BED/GFF/VCF&gt; &gt; &lt;HTML file&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-base</strong></td>
+<td>The &#8220;basename&#8221; for the UCSC browser. <em>Default: http://genome.ucsc.edu</em></td>
+</tr>
+<tr class="row-odd"><td><strong>-org</strong></td>
+<td>The organism (e.g. mouse, human). <em>Default: human</em></td>
+</tr>
+<tr class="row-even"><td><strong>-db</strong></td>
+<td>The genome build. <em>Default: hg18</em></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.16.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>linksBed</strong> creates links to the public UCSC Genome Browser.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>head genes.bed
+chr21 9928613  10012791  uc002yip.1 0  -
+chr21 9928613  10012791  uc002yiq.1 0  -
+chr21 9928613  10012791  uc002yir.1 0  -
+chr21 9928613  10012791  uc010gkv.1 0  -
+chr21 9928613  10061300  uc002yis.1 0  -
+chr21 10042683 10120796  uc002yit.1 0  -
+chr21 10042683 10120808  uc002yiu.1 0  -
+chr21 10079666 10120808  uc002yiv.1 0  -
+chr21 10080031 10081687  uc002yiw.1 0  -
+chr21 10081660 10120796  uc002yix.2 0  -
+
+linksBed -i genes.bed &gt; genes.html</pre>
+</div>
+<p>When genes.html is opened in a web browser, one should see something like the following, where each
+link on the page is built from the features in genes.bed:</p>
+</div>
+<div class="section" id="creating-html-links-to-a-local-ucsc-browser-installation">
+<h2>5.16.3 Creating HTML links to a local UCSC Browser installation<a class="headerlink" href="#creating-html-links-to-a-local-ucsc-browser-installation" title="Permalink to this headline">¶</a></h2>
+<p>Optionally, <strong>linksBed</strong> will create links to a local copy of the UCSC Genome Browser.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>head -3 genes.bed
+chr21 9928613 10012791 uc002yip.1 0 -
+chr21 9928613 10012791 uc002yiq.1 0 -
+
+linksBed -i genes.bed -base http://mirror.uni.edu &gt; genes.html</pre>
+</div>
+<p>One can point the links to the appropriate organism and genome build as well:</p>
+<div class="highlight-python"><pre>head -3 genes.bed
+chr21 9928613 10012791 uc002yip.1 0 -
+chr21 9928613 10012791 uc002yiq.1 0 -
+
+linksBed -i genes.bed -base http://mirror.uni.edu -org mouse -db mm9 &gt; genes.html</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.16 linksBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.16.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.16.2 Default behavior</a></li>
+<li><a class="reference internal" href="#creating-html-links-to-a-local-ucsc-browser-installation">5.16.3 Creating HTML links to a local UCSC Browser installation</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="sortBed.html"
+                        title="previous chapter">5.15 sortBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="complementBed.html"
+                        title="next chapter">5.17 complementBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/linksBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="complementBed.html" title="5.17 complementBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="sortBed.html" title="5.15 sortBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/maskfastafromBed.html b/docs/_build/html/content/maskfastafromBed.html
new file mode 100644
index 00000000..1652f480
--- /dev/null
+++ b/docs/_build/html/content/maskfastafromBed.html
@@ -0,0 +1,194 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.12 maskFastaFromBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.13 shuffleBed" href="shuffleBed.html" />
+    <link rel="prev" title="5.11 fastaFromBed" href="fastafromBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="shuffleBed.html" title="5.13 shuffleBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="fastafromBed.html" title="5.11 fastaFromBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="maskfastafrombed">
+<h1>5.12 maskFastaFromBed<a class="headerlink" href="#maskfastafrombed" title="Permalink to this headline">¶</a></h1>
+<p><strong>maskFastaFromBed</strong> masks sequences in a FASTA file based on intervals defined in a feature file. The
+headers in the input FASTA file must exactly match the chromosome column in the feature file. This
+may be useful fro creating your own masked genome file based on custom annotations or for masking all
+but your target regions when aligning sequence data from a targeted capture experiment.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.12.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>maskFastaFromBed [OPTIONS] -fi &lt;input FASTA&gt; -bed &lt;BED/GFF/VCF&gt; -fo &lt;output FASTA&gt;</pre>
+</div>
+<p>NOTE: The input and output FASTA files must be different.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-soft</strong></td>
+<td>Soft-mask (that is, convert to lower-case bases) the FASTA sequence. <em>By default, hard-masking (that is, conversion to Ns) is performed</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.12.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p><strong>maskFastaFromBed</strong> will mask a FASTA file based on the intervals in a BED file. The newly masked
+FASTA file is written to the output FASTA file.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 5 10
+
+maskFastaFromBed -fi test.fa -bed test.bed -fo test.fa.out
+
+cat test.fa.out
+&gt;chr1
+AAAAANNNNNCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG</pre>
+</div>
+</div>
+<div class="section" id="soft-masking-the-fasta-file">
+<h2>5.12.3 Soft-masking the FASTA file.<a class="headerlink" href="#soft-masking-the-fasta-file" title="Permalink to this headline">¶</a></h2>
+<p>Using the <strong>-soft</strong> option, one can optionally &#8220;soft-mask&#8221; the FASTA file.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat test.fa
+&gt;chr1
+AAAAAAAACCCCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG
+
+cat test.bed
+chr1 5 10
+
+maskFastaFromBed -fi test.fa -bed test.bed -fo test.fa.out -soft
+
+cat test.fa.out
+&gt;chr1
+AAAAAaaaccCCCCCCCCCCGCTACTGGGGGGGGGGGGGGGGGG</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.12 maskFastaFromBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.12.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.12.2 Default behavior</a></li>
+<li><a class="reference internal" href="#soft-masking-the-fasta-file">5.12.3 Soft-masking the FASTA file.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="fastafromBed.html"
+                        title="previous chapter">5.11 fastaFromBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="shuffleBed.html"
+                        title="next chapter">5.13 shuffleBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/maskfastafromBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="shuffleBed.html" title="5.13 shuffleBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="fastafromBed.html" title="5.11 fastaFromBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/mergeBed.html b/docs/_build/html/content/mergeBed.html
new file mode 100644
index 00000000..92650249
--- /dev/null
+++ b/docs/_build/html/content/mergeBed.html
@@ -0,0 +1,244 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.8 mergeBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.9 coverageBed" href="coverageBed.html" />
+    <link rel="prev" title="5.7 subtractBed" href="subtractBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="coverageBed.html" title="5.9 coverageBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="subtractBed.html" title="5.7 subtractBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="mergebed">
+<h1>5.8 mergeBed<a class="headerlink" href="#mergebed" title="Permalink to this headline">¶</a></h1>
+<p><strong>mergeBed</strong> combines overlapping or &#8220;book-ended&#8221; (that is, one base pair away) features in a feature file
+into a single feature which spans all of the combined features.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.8.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>mergeBed [OPTIONS] -i &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-s</strong></td>
+<td>Force strandedness. That is, only merge features that are the same strand. <em>By default, this is disabled</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-n</strong></td>
+<td>Report the number of BED entries that were merged. <em>1 is reported if no merging occurred</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-d</strong></td>
+<td>Maximum distance between features allowed for features to be merged. <em>Default is 0. That is, overlapping and/or book-ended features are merged</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-nms</strong></td>
+<td>Report the names of the merged features separated by semicolons.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.8.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BED FILE       *************   ***************   **********************
+                       ********
+
+Result         ===============================   ======================</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  180  250
+chr1  250  500
+chr1  501  1000
+
+mergeBed -i A.bed
+chr1  100  500
+chr1  501  1000</pre>
+</div>
+</div>
+<div class="section" id="s-enforcing-strandedness">
+<h2>5.8.3 (-s)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#s-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as the -s option for intersectBed while scanning for features that should
+be merged. Only features on the same strand will be merged. See the discussion in the intersectBed
+section for details.</p>
+</div>
+<div class="section" id="n-reporting-the-number-of-features-that-were-merged">
+<h2>5.8.4 (-n)Reporting the number of features that were merged<a class="headerlink" href="#n-reporting-the-number-of-features-that-were-merged" title="Permalink to this headline">¶</a></h2>
+<p>The -n option will report the number of features that were combined from the original file in order to
+make the newly merged feature. If a feature in the original file was not merged with any other features,
+a &#8220;1&#8221; is reported.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  180  250
+chr1  250  500
+chr1  501  1000
+
+mergeBed -i A.bed -n
+chr1  100  500  3
+chr1  501  1000 1</pre>
+</div>
+</div>
+<div class="section" id="d-controlling-how-close-two-features-must-be-in-order-to-merge">
+<h2>5.8.5 (-d)Controlling how close two features must be in order to merge<a class="headerlink" href="#d-controlling-how-close-two-features-must-be-in-order-to-merge" title="Permalink to this headline">¶</a></h2>
+<p>By default, only overlapping or book-ended features are combined into a new feature. However, one can
+force mergeBed to combine more distant features with the -d option. For example, were one to set -d to
+1000, any features that overlap or are within 1000 base pairs of one another will be combined.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  501  1000
+
+mergeBed -i A.bed
+chr1  100  200
+chr1  501  1000
+
+mergeBed -i A.bed -d 1000
+chr1  100  200  1000</pre>
+</div>
+</div>
+<div class="section" id="nms-reporting-the-names-of-the-features-that-were-merged">
+<h2>5.8.6 (-nms)Reporting the names of the features that were merged<a class="headerlink" href="#nms-reporting-the-names-of-the-features-that-were-merged" title="Permalink to this headline">¶</a></h2>
+<p>Occasionally, one might like to know that names of the features that were merged into a new feature.
+The -nms option will add an extra column to the mergeBed output which lists (separated by
+semicolons) the names of the merged features.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200  A1
+chr1  150  300  A2
+chr1  250  500  A3
+
+mergeBed -i A.bed -nms
+chr1  100  500  A1;A2;A3</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.8 mergeBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.8.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.8.2 Default behavior</a></li>
+<li><a class="reference internal" href="#s-enforcing-strandedness">5.8.3 (-s)Enforcing &#8220;strandedness&#8221;</a></li>
+<li><a class="reference internal" href="#n-reporting-the-number-of-features-that-were-merged">5.8.4 (-n)Reporting the number of features that were merged</a></li>
+<li><a class="reference internal" href="#d-controlling-how-close-two-features-must-be-in-order-to-merge">5.8.5 (-d)Controlling how close two features must be in order to merge</a></li>
+<li><a class="reference internal" href="#nms-reporting-the-names-of-the-features-that-were-merged">5.8.6 (-nms)Reporting the names of the features that were merged</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="subtractBed.html"
+                        title="previous chapter">5.7 subtractBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="coverageBed.html"
+                        title="next chapter">5.9 coverageBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/mergeBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="coverageBed.html" title="5.9 coverageBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="subtractBed.html" title="5.7 subtractBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/overlap.html b/docs/_build/html/content/overlap.html
new file mode 100644
index 00000000..81a657a9
--- /dev/null
+++ b/docs/_build/html/content/overlap.html
@@ -0,0 +1,173 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.19 overlap</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.20 bedToIgv" href="bedToIgv.html" />
+    <link rel="prev" title="5.18 bedToBam" href="bedToBam.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="bedToIgv.html" title="5.20 bedToIgv"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="bedToBam.html" title="5.18 bedToBam"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="overlap">
+<h1>5.19 overlap<a class="headerlink" href="#overlap" title="Permalink to this headline">¶</a></h1>
+<p><strong>overlap</strong> computes the amount of overlap (in the case of positive values) or distance (in the case of
+negative values) between feature coordinates occurring on the same input line and reports the result at
+the end of the same line. In this way, it is a useful method for computing custom overlap scores from
+the output of other BEDTools.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.19.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>overlap [OPTIONS] -i &lt;input&gt; -cols s1,e1,s2,e2</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="11%" />
+<col width="89%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-i</strong></td>
+<td>Input file. Use &#8220;stdin&#8221; for pipes.</td>
+</tr>
+<tr class="row-odd"><td><strong>-cols</strong></td>
+<td>Specify the columns (1-based) for the starts and ends of the features for which you&#8217;d like to compute the overlap/distance. The columns must be listed in the following order: <em>start1,end1,start2,end2</em></td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.19.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>The default behavior is to compute the amount of overlap between the features you specify based on the
+start and end coordinates. For example:</p>
+<div class="highlight-python"><pre>windowBed -a A.bed -b B.bed -w 10
+chr1  10  20  A  chr1  15  25  B
+chr1  10  20  C  chr1  25  35  D</pre>
+</div>
+<p># Now let&#8217;s say we want to compute the number of base pairs of overlap
+# between the overlapping features from the output of windowBed.</p>
+<div class="highlight-python"><pre>windowBed -a A.bed -b B.bed -w 10 | overlap -i stdin -cols 2,3,6,7
+chr1  10  20  A  chr1  15  25  B  5
+chr1  10  20  C  chr1  25  35  D  -5</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.19 overlap</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.19.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.19.2 Default behavior</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="bedToBam.html"
+                        title="previous chapter">5.18 bedToBam</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="bedToIgv.html"
+                        title="next chapter">5.20 bedToIgv</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/overlap.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="bedToIgv.html" title="5.20 bedToIgv"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="bedToBam.html" title="5.18 bedToBam"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/overview.html b/docs/_build/html/content/overview.html
new file mode 100644
index 00000000..74c2b9d7
--- /dev/null
+++ b/docs/_build/html/content/overview.html
@@ -0,0 +1,506 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Overview</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="Installation" href="installation.html" />
+    <link rel="prev" title="bedtools: a powerful toolset for genome arithmetic" href="../index.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="installation.html" title="Installation"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="../index.html" title="bedtools: a powerful toolset for genome arithmetic"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="overview">
+<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="background">
+<h2>1.1 Background<a class="headerlink" href="#background" title="Permalink to this headline">¶</a></h2>
+<p>The development of BEDTools was motivated by a need for fast, flexible tools with which to compare large sets of genomic
+features. Answering fundamental research questions with existing tools was either too slow or required modifications to the
+way they reported or computed their results. We were aware of the utilities on the UCSC Genome Browser and Galaxy websites, as
+well as the elegant tools available as part of Jim Kent’s monolithic suite of tools (“Kent source”). However, we found that
+the web-based tools were too cumbersome when working with large datasets generated by current sequencing technologies.
+Similarly, we found that the Kent source command line tools often required a local installation of the UCSC Genome Browser.
+These limitations, combined with the fact that we often wanted an extra option here or there that wasn’t available with
+existing tools, led us to develop our own from scratch. The initial version of BEDTools was publicly released in the spring of
+2009. The current version has evolved from our research experiences and those of the scientists using the suite over the last
+year. The BEDTools suite enables one to answer common questions of genomic data in a fast and reliable manner. The fact that
+almost all the utilities accept input from “stdin” allows one to “stream / pipe” several commands together to facilitate more
+complicated analyses. Also, the tools allow fine control over how output is reported. The initial version of BEDTools
+supported solely 6-column <a class="reference external" href="http://genome.ucsc.edu/FAQ/FAQformat#format1">BED</a> files. <em>However, we have subsequently added support for sequence alignments in</em> <a class="reference external" href="http://samtools.sourceforge.net/">BAM</a>
+<em>format, as well as for features in</em> <a class="reference external" href="http://genome.ucsc.edu/FAQ/FAQformat#format3">GFF</a> , <em>“blocked” BED format, and</em>
+<a class="reference external" href="http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant-call-format-version-41">VCF</a> <em>format</em>.
+The tools are quite fast and typically finish in a matter of a few seconds, even for large datasets. This manual seeks to describe the behavior and
+available functionality for each BEDTool. Usage examples are scattered throughout the text, and formal examples are
+provided in the last two sections, we hope that this document will give you a sense of the flexibility of
+the toolkit and the types of analyses that are possible with BEDTools. If you have further questions, please join the BEDTools
+discussion group, visit the Usage Examples on the Google Code site (usage, advanced usage), or take a look at the nascent
+“Usage From the Wild” page.</p>
+</div>
+<div class="section" id="summary-of-available-tools">
+<h2>1.2 Summary of available tools.<a class="headerlink" href="#summary-of-available-tools" title="Permalink to this headline">¶</a></h2>
+<p>BEDTools support a  wide range of operations for  interrogating and manipulating genomic features. The table below summarizes
+the tools available in the suite.</p>
+<table border="1" class="docutils">
+<colgroup>
+<col width="14%" />
+<col width="86%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Utility</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>intersectBed</strong></td>
+<td>Returns overlaps between two BED/GFF/VCF files.</td>
+</tr>
+<tr class="row-odd"><td><strong>pairToBed</strong></td>
+<td>Returns overlaps between a paired-end BED file and a regular BED/VCF/GFF file.</td>
+</tr>
+<tr class="row-even"><td><strong>bamToBed</strong></td>
+<td>Converts BAM alignments to BED6, BED12, or BEDPE format.</td>
+</tr>
+<tr class="row-odd"><td><strong>bedToBam</strong></td>
+<td>Converts BED/GFF/VCF features to BAM format.</td>
+</tr>
+<tr class="row-even"><td><strong>bed12ToBed6</strong></td>
+<td>Converts &#8220;blocked&#8221; BED12 features to discrete BED6 features.</td>
+</tr>
+<tr class="row-odd"><td><strong>bedToIgv</strong></td>
+<td>Creates IGV batch scripts for taking multiple snapshots from BED/GFF/VCF features.</td>
+</tr>
+<tr class="row-even"><td><strong>coverageBed</strong></td>
+<td>Summarizes the depth and breadth of coverage of features in one BED versus features (e.g, windows, exons, etc.) defined in another BED/GFF/VCF file.</td>
+</tr>
+<tr class="row-odd"><td><strong>multiBamCov</strong></td>
+<td>Counts sequence coverage for multiple position-sorted bams at specific loci defined in a BED/GFF/VCF file</td>
+</tr>
+<tr class="row-even"><td><strong>tagBam</strong></td>
+<td>Annotates a BAM file with custom tag fields based on overlaps with BED/GFF/VCF files</td>
+</tr>
+<tr class="row-odd"><td><strong>nuclBed</strong></td>
+<td>Profiles the nucleotide content of intervals in a fasta file</td>
+</tr>
+<tr class="row-even"><td><strong>genomeCoverageBed</strong></td>
+<td>Creates either a histogram, BEDGRAPH, or a &#8220;per base&#8221; report of genome coverage.</td>
+</tr>
+<tr class="row-odd"><td><strong>unionBedGraphs</strong></td>
+<td>Combines multiple BedGraph? files into a single file, allowing coverage/other comparisons between them.</td>
+</tr>
+<tr class="row-even"><td><strong>annotateBed</strong></td>
+<td>Annotates one BED/VCF/GFF file with overlaps from many others.</td>
+</tr>
+<tr class="row-odd"><td><strong>groupBy</strong></td>
+<td>Deprecated. Now in the filo package.</td>
+</tr>
+<tr class="row-even"><td><strong>overlap</strong></td>
+<td>Returns the number of bases pairs of overlap b/w two features on the same line.</td>
+</tr>
+<tr class="row-odd"><td><strong>pairToPair</strong></td>
+<td>Returns overlaps between two paired-end BED files.</td>
+</tr>
+<tr class="row-even"><td><strong>closestBed</strong></td>
+<td>Returns the closest feature to each entry in a BED/GFF/VCF file.</td>
+</tr>
+<tr class="row-odd"><td><strong>subtractBed</strong></td>
+<td>Removes the portion of an interval that is overlapped by another feature.</td>
+</tr>
+<tr class="row-even"><td><strong>windowBed</strong></td>
+<td>Returns overlaps between two BED/VCF/GFF files based on a user-defined window.</td>
+</tr>
+<tr class="row-odd"><td><strong>mergeBed</strong></td>
+<td>Merges overlapping features into a single feature.</td>
+</tr>
+<tr class="row-even"><td><strong>complementBed</strong></td>
+<td>Returns all intervals not spanned by the features in a BED/GFF/VCF file.</td>
+</tr>
+<tr class="row-odd"><td><strong>fastaFromBed</strong></td>
+<td>Creates FASTA sequences based on intervals in a BED/GFF/VCF file.</td>
+</tr>
+<tr class="row-even"><td><strong>maskFastaFromBed</strong></td>
+<td>Masks a FASTA file based on BED coordinates.</td>
+</tr>
+<tr class="row-odd"><td><strong>shuffleBed</strong></td>
+<td>Randomly permutes the locations of a BED file among a genome.</td>
+</tr>
+<tr class="row-even"><td><strong>slopBed</strong></td>
+<td>Adjusts each BED entry by a requested number of base pairs.</td>
+</tr>
+<tr class="row-odd"><td><strong>flankBed</strong></td>
+<td>Creates flanking intervals for each feature in a BED/GFF/VCF file.</td>
+</tr>
+<tr class="row-even"><td><strong>sortBed</strong></td>
+<td>Sorts a BED file by chrom, then start position. Other ways as well.</td>
+</tr>
+<tr class="row-odd"><td><strong>linksBed</strong></td>
+<td>Creates an HTML file of links to the UCSC or a custom browser.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="fundamental-concepts">
+<h2>1.3 Fundamental concepts.<a class="headerlink" href="#fundamental-concepts" title="Permalink to this headline">¶</a></h2>
+<div class="section" id="what-are-genome-features-and-how-are-they-represented">
+<h3>1.3.1 What are genome features and how are they represented?<a class="headerlink" href="#what-are-genome-features-and-how-are-they-represented" title="Permalink to this headline">¶</a></h3>
+<p>Throughout this manual, we will discuss how to use BEDTools to manipulate, compare and ask questions of genome “features”. Genome features can be functional elements (e.g., genes), genetic polymorphisms (e.g.
+SNPs, INDELs, or structural variants), or other annotations that have been discovered or curated by genome sequencing groups or genome browser groups. In addition, genome features can be custom annotations that
+an individual lab or researcher defines (e.g., my novel gene or variant).</p>
+<p>The basic characteristics of a genome feature are the chromosome or scaffold on which the feature “resides”, the base pair on which the
+feature starts (i.e. the “start”), the base pair on which feature ends (i.e. the “end”), the strand on which the feature exists (i.e. “+” or “-“), and the name of the feature if one is applicable.</p>
+<p>The two most widely used formats for representing genome features are the BED (Browser Extensible Data) and GFF (General Feature Format) formats. BEDTools was originally written to work exclusively with genome features
+described using the BED format, but it has been recently extended to seamlessly work with BED, GFF and VCF files.</p>
+<p>Existing annotations for the genomes of many species can be easily downloaded in BED and GFF
+format from the UCSC Genome Browser’s “Table Browser” (<a class="reference external" href="http://genome.ucsc.edu/cgi-bin/hgTables?command=start">http://genome.ucsc.edu/cgi-bin/hgTables?command=start</a>) or from the “Bulk Downloads” page (<a class="reference external" href="http://hgdownload.cse.ucsc.edu/downloads.html">http://hgdownload.cse.ucsc.edu/downloads.html</a>). In addition, the
+Ensemble Genome Browser contains annotations in GFF/GTF format for many species (<a class="reference external" href="http://www.ensembl.org/info/data/ftp/index.html">http://www.ensembl.org/info/data/ftp/index.html</a>)</p>
+</div>
+<div class="section" id="overlapping-intersecting-features">
+<h3>1.3.2 Overlapping / intersecting features.<a class="headerlink" href="#overlapping-intersecting-features" title="Permalink to this headline">¶</a></h3>
+<p>Two genome features (henceforth referred to as “features”) are said to overlap or intersect if they share at least one base in common.
+In the figure below, Feature A intersects/overlaps Feature B, but it does not intersect/overlap Feature C.</p>
+<p><strong>TODO: place figure here</strong></p>
+</div>
+<div class="section" id="comparing-features-in-file-a-and-file-b">
+<h3>1.3.3 Comparing features in file “A” and file “B”.<a class="headerlink" href="#comparing-features-in-file-a-and-file-b" title="Permalink to this headline">¶</a></h3>
+<p>The previous section briefly introduced a fundamental naming convention used in BEDTools. Specifically, all BEDTools that compare features contained in two distinct files refer to one file as feature set “A” and the other file as feature set “B”. This is mainly in the interest of brevity, but it also has its roots in set theory.
+As an example, if one wanted to look for SNPs (file A) that overlap with exons (file B), one would use intersectBed in the following manner:</p>
+<div class="highlight-python"><pre>intersectBed –a snps.bed –b exons.bed</pre>
+</div>
+<p>There are two exceptions to this rule: 1) When the “A” file is in BAM format, the “-abam” option must bed used. For example:</p>
+<div class="highlight-python"><pre>intersectBed –abam alignedReads.bam –b exons.bed</pre>
+</div>
+<p>And 2) For tools where only one input feature file is needed, the “-i” option is used. For example:</p>
+<div class="highlight-python"><pre>mergeBed –i repeats.bed</pre>
+</div>
+</div>
+<div class="section" id="bed-starts-are-zero-based-and-bed-ends-are-one-based">
+<h3>1.3.4 BED starts are zero-based and BED ends are one-based.<a class="headerlink" href="#bed-starts-are-zero-based-and-bed-ends-are-one-based" title="Permalink to this headline">¶</a></h3>
+<p>BEDTools users are sometimes confused by the way the start and end of BED features are represented. Specifically, BEDTools uses the UCSC Genome Browser’s internal database convention of making the start position 0-based and the end position 1-based: (<a class="reference external" href="http://genome.ucsc.edu/FAQ/FAQtracks#tracks1">http://genome.ucsc.edu/FAQ/FAQtracks#tracks1</a>)
+In other words, BEDTools interprets the “start” column as being 1 basepair higher than what is represented in the file. For example, the following BED feature represents a single base on chromosome 1; namely, the 1st base:</p>
+<div class="highlight-python"><pre>chr1   0        1    first_base</pre>
+</div>
+<p>Why, you might ask? The advantage of storing features this way is that when computing the length of a feature, one must simply subtract the start from the end. Were the start position 1-based,
+the calculation would be (slightly) more complex (i.e. (end-start)+1). Thus, storing BED features this way reduces the computational burden.</p>
+</div>
+<div class="section" id="gff-starts-and-ends-are-one-based">
+<h3>1.3.5 GFF starts and ends are one-based.<a class="headerlink" href="#gff-starts-and-ends-are-one-based" title="Permalink to this headline">¶</a></h3>
+<p>In contrast, the GFF format uses 1-based coordinates for both the start and the end positions. BEDTools is aware of this and adjusts the positions accordingly.
+In other words, you don’t need to subtract 1 from the start positions of your GFF features for them to work correctly with BEDTools.</p>
+</div>
+<div class="section" id="vcf-coordinates-are-one-based">
+<h3>1.3.6 VCF coordinates are one-based.<a class="headerlink" href="#vcf-coordinates-are-one-based" title="Permalink to this headline">¶</a></h3>
+<p>The VCF format uses 1-based coordinates. As in GFF, BEDTools is aware of this and adjusts the positions accordingly.
+In other words, you don’t need to subtract 1 from the start positions of your VCF features for them to work correctly with BEDTools.</p>
+</div>
+<div class="section" id="file-b-is-loaded-into-memory-most-of-the-time">
+<h3>1.3.7 File B is loaded into memory (most of the time).<a class="headerlink" href="#file-b-is-loaded-into-memory-most-of-the-time" title="Permalink to this headline">¶</a></h3>
+<p>Whenever a BEDTool compares two files of features, the “B” file is loaded into memory. By contrast, the “A” file is processed line by line and compared with the features from B.
+Therefore to minimize memory usage, one should set the smaller of the two files as the B file. One salient example is the comparison of aligned sequence reads from a
+current DNA sequencer to gene annotations.      In this case, the aligned sequence file (in BED format) may have tens of millions of features (the sequence alignments),
+while the gene annotation file will have tens of thousands of features. In this case, it is wise to sets the reads as file A and the genes as file B.</p>
+</div>
+<div class="section" id="feature-files-must-be-tab-delimited">
+<h3>1.3.8 Feature files <em>must</em> be tab-delimited.<a class="headerlink" href="#feature-files-must-be-tab-delimited" title="Permalink to this headline">¶</a></h3>
+<p>This is rather self-explanatory. While it is possible to allow BED files to be space-delimited, we have decided to require tab delimiters for three reasons:</p>
+<ol class="arabic simple">
+<li>By requiring one delimiter type, the processing time is minimized.</li>
+<li>Tab-delimited files are more amenable to other UNIX utilities.</li>
+<li>GFF files can contain spaces within attribute columns. This complicates the use of space-delimited files as spaces must therefore be treated specially depending on the context.</li>
+</ol>
+</div>
+<div class="section" id="all-bedtools-allow-features-to-be-piped-via-standard-input">
+<h3>1.3.9 All BEDTools allow features to be “piped” via standard input.<a class="headerlink" href="#all-bedtools-allow-features-to-be-piped-via-standard-input" title="Permalink to this headline">¶</a></h3>
+<p>In an effort to allow one to combine multiple BEDTools and other UNIX utilities into more complicated “pipelines”, all BEDTools allow features
+to be passed to them via standard input. Only one feature file may be passed to a BEDTool via standard input.
+The convention used by all BEDTools is to set either file A or file B to “stdin” or &#8220;-&#8221;. For example:</p>
+<div class="highlight-python"><pre>cat snps.bed | intersectBed –a stdin –b exons.bed
+cat snps.bed | intersectBed –a - –b exons.bed</pre>
+</div>
+<p>In addition, all BEDTools that simply require one main input file (the -i file) will assume that input is
+coming from standard input if the -i parameter is ignored. For example, the following are equivalent:</p>
+<div class="highlight-python"><pre>cat snps.bed | sortBed –i stdin
+cat snps.bed | sortBed</pre>
+</div>
+</div>
+<div class="section" id="most-bedtools-write-their-results-to-standard-output">
+<h3>1.3.10 Most BEDTools write their results to standard output.<a class="headerlink" href="#most-bedtools-write-their-results-to-standard-output" title="Permalink to this headline">¶</a></h3>
+<p>To allow one to combine multiple BEDTools and other UNIX utilities into more complicated “pipelines”,
+most BEDTools report their output to standard output, rather than to a named file. If one wants to write the output to a named file, one can use the UNIX “file redirection” symbol “&gt;” to do so.
+Writing to standard output (the default):</p>
+<div class="highlight-python"><pre>intersectBed –a snps.bed –b exons.bed
+chr1 100100 100101 rs233454
+chr1 200100 200101 rs446788
+chr1 300100 300101 rs645678</pre>
+</div>
+<p>Writing to a file:</p>
+<div class="highlight-python"><pre>intersectBed –a snps.bed –b exons.bed &gt; snps.in.exons.bed
+
+cat snps.in.exons.bed
+chr1 100100 100101 rs233454
+chr1 200100 200101 rs446788
+chr1 300100 300101 rs645678</pre>
+</div>
+</div>
+<div class="section" id="what-is-a-genome-file">
+<h3>1.3.11 What is a “genome” file?<a class="headerlink" href="#what-is-a-genome-file" title="Permalink to this headline">¶</a></h3>
+<p>Some of the BEDTools (e.g., genomeCoverageBed, complementBed, slopBed) need to know the size of
+the chromosomes for the organism for which your BED files are based. When using the UCSC Genome
+Browser, Ensemble, or Galaxy, you typically indicate which species / genome build you are working.
+The way you do this for BEDTools is to create a “genome” file, which simply lists the names of the
+chromosomes (or scaffolds, etc.) and their size (in basepairs).
+Genome files must be tab-delimited and are structured as follows (this is an example for C. elegans):</p>
+<div class="highlight-python"><pre>chrI 15072421
+chrII 15279323
+...
+chrX 17718854
+chrM 13794</pre>
+</div>
+<p>BEDTools includes predefined genome files for human and mouse in the /genomes directory included
+in the BEDTools distribution. Additionally, the “chromInfo” files/tables available from the UCSC
+Genome Browser website are acceptable. For example, one can download the hg19 chromInfo file here:
+<a class="reference external" href="http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/chromInfo.txt.gz">http://hgdownload.cse.ucsc.edu/goldenPath/hg19/database/chromInfo.txt.gz</a></p>
+</div>
+<div class="section" id="paired-end-bed-files-bedpe-files">
+<h3>1.3.12 Paired-end BED files (BEDPE files).<a class="headerlink" href="#paired-end-bed-files-bedpe-files" title="Permalink to this headline">¶</a></h3>
+<p>We have defined a new file format (BEDPE) to concisely describe disjoint genome features, such as
+structural variations or paired-end sequence alignments. We chose to define a new format because the
+existing BED block format (i.e. BED12) does not allow inter-chromosomal feature definitions. Moreover,
+the BED12 format feels rather bloated when one want to describe events with only two blocks.</p>
+</div>
+<div class="section" id="use-h-for-help-with-any-bedtool">
+<h3>1.3.13 Use “-h” for help with any BEDTool.<a class="headerlink" href="#use-h-for-help-with-any-bedtool" title="Permalink to this headline">¶</a></h3>
+<p>Rather straightforward. If you use the “-h” option with any BEDTool, a full menu of example usage
+and available options (when applicable) will be reported.</p>
+</div>
+<div class="section" id="bed-features-must-not-contain-negative-positions">
+<h3>1.3.14 BED features must not contain negative positions.<a class="headerlink" href="#bed-features-must-not-contain-negative-positions" title="Permalink to this headline">¶</a></h3>
+<p>BEDTools will typically reject BED features that contain negative positions. In special cases, however,
+BEDPE positions may be set to -1 to indicate that one or more ends of a BEDPE feature is unaligned.</p>
+</div>
+<div class="section" id="the-start-position-must-be-to-the-end-position">
+<h3>1.3.15 The start position must be &lt;= to the end position.<a class="headerlink" href="#the-start-position-must-be-to-the-end-position" title="Permalink to this headline">¶</a></h3>
+<p>BEDTools will reject BED features where the start position is greater than the end position.</p>
+</div>
+<div class="section" id="headers-are-allowed-in-gff-and-bed-files">
+<h3>1.3.16 Headers are allowed in GFF and BED files<a class="headerlink" href="#headers-are-allowed-in-gff-and-bed-files" title="Permalink to this headline">¶</a></h3>
+<p>BEDTools will ignore headers at the beginning of BED and GFF files. Valid header lines begin with a
+“#” symbol, the work “track”, or the word “browser”. For example, the following examples are valid
+headers for BED or GFF files:</p>
+<div class="highlight-python"><pre>track name=aligned_read description="Illumina aligned reads”
+chr5 100000 500000 read1 50 +
+chr5 2380000 2386000 read2 60 -
+
+#This is a fascinating dataset
+chr5 100000 500000 read1 50 +
+chr5 2380000 2386000 read2 60 -
+
+browser position chr22:1-20000
+chr5 100000 500000 read1 50 +
+chr5 2380000 2386000 read2 60 -</pre>
+</div>
+</div>
+<div class="section" id="gzip-support-bed-gff-vcf-and-bedpe-file-can-be-gzipped">
+<h3>1.3.17 GZIP support: BED, GFF, VCF, and BEDPE file can be “gzipped”<a class="headerlink" href="#gzip-support-bed-gff-vcf-and-bedpe-file-can-be-gzipped" title="Permalink to this headline">¶</a></h3>
+<p>BEDTools will process gzipped BED, GFF, VCF and BEDPE files in the same manner as
+uncompressed files. Gzipped files are auto-detected thanks to a helpful contribution from Gordon
+Assaf.</p>
+</div>
+<div class="section" id="support-for-split-or-spliced-bam-alignments-and-blocked-bed-features">
+<h3>1.3.18 Support for “split” or “spliced” BAM alignments and “blocked” BED features<a class="headerlink" href="#support-for-split-or-spliced-bam-alignments-and-blocked-bed-features" title="Permalink to this headline">¶</a></h3>
+<p>As of Version 2.8.0, five BEDTools (<tt class="docutils literal"><span class="pre">intersectBed</span></tt>, <tt class="docutils literal"><span class="pre">coverageBed</span></tt>, <tt class="docutils literal"><span class="pre">genomeCoverageBed</span></tt>,
+<tt class="docutils literal"><span class="pre">bamToBed</span></tt>, and <tt class="docutils literal"><span class="pre">bed12ToBed6</span></tt>) can properly handle “split”/”spliced” BAM alignments (i.e., having an
+“N” CIGAR operation) and/or “blocked” BED (aka BED12) features.</p>
+<p><tt class="docutils literal"><span class="pre">intersectBed</span></tt>, <tt class="docutils literal"><span class="pre">coverageBed</span></tt>, and <tt class="docutils literal"><span class="pre">genomeCoverageBed</span></tt> will optionally handle “split” BAM and/or
+“blocked” BED by using the <tt class="docutils literal"><span class="pre">-split</span></tt> option. This will cause intersects or coverage to be computed only
+for the alignment or feature blocks. In contrast, without this option, the intersects/coverage would be
+computed for the entire “span” of the alignment or feature, regardless of the size of the gaps between
+each alignment or feature block. For example, imagine you have a RNA-seq read that originates from
+the junction of two exons that were spliced together in a mRNA. In the genome, these two exons
+happen to be 30Kb apart. Thus, when the read is aligned to the reference genome, one portion of the
+read will align to the first exon, while another portion of the read will align ca. 30Kb downstream to the
+other exon. The corresponding CIGAR string would be something like (assuming a 76bp read):
+30M*3000N*46M. In the genome, this alignment “spans” 3076 bp, yet the nucleotides in the sequencing
+read only align “cover” 76bp. Without the <tt class="docutils literal"><span class="pre">-split</span></tt> option, coverage or overlaps would be reported for the
+entire 3076bp span of the alignment. However, with the <tt class="docutils literal"><span class="pre">-split</span></tt> option, coverage or overlaps will only
+be reported for the portions of the read that overlap the exons (i.e. 30bp on one exon, and
+46bp on the other).</p>
+<p>Using the -split option with bamToBed causes “spliced/split” alignments to be reported in BED12
+format. Using the -split option with bed12ToBed6 causes “blocked” BED12 features to be reported in
+BED6 format.</p>
+</div>
+<div class="section" id="writing-uncompressed-bam-output">
+<h3>1.3.19 Writing uncompressed BAM output.<a class="headerlink" href="#writing-uncompressed-bam-output" title="Permalink to this headline">¶</a></h3>
+<p>When working with a large BAM file using a complex set of tools in a pipe/stream, it is advantageous
+to pass uncompressed BAM output to each downstream program. This minimizes the amount of time
+spent compressing and decompressing output from one program to the next. All BEDTools that create
+BAM output (e.g. <tt class="docutils literal"><span class="pre">intersectBed</span></tt>, <tt class="docutils literal"><span class="pre">windowBed</span></tt>) will now optionally create uncompressed BAM output
+using the <tt class="docutils literal"><span class="pre">-ubam</span></tt> option.</p>
+</div>
+</div>
+<div class="section" id="implementation-and-algorithmic-notes">
+<h2>1.4 Implementation and algorithmic notes.<a class="headerlink" href="#implementation-and-algorithmic-notes" title="Permalink to this headline">¶</a></h2>
+<p>BEDTools was implemented in C++ and makes extensive use of data structures and fundamental
+algorithms from the Standard Template Library (STL). Many of the core algorithms are based upon the
+genome binning algorithm described in the original UCSC Genome Browser paper (Kent et al, 2002).
+The tools have been designed to inherit core data structures from central source files, thus allowing
+rapid tool development and deployment of improvements and corrections. Support for BAM files is
+made possible through Derek Barnett’s elegant C++ API called BamTools.</p>
+</div>
+<div class="section" id="license-and-availability">
+<h2>1.5 License and availability.<a class="headerlink" href="#license-and-availability" title="Permalink to this headline">¶</a></h2>
+<p>BEDTools is freely available under a GNU Public License (Version 2) at:
+<a class="reference external" href="http://bedtools.googlecode.com">http://bedtools.googlecode.com</a></p>
+</div>
+<div class="section" id="mailing-list">
+<h2>1.6 Mailing list.<a class="headerlink" href="#mailing-list" title="Permalink to this headline">¶</a></h2>
+<p>A discussion group for reporting bugs, asking questions of the developer and of the user community, as
+well as for requesting new features is available at:
+<a class="reference external" href="http://groups.google.com/group/bedtools-discuss">http://groups.google.com/group/bedtools-discuss</a></p>
+</div>
+<div class="section" id="contributors">
+<h2>1.7 Contributors.<a class="headerlink" href="#contributors" title="Permalink to this headline">¶</a></h2>
+<p>As open-source software, BEDTools greatly benefits from contributions made by other developers and
+users of the tools. We encourage and welcome suggestions, contributions and complaints. This is how
+software matures, improves and stays on top of the needs of its user community. The Google Code
+(GC) site maintains a list of individuals who have contributed either source code or useful ideas for
+improving the tools. In the near future, we hope to maintain a source repository on the GC site in
+order to facilitate further contributions. We are currently unable to do so because we use Git for
+version control, which is not yet supported by GC.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Overview</a><ul>
+<li><a class="reference internal" href="#background">1.1 Background</a></li>
+<li><a class="reference internal" href="#summary-of-available-tools">1.2 Summary of available tools.</a></li>
+<li><a class="reference internal" href="#fundamental-concepts">1.3 Fundamental concepts.</a><ul>
+<li><a class="reference internal" href="#what-are-genome-features-and-how-are-they-represented">1.3.1 What are genome features and how are they represented?</a></li>
+<li><a class="reference internal" href="#overlapping-intersecting-features">1.3.2 Overlapping / intersecting features.</a></li>
+<li><a class="reference internal" href="#comparing-features-in-file-a-and-file-b">1.3.3 Comparing features in file “A” and file “B”.</a></li>
+<li><a class="reference internal" href="#bed-starts-are-zero-based-and-bed-ends-are-one-based">1.3.4 BED starts are zero-based and BED ends are one-based.</a></li>
+<li><a class="reference internal" href="#gff-starts-and-ends-are-one-based">1.3.5 GFF starts and ends are one-based.</a></li>
+<li><a class="reference internal" href="#vcf-coordinates-are-one-based">1.3.6 VCF coordinates are one-based.</a></li>
+<li><a class="reference internal" href="#file-b-is-loaded-into-memory-most-of-the-time">1.3.7 File B is loaded into memory (most of the time).</a></li>
+<li><a class="reference internal" href="#feature-files-must-be-tab-delimited">1.3.8 Feature files <em>must</em> be tab-delimited.</a></li>
+<li><a class="reference internal" href="#all-bedtools-allow-features-to-be-piped-via-standard-input">1.3.9 All BEDTools allow features to be “piped” via standard input.</a></li>
+<li><a class="reference internal" href="#most-bedtools-write-their-results-to-standard-output">1.3.10 Most BEDTools write their results to standard output.</a></li>
+<li><a class="reference internal" href="#what-is-a-genome-file">1.3.11 What is a “genome” file?</a></li>
+<li><a class="reference internal" href="#paired-end-bed-files-bedpe-files">1.3.12 Paired-end BED files (BEDPE files).</a></li>
+<li><a class="reference internal" href="#use-h-for-help-with-any-bedtool">1.3.13 Use “-h” for help with any BEDTool.</a></li>
+<li><a class="reference internal" href="#bed-features-must-not-contain-negative-positions">1.3.14 BED features must not contain negative positions.</a></li>
+<li><a class="reference internal" href="#the-start-position-must-be-to-the-end-position">1.3.15 The start position must be &lt;= to the end position.</a></li>
+<li><a class="reference internal" href="#headers-are-allowed-in-gff-and-bed-files">1.3.16 Headers are allowed in GFF and BED files</a></li>
+<li><a class="reference internal" href="#gzip-support-bed-gff-vcf-and-bedpe-file-can-be-gzipped">1.3.17 GZIP support: BED, GFF, VCF, and BEDPE file can be “gzipped”</a></li>
+<li><a class="reference internal" href="#support-for-split-or-spliced-bam-alignments-and-blocked-bed-features">1.3.18 Support for “split” or “spliced” BAM alignments and “blocked” BED features</a></li>
+<li><a class="reference internal" href="#writing-uncompressed-bam-output">1.3.19 Writing uncompressed BAM output.</a></li>
+</ul>
+</li>
+<li><a class="reference internal" href="#implementation-and-algorithmic-notes">1.4 Implementation and algorithmic notes.</a></li>
+<li><a class="reference internal" href="#license-and-availability">1.5 License and availability.</a></li>
+<li><a class="reference internal" href="#mailing-list">1.6 Mailing list.</a></li>
+<li><a class="reference internal" href="#contributors">1.7 Contributors.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="../index.html"
+                        title="previous chapter"><strong>bedtools</strong>: <em>a powerful toolset for genome arithmetic</em></a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="installation.html"
+                        title="next chapter">Installation</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/overview.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="installation.html" title="Installation"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="../index.html" title="bedtools: a powerful toolset for genome arithmetic"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/pairToBed.html b/docs/_build/html/content/pairToBed.html
new file mode 100644
index 00000000..65bbd4ff
--- /dev/null
+++ b/docs/_build/html/content/pairToBed.html
@@ -0,0 +1,495 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.2 pairToBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.3 pairToPair" href="pairToPair.html" />
+    <link rel="prev" title="5.1 intersect" href="intersectBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="pairToPair.html" title="5.3 pairToPair"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="intersectBed.html" title="5.1 intersect"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="pairtobed">
+<h1>5.2 pairToBed<a class="headerlink" href="#pairtobed" title="Permalink to this headline">¶</a></h1>
+<p><strong>pairToBed</strong> compares each end of a BEDPE feature or a paired-end BAM alignment to a feature file in
+search of overlaps.</p>
+<p><strong>NOTE: pairToBed requires that the BAM file is sorted/grouped by the read name. This
+allows pairToBed to extract correct alignment coordinates for each end based on their
+respective CIGAR strings. It also assumes that the alignments for a given pair come in
+groups of twos. There is not yet a standard method for reporting multiple alignments
+using BAM. pairToBed will fail if an aligner does not report alignments in pairs.</strong></p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.2.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage:</strong></p>
+<div class="highlight-python"><pre>pairToBed [OPTIONS] [-a &lt;BEDPE&gt; || -abam &lt;BAM&gt;] -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="10%" />
+<col width="90%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-a</strong></td>
+<td>BEDPE file A. Each feature in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe. Output will be in BEDPE format.</td>
+</tr>
+<tr class="row-odd"><td><strong>-b</strong></td>
+<td>BED file B. Use &#8220;stdin&#8221; if passing B with a UNIX pipe.</td>
+</tr>
+<tr class="row-even"><td><strong>-abam</strong></td>
+<td>BAM file A. Each end of each BAM alignment in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe: For example: samtools view ?Cb &lt;BAM&gt; | pairToBed ?Cabam stdin ?Cb genes.bed | samtools view -</td>
+</tr>
+<tr class="row-odd"><td><strong>-ubam</strong></td>
+<td>Write uncompressed BAM output. The default is write compressed BAM output.</td>
+</tr>
+<tr class="row-even"><td><strong>-bedpe</strong></td>
+<td>When using BAM input (-abam), write output as BEDPE. The default is to write output in BAM when using -abam. For example: pairToBed ?Cabam reads.bam ?Cb genes.bed ?Cbedpe</td>
+</tr>
+<tr class="row-odd"><td><strong>-ed</strong></td>
+<td>Use BAM total edit distance (NM tag) for BEDPE score. Default for BEDPE is to use the <em>minimum</em> of the two mapping qualities for the pair. When -ed is used the <em>total</em> edit distance from the two mates is reported as the score.</td>
+</tr>
+<tr class="row-even"><td><strong>-f</strong></td>
+<td>Minimum overlap required as a fraction of A. Default is 1E-9 (i.e. 1bp).</td>
+</tr>
+<tr class="row-odd"><td><strong>-s</strong></td>
+<td>Force &#8220;strandedness&#8221;. That is, only report hits in B that overlap A on the <strong>same</strong> strand. By default, overlaps are reported without respect to strand.</td>
+</tr>
+<tr class="row-even"><td><strong>-type</strong></td>
+<td><p class="first">Approach to reporting overlaps between BEDPE and BED.</p>
+<blockquote class="last">
+<div><blockquote>
+<div><p><strong>either-</strong> Report overlaps if either end of A overlaps B.</p>
+<ul class="simple">
+<li><em>Default</em></li>
+</ul>
+<p><strong>neither-</strong> Report A if neither end of A overlaps B.</p>
+<p><strong>xor-</strong> Report overlaps if one and only one end of A overlaps B.</p>
+<p><strong>both-</strong> Report overlaps if both ends of A overlap B.</p>
+<p><strong>notboth-</strong> Report overlaps if neither end or one and only one end of A overlap B.</p>
+<p><strong>ispan-</strong> Report overlaps between [end1, start2] of A and B.</p>
+<ul class="simple">
+<li>Note: If chrom1 &lt;&gt; chrom2, entry is ignored.</li>
+</ul>
+</div></blockquote>
+<p><strong>ospan-</strong> Report overlaps between [start1, end2] of A and B.</p>
+<blockquote>
+<div><ul class="simple">
+<li>Note: If chrom1 &lt;&gt; chrom2, entry is ignored.</li>
+</ul>
+<p><strong>notispan-</strong>  Report A if ispan of A doesn&#8217;t overlap B.
+- Note: If chrom1 &lt;&gt; chrom2, entry is ignored.</p>
+<p><strong>notospan-</strong>  Report A if ospan of A doesn&#8217;t overlap B.
+- Note: If chrom1 &lt;&gt; chrom2, entry is ignored.</p>
+</div></blockquote>
+</div></blockquote>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.2.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, a BEDPE / BAM feature will be reported if <em>either</em> end overlaps a feature in the BED file.
+In the example below, the left end of the pair overlaps B yet the right end does not. Thus, BEDPE/
+BAM A is reported since the default is to report A if either end overlaps B.</p>
+<p>Default: Report A if <em>either</em> end overlaps B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+</div>
+<div class="section" id="type-optional-overlap-requirements">
+<h2>5.2.3 (-type)Optional overlap requirements<a class="headerlink" href="#type-optional-overlap-requirements" title="Permalink to this headline">¶</a></h2>
+<p>Using then <strong>-type</strong> option, <strong>pairToBed</strong> provides several other overlap requirements for controlling how
+overlaps between BEDPE/BAM A and BED B are reported. The examples below illustrate how each
+option behaves.</p>
+<p><strong>-type both</strong>: Report A only if <em>both</em> ends overlap B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                   ^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+<p><strong>-type neither</strong>: Report A only if <em>neither</em> end overlaps B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B   ^^^^                                                  ^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+<p><strong>-type xor</strong>: Report A only if <em>one and only one</em> end overlaps B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result              =====.................................=====
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^                                   ^^^^^^
+
+Result</pre>
+</div>
+<p><strong>-type notboth</strong>: Report A only if <em>neither end</em> <strong>or</strong> <em>one and only one</em> end overlaps B. Thus &#8220;notboth&#8221;
+includes what would be reported by &#8220;neither&#8221; and by &#8220;xor&#8221;.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result              =====.................................=====
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B     ^^^                                               ^^^^^^
+
+Result              =====.................................=====
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^                                   ^^^^^^
+
+Result</pre>
+</div>
+<p><strong>-type ispan</strong>: Report A if it&#8217;s &#8220;<em>inner span</em>&#8221; overlaps B. Applicable only to intra-chromosomal features.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+              Inner span |-------------------------------|
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B                         ^^^^^^^^
+
+Result              =====.................................=====
+
+
+
+BEDPE/BAM A         =====.................................=====
+
+BED File B         ====
+
+Result</pre>
+</div>
+<p><strong>-type ospan</strong>: Report A if it&#8217;s &#8220;<em>outer span</em>&#8221; overlaps B. Applicable only to intra-chromosomal features.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+        Outer span  |-----------------------------------------|
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B             ^^^^^^^^^^^^
+
+Result              =====.................................=====
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B     ^^^^
+
+Result</pre>
+</div>
+<p><strong>-type notispan</strong>: Report A only if it&#8217;s &#8220;<em>inner span</em>&#8221; does not overlap B. Applicable only to intrachromosomal
+features.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+              Inner span |-------------------------------|
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B                         ^^^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^
+
+Result              =====.................................=====</pre>
+</div>
+<p><strong>-type notospan</strong>: Report A if it&#8217;s &#8220;<em>outer span</em>&#8221; overlaps B. Applicable only to intra-chromosomal
+features.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+        Outer span  |-----------------------------------------|
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B             ^^^^^^^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B     ^^^^
+
+Result              =====.................................=====</pre>
+</div>
+</div>
+<div class="section" id="f-requiring-a-minimum-overlap-fraction">
+<h2>5.2.4 (-f)Requiring a minimum overlap fraction<a class="headerlink" href="#f-requiring-a-minimum-overlap-fraction" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>pairToBed</strong> will report an overlap between A and B so long as there is at least one base
+pair is overlapping on either end. Yet sometimes you may want to restrict reported overlaps between A
+and B to cases where the feature in B overlaps at least X% (e.g. 50%) of A. The <strong>?Cf</strong> option does exactly
+this. The <strong>-f</strong> option may also be combined with the -type option for additional control. For example,
+combining <strong>-f 0.50</strong> with <strong>-type both</strong> requires that both ends of A have at least 50% overlap with a
+feature in B.</p>
+<p>For example, report A only at least 50% of one of the two ends is overlapped by B.</p>
+<div class="highlight-python"><pre>pairToBed -a A.bedpe -b B.bed -f 0.5
+
+
+Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^                                           ^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^                                         ^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+</div>
+<div class="section" id="s-enforcing-strandedness">
+<h2>5.2.5 (-s)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#s-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>pairToBed</strong> will report overlaps between features even if the features are on opposing
+strands. However, if strand information is present in both files and the <strong>&#8220;-s&#8221;</strong> option is used, overlaps will
+only be reported when features are on the same strand.</p>
+<p>For example, report A only at least 50% of one of the two ends is overlapped by B.</p>
+<div class="highlight-python"><pre>pairToBed -a A.bedpe -b B.bed -s
+
+
+
+Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         &gt;&gt;&gt;&gt;&gt;.................................&lt;&lt;&lt;&lt;&lt;
+
+BED File B         &lt;&lt;                                           &gt;&gt;&gt;&gt;&gt;
+
+Result
+
+
+
+BEDPE/BAM A         &gt;&gt;&gt;&gt;&gt;.................................&lt;&lt;&lt;&lt;&lt;
+
+BED File B         &gt;&gt;                                          &gt;&gt;&gt;&gt;&gt;
+
+Result              &gt;&gt;&gt;&gt;&gt;.................................&lt;&lt;&lt;&lt;&lt;</pre>
+</div>
+</div>
+<div class="section" id="abam-default-is-to-write-bam-output-when-using-bam-input">
+<h2>5.2.6 (-abam)Default is to write BAM output when using BAM input<a class="headerlink" href="#abam-default-is-to-write-bam-output-when-using-bam-input" title="Permalink to this headline">¶</a></h2>
+<p>When comparing <em>paired</em> alignments in BAM format (<strong>-abam</strong>) to features in BED format (<strong>-b</strong>),
+<strong>pairToBed</strong> will , by default, write the output in BAM format. That is, each alignment in the BAM
+file that meets the user&#8217;s criteria will be written (to standard output) in BAM format. This serves as a
+mechanism to create subsets of BAM alignments are of biological interest, etc. Note that both
+alignments for each aligned pair will be written to the BAM output.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>pairToBed ?Cabam pairedReads.bam ?Cb simreps.bed | samtools view - | head -4
+
+JOBU_0001:3:1:4:1060#0 99 chr10 42387928 29 50M = 42393091 5 2 1 3
+AA A A A C G G A A T T A T C G A A T G G A A T C G A A G A G A A T C T T C G A A C G G A C C C G A
+dcgggggfbgfgdgggggggfdfgggcggggfcggcggggggagfgbggc XT:A:R NM:i:5 SM:i:0 AM:i:0 X0:i:3 X 1 : i :
+3 XM:i:5 XO:i:0 XG:i:0 MD:Z:0T0C33A5T4T3
+JOBU_0001:3:1:4:1060#0 147 chr10 42393091 0 50M = 42387928 - 5 2 1 3
+AAATGGAATCGAATGGAATCAACATCAAATGGAATCAAATGGAATCATTG K g d c g g d e c d g
+\d`ggfcgcggffcgggc^cgfgccgggfc^gcdgg\bg XT:A:R NM:i:2 SM:i:0 AM:i:0 X0:i:3 X1:i:13 XM:i:2 X O : i :
+0 XG:i:0 MD:Z:21T14G13
+JOBU_0001:3:1:8:446#0 99 chr10 42388091 9 50M = 42392738 4 6 9 7
+GAATCGACTGGAATCATCATCGGATGGAAATGAATGGAATAATCATCGAA f _ O f f ` ] I e Y f f ` f f e d d c f e f c P ` c _ W \ \ R _ ]
+_BBBBBBBBBBBBBBBB XT:A:U NM:i:4 SM:i:0 AM:i:0 X0:i:1 X1:i:3 XM:i:4 XO:i:0 XG:i:0 M D : Z :
+7A22C9C2T6
+JOBU_0001:3:1:8:446#0 147 chr10 42392738 9 50M = 42388091 - 4 6 9 7
+TTATCGAATGCAATCGAATGGAATTATCGAATGCAATCGAATAGAATCAT df^ffec_JW[`MWceRec``fee`dcecfeeZae`c]
+f^cNeecfccf^ XT:A:R NM:i:1 SM:i:0 AM:i:0 X0:i:2 X1:i:2 XM:i:1 XO:i:0 XG:i:0 MD:Z:38A11</pre>
+</div>
+</div>
+<div class="section" id="bedpe-output-bedpe-format-when-using-bam-input">
+<h2>5.2.7 (-bedpe)Output BEDPE format when using BAM input<a class="headerlink" href="#bedpe-output-bedpe-format-when-using-bam-input" title="Permalink to this headline">¶</a></h2>
+<p>When comparing <em>paired</em> alignments in BAM format (<strong>-abam</strong>) to features in BED format (<strong>-b</strong>),
+<strong>pairToBed</strong> will optionally write the output in BEDPE format. That is, each alignment in the BAM
+file is converted to a 10 column BEDPE feature and if overlaps are found (or not) based on the user&#8217;s
+criteria, the BAM alignment will be reported in BEDPE format. The BEDPE &#8220;name&#8221; field is comprised
+of the RNAME field in the BAM alignment. The &#8220;score&#8221; field is the mapping quality score from the
+BAM alignment.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>pairToBed ?Cabam pairedReads.bam ?Cb simreps.bed -bedpe | head -5
+chr10 42387927     42387977    chr10   42393090   42393140
+      JOBU_0001:3:1:4:1060#0   29      +     -
+chr10 42388090 42388140        chr10   42392737   42392787
+      JOBU_0001:3:1:8:446#0    9       +     -
+chr10 42390552 42390602        chr10   42396045   42396095
+      JOBU_0001:3:1:10:1865#0  9       +     -
+chrX  139153741 139153791      chrX    139159018  139159068
+      JOBU_0001:3:1:14:225#0   37      +     -
+chr4  9236903 9236953          chr4    9242032    9242082
+      JOBU_0001:3:1:15:1362#0  0       +     -</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.2 pairToBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.2.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.2.2 Default behavior</a></li>
+<li><a class="reference internal" href="#type-optional-overlap-requirements">5.2.3 (-type)Optional overlap requirements</a></li>
+<li><a class="reference internal" href="#f-requiring-a-minimum-overlap-fraction">5.2.4 (-f)Requiring a minimum overlap fraction</a></li>
+<li><a class="reference internal" href="#s-enforcing-strandedness">5.2.5 (-s)Enforcing &#8220;strandedness&#8221;</a></li>
+<li><a class="reference internal" href="#abam-default-is-to-write-bam-output-when-using-bam-input">5.2.6 (-abam)Default is to write BAM output when using BAM input</a></li>
+<li><a class="reference internal" href="#bedpe-output-bedpe-format-when-using-bam-input">5.2.7 (-bedpe)Output BEDPE format when using BAM input</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="intersectBed.html"
+                        title="previous chapter">5.1 intersect</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="pairToPair.html"
+                        title="next chapter">5.3 pairToPair</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/pairToBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="pairToPair.html" title="5.3 pairToPair"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="intersectBed.html" title="5.1 intersect"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/pairToPair.html b/docs/_build/html/content/pairToPair.html
new file mode 100644
index 00000000..081bb31a
--- /dev/null
+++ b/docs/_build/html/content/pairToPair.html
@@ -0,0 +1,237 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.3 pairToPair</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.4 bamToBed" href="bamToBed.html" />
+    <link rel="prev" title="5.2 pairToBed" href="pairToBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="bamToBed.html" title="5.4 bamToBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="pairToBed.html" title="5.2 pairToBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="pairtopair">
+<h1>5.3 pairToPair<a class="headerlink" href="#pairtopair" title="Permalink to this headline">¶</a></h1>
+<p><strong>pairToPair</strong> compares two BEDPE files in search of overlaps where each end of a BEDPE feature in A
+overlaps with the ends of a feature in B. For example, using pairToPair, one could screen for the exact
+same discordant paired-end alignment in two files. This could suggest (among other things) that the
+discordant pair suggests the same structural variation in each file/sample.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.3.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage:</strong></p>
+<div class="highlight-python"><pre>pairToPair [OPTIONS] -a &lt;BEDPE&gt; -b &lt;BEDPE&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="14%" />
+<col width="86%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-a</strong></td>
+<td>BEDPE file A. Each feature in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe.</td>
+</tr>
+<tr class="row-odd"><td><strong>-b</strong></td>
+<td>BEDPE file B. Use &#8220;stdin&#8221; if passing B with a UNIX pipe.</td>
+</tr>
+<tr class="row-even"><td><strong>-f</strong></td>
+<td>Minimum overlap required as a fraction of A. Default is 1E-9 (i.e. 1bp).</td>
+</tr>
+<tr class="row-odd"><td><strong>-is</strong></td>
+<td>Force &#8220;strandedness&#8221;. That is, only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand.</td>
+</tr>
+<tr class="row-even"><td><strong>-type</strong></td>
+<td><blockquote class="first">
+<div>Approach to reporting overlaps between BEDPE and BED.</div></blockquote>
+<div class="line-block">
+<div class="line"><strong>either</strong> Report overlaps if either ends of A overlap B.</div>
+</div>
+<blockquote class="last">
+<div><div class="line-block">
+<div class="line"><strong>neither</strong> Report A if neither end of A overlaps B.</div>
+</div>
+<div class="line-block">
+<div class="line"><strong>both</strong> Report overlaps if both ends of A overlap B.   -<em>Default behavior.</em></div>
+</div>
+</div></blockquote>
+</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.3.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, a BEDPE feature from A will be reported if <em>both</em> ends overlap a feature in the BEDPE B
+file. If strand information is present for the two BEDPE files, it will be further required that the
+overlaps on each end be on the same strand. This way, an otherwise overlapping (in terms of genomic
+locations) F/R alignment will not be matched with a R/R alignment.</p>
+<p>Default: Report A if <em>both</em> ends overlaps B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^                                          ^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+<p>Default when strand information is present in both BEDPE files: Report A if <em>both</em> ends overlaps B <em>on
+the same strands</em>.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE A         &gt;&gt;&gt;&gt;&gt;.................................&gt;&gt;&gt;&gt;&gt;
+
+BEDPE B            &lt;&lt;&lt;&lt;&lt;.............................&gt;&gt;&gt;&gt;&gt;
+
+Result
+
+
+
+BEDPE A         &gt;&gt;&gt;&gt;&gt;.................................&gt;&gt;&gt;&gt;&gt;
+
+BEDPE B            &gt;&gt;&gt;&gt;&gt;.............................&gt;&gt;&gt;&gt;&gt;
+
+Result          &gt;&gt;&gt;&gt;&gt;.................................&gt;&gt;&gt;&gt;&gt;</pre>
+</div>
+</div>
+<div class="section" id="type-neither-optional-overlap-requirements">
+<h2>5.3.3 (-type neither)Optional overlap requirements<a class="headerlink" href="#type-neither-optional-overlap-requirements" title="Permalink to this headline">¶</a></h2>
+<p>Using then <strong>-type neither, pairToPair</strong> will only report A if <em>neither</em> end overlaps with a BEDPE
+feature in B.</p>
+<p><strong>-type neither</strong>: Report A only if <em>neither</em> end overlaps B.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B         ^^^^^^^^......................................^^^^^^
+
+Result
+
+
+
+BEDPE/BAM A         *****.................................*****
+
+BED File B    ^^^^................................................^^^^^^
+
+Result              =====.................................=====</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.3 pairToPair</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.3.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.3.2 Default behavior</a></li>
+<li><a class="reference internal" href="#type-neither-optional-overlap-requirements">5.3.3 (-type neither)Optional overlap requirements</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="pairToBed.html"
+                        title="previous chapter">5.2 pairToBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="bamToBed.html"
+                        title="next chapter">5.4 bamToBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/pairToPair.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="bamToBed.html" title="5.4 bamToBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="pairToBed.html" title="5.2 pairToBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/quick-start.html b/docs/_build/html/content/quick-start.html
new file mode 100644
index 00000000..ed957dca
--- /dev/null
+++ b/docs/_build/html/content/quick-start.html
@@ -0,0 +1,161 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Quick start</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="next" title="General usage" href="general-usage.html" />
+    <link rel="prev" title="Installation" href="installation.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="general-usage.html" title="General usage"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="installation.html" title="Installation"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="quick-start">
+<h1>Quick start<a class="headerlink" href="#quick-start" title="Permalink to this headline">¶</a></h1>
+<div class="section" id="install-bedtools">
+<h2>Install BEDTools<a class="headerlink" href="#install-bedtools" title="Permalink to this headline">¶</a></h2>
+<div class="highlight-python"><pre>curl http://bedtools.googlecode.com/files/BEDTools.&lt;version&gt;.tar.gz &gt; BEDTools.tar.gz
+tar -zxvf BEDTools.tar.gz
+cd BEDTools
+make clean
+make all
+sudo cp bin/* /usr/local/bin/</pre>
+</div>
+</div>
+<div class="section" id="use-bedtools">
+<h2>Use BEDTools<a class="headerlink" href="#use-bedtools" title="Permalink to this headline">¶</a></h2>
+<p>Below are examples of typical BEDTools usage. <strong>Additional usage examples are described in
+section 6 of this manual.</strong> Using the &#8220;-h&#8221; option with any BEDTools will report a list of all command
+line options.</p>
+<p>A. Report the base-pair overlap between the features in two BED files.</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed</pre>
+</div>
+<p>B. Report those entries in A that overlap NO entries in B. Like &#8220;grep -v&#8221;</p>
+<div class="highlight-python"><pre>intersectBed -a reads.bed -b genes.bed ?Cv</pre>
+</div>
+<p>C. Read BED A from stdin. Useful for stringing together commands. For example, find genes that overlap LINEs
+but not SINEs.</p>
+<div class="highlight-python"><pre>intersectBed -a genes.bed -b LINES.bed | intersectBed -a stdin -b SINEs.bed ?Cv</pre>
+</div>
+<p>D. Find the closest ALU to each gene.</p>
+<div class="highlight-python"><pre>closestBed -a genes.bed -b ALUs.bed</pre>
+</div>
+<p>E. Merge overlapping repetitive elements into a single entry, returning the number of entries merged.</p>
+<div class="highlight-python"><pre>mergeBed -i repeatMasker.bed -n</pre>
+</div>
+<p>F. Merge nearby repetitive elements into a single entry, so long as they are within 1000 bp of one another.</p>
+<div class="highlight-python"><pre>mergeBed -i repeatMasker.bed -d 1000</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">Quick start</a><ul>
+<li><a class="reference internal" href="#install-bedtools">Install BEDTools</a></li>
+<li><a class="reference internal" href="#use-bedtools">Use BEDTools</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="installation.html"
+                        title="previous chapter">Installation</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="general-usage.html"
+                        title="next chapter">General usage</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/quick-start.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="general-usage.html" title="General usage"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="installation.html" title="Installation"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/shuffleBed.html b/docs/_build/html/content/shuffleBed.html
new file mode 100644
index 00000000..cb01f0cc
--- /dev/null
+++ b/docs/_build/html/content/shuffleBed.html
@@ -0,0 +1,274 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.13 shuffleBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.14 slopBed" href="slopBed.html" />
+    <link rel="prev" title="5.12 maskFastaFromBed" href="maskfastafromBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="slopBed.html" title="5.14 slopBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="maskfastafromBed.html" title="5.12 maskFastaFromBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="shufflebed">
+<h1>5.13 shuffleBed<a class="headerlink" href="#shufflebed" title="Permalink to this headline">¶</a></h1>
+<p><strong>shuffleBed</strong> will randomly permute the genomic locations of a fearure file among a genome defined in a
+genome file. One can also provide an &#8220;exclusions&#8221; BED/GFF/VCF file that lists regions where you do
+not want the permuted features to be placed. For example, one might want to prevent features from
+being placed in known genome gaps. <strong>shuffleBed</strong> is useful as a <em>null</em> basis against which to test the
+significance of associations of one feature with another.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.13.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>shuffleBed [OPTIONS] -i &lt;BED/GFF/VCF&gt; -g &lt;GENOME&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="11%" />
+<col width="89%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-excl</strong></td>
+<td>A BED file of coordinates in which features from -i should <em>not</em> be placed (e.g., genome gaps).</td>
+</tr>
+<tr class="row-odd"><td><strong>-chrom</strong></td>
+<td>Keep features in -i on the same chromosome. Solely permute their location on the chromosome. <em>By default, both the chromosome and position are randomly chosen</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-seed</strong></td>
+<td>Supply an integer seed for the shuffling. This will allow feature shuffling experiments to be recreated exactly as the seed for the pseudo-random number generation will be constant. <em>By default, the seed is chosen automatically</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.13.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>shuffleBed</strong> will reposition each feature in the input BED file on a random chromosome at a
+random position. The size and strand of each feature are preserved.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  0  100  a1  1  +
+chr1  0  1000 a2  2  -
+
+cat my.genome
+chr1  10000
+chr2  8000
+chr3  5000
+chr4  2000
+
+shuffleBed -i A.bed -g my.genome
+chr4  1498  1598  a1  1  +
+chr3  2156  3156  a2  2  -</pre>
+</div>
+</div>
+<div class="section" id="chrom-requiring-that-features-be-shuffled-on-the-same-chromosome">
+<h2>5.13.3 (-chrom)Requiring that features be shuffled on the same chromosome<a class="headerlink" href="#chrom-requiring-that-features-be-shuffled-on-the-same-chromosome" title="Permalink to this headline">¶</a></h2>
+<p>The &#8220;<strong>-chrom</strong>&#8221; option behaves the same as the default behavior except that features are randomly
+placed on the same chromosome as defined in the BED file.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  0  100  a1  1  +
+chr1  0  1000 a2  2  -
+
+cat my.genome
+chr1  10000
+chr2  8000
+chr3  5000
+chr4  2000
+
+shuffleBed -i A.bed -g my.genome -chrom
+chr1  9560  9660  a1  1  +
+chr1  7258  8258  a2  2  -</pre>
+</div>
+</div>
+<div class="section" id="excluding-certain-genome-regions-from-shufflebed">
+<h2>5.13.4 Excluding certain genome regions from shuffleBed<a class="headerlink" href="#excluding-certain-genome-regions-from-shufflebed" title="Permalink to this headline">¶</a></h2>
+<p>One may want to prevent BED features from being placed in certain regions of the genome. For
+example, one may want to exclude genome gaps from permutation experiment. The &#8220;<strong>-excl</strong>&#8221; option
+defines a BED file of regions that should be excluded. <strong>shuffleBed</strong> will attempt to permute the
+locations of all features while adhering to the exclusion rules. However it will stop looking for an
+appropriate location if it cannot find a valid spot for a feature after 1,000,000 tries.</p>
+<p>For example (<em>note that the exclude file excludes all but 100 base pairs of the chromosome</em>):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  0  100   a1  1  +
+chr1  0  1000  a2  2  -
+
+cat my.genome
+chr1  10000
+
+cat exclude.bed
+chr1  100  10000
+
+shuffleBed -i A.bed -g my.genome -excl exclude.bed
+chr1  0  100  a1  1  +
+Error, line 2: tried 1000000 potential loci for entry, but could not avoid excluded
+regions. Ignoring entry and moving on.</pre>
+</div>
+<p>For example (<em>now the exclusion file only excludes the first 100 bases of the chromosome</em>):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  0  100  a1  1  +
+chr1  0  1000 a2  2  -
+
+cat my.genome
+chr1  10000
+
+cat exclude.bed
+chr1  0  100
+
+shuffleBed -i A.bed -g my.genome -excl exclude.bed
+chr1  147  247  a1  1  +
+chr1  2441 3441 a2  2  -</pre>
+</div>
+</div>
+<div class="section" id="defining-a-seed-for-the-random-replacement">
+<h2>5.13.5 Defining a &#8220;seed&#8221; for the random replacement.<a class="headerlink" href="#defining-a-seed-for-the-random-replacement" title="Permalink to this headline">¶</a></h2>
+<p><strong>shuffleBed</strong> uses a pseudo-random number generator to permute the locations of BED features.
+Therefore, each run should produce a different result. This can be problematic if one wants to exactly
+recreate an experiment. By using the &#8220;<strong>-seed</strong>&#8221; option, one can supply a custom integer seed for
+<strong>shuffleBed</strong>. In turn, each execution of <strong>shuffleBed</strong> with the same seed and input files should produce
+identical results.</p>
+<p>For example (<em>note that the exclude file below excludes all but 100 base pairs of the chromosome</em>):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 0 100 a1 1 +
+chr1 0 1000 a2 2 -
+
+cat my.genome
+chr1 10000
+
+shuffleBed -i A.bed -g my.genome -seed 927442958
+chr1 6177 6277 a1 1 +
+chr1 8119 9119 a2 2 -
+
+shuffleBed -i A.bed -g my.genome -seed 927442958
+chr1 6177 6277 a1 1 +
+chr1 8119 9119 a2 2 -
+
+. . .
+
+shuffleBed -i A.bed -g my.genome -seed 927442958
+chr1 6177 6277 a1 1 +
+chr1 8119 9119 a2 2 -</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.13 shuffleBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.13.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.13.2 Default behavior</a></li>
+<li><a class="reference internal" href="#chrom-requiring-that-features-be-shuffled-on-the-same-chromosome">5.13.3 (-chrom)Requiring that features be shuffled on the same chromosome</a></li>
+<li><a class="reference internal" href="#excluding-certain-genome-regions-from-shufflebed">5.13.4 Excluding certain genome regions from shuffleBed</a></li>
+<li><a class="reference internal" href="#defining-a-seed-for-the-random-replacement">5.13.5 Defining a &#8220;seed&#8221; for the random replacement.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="maskfastafromBed.html"
+                        title="previous chapter">5.12 maskFastaFromBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="slopBed.html"
+                        title="next chapter">5.14 slopBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/shuffleBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="slopBed.html" title="5.14 slopBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="maskfastafromBed.html" title="5.12 maskFastaFromBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/slopBed.html b/docs/_build/html/content/slopBed.html
new file mode 100644
index 00000000..1eb8b2a0
--- /dev/null
+++ b/docs/_build/html/content/slopBed.html
@@ -0,0 +1,216 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.14 slopBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.15 sortBed" href="sortBed.html" />
+    <link rel="prev" title="5.13 shuffleBed" href="shuffleBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="sortBed.html" title="5.15 sortBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="shuffleBed.html" title="5.13 shuffleBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="slopbed">
+<h1>5.14 slopBed<a class="headerlink" href="#slopbed" title="Permalink to this headline">¶</a></h1>
+<p><strong>slopBed</strong> will increase the size of each feature in a feature file be a user-defined number of bases. While
+something like this could be done with an &#8220;<strong>awk &#8216;{OFS=&#8221;t&#8221; print $1,$2-&lt;slop&gt;,$3+&lt;slop&gt;}&#8217;</strong>&#8221;,
+<strong>slopBed</strong> will restrict the resizing to the size of the chromosome (i.e. no start &lt; 0 and no end &gt;
+chromosome size).</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.14.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">slopBed</span> <span class="p">[</span><span class="n">OPTIONS</span><span class="p">]</span> <span class="o">-</span><span class="n">i</span> <span class="o">&lt;</span><span class="n">BED</span><span class="o">/</span><span class="n">GFF</span><span class="o">/</span><span class="n">VCF</span><span class="o">&gt;</span> <span class="o">-</span><span class="n">g</span> <span class="o">&lt;</span><span class="n">GENOME</span><span class="o">&gt;</span> <span class="p">[</span><span class="o">-</span><span class="n">b</span> <span class="ow">or</span> <span class="p">(</span><span class="o">-</span><span class="n">l</span> <span class="ow">and</span> <span class="o">-</span><span class="n">r</span><span class="p">)]</span>
+</pre></div>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-b</strong></td>
+<td>Increase the BED/GFF/VCF entry by the same number base pairs in each direction. <em>Integer</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-l</strong></td>
+<td>The number of base pairs to subtract from the start coordinate. <em>Integer</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-r</strong></td>
+<td>The number of base pairs to add to the end coordinate. <em>Integer</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-s</strong></td>
+<td>Define -l and -r based on strand. For example. if used, -l 500 for a negative-stranded feature, it will add 500 bp to the <em>end</em> coordinate.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.14.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>slopBed</strong> will either add a fixed number of bases in each direction (<strong>-b</strong>) or an asymmetric
+number of bases in each direction (<strong>-l</strong> and <strong>-r</strong>).</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 5 100
+chr1 800 980
+
+cat my.genome
+chr1 1000
+
+slopBed -i A.bed -g my.genome -b 5
+chr1 0 105
+chr1 795 985
+
+slopBed -i A.bed -g my.genome -l 2 -r 3
+chr1 3 103
+chr1 798 983</pre>
+</div>
+<p>However, if the requested number of bases exceeds the boundaries of the chromosome, <strong>slopBed</strong> will
+&#8220;clip&#8221; the feature accordingly.</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  5   100
+chr1  800 980
+
+cat my.genome
+chr1  1000
+
+slopBed -i A.bed -g my.genome -b 5000
+chr1  0   1000
+chr1  0   1000</pre>
+</div>
+</div>
+<div class="section" id="resizing-features-according-to-strand">
+<h2>5.14.3 Resizing features according to strand<a class="headerlink" href="#resizing-features-according-to-strand" title="Permalink to this headline">¶</a></h2>
+<p><strong>slopBed</strong> will optionally increase the size of a feature based on strand.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 100 200 a1 1 +
+chr1 100 200 a2 2 -
+
+cat my.genome
+chr1 1000
+
+slopBed  -i A.bed -g my.genome -l 50 -r 80 -s
+chr1 50  280 a1 1 +
+chr1 20  250 a2 2 -</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.14 slopBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.14.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.14.2 Default behavior</a></li>
+<li><a class="reference internal" href="#resizing-features-according-to-strand">5.14.3 Resizing features according to strand</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="shuffleBed.html"
+                        title="previous chapter">5.13 shuffleBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="sortBed.html"
+                        title="next chapter">5.15 sortBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/slopBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="sortBed.html" title="5.15 sortBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="shuffleBed.html" title="5.13 shuffleBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/sortBed.html b/docs/_build/html/content/sortBed.html
new file mode 100644
index 00000000..1f62dc6d
--- /dev/null
+++ b/docs/_build/html/content/sortBed.html
@@ -0,0 +1,211 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.15 sortBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.16 linksBed" href="linksBed.html" />
+    <link rel="prev" title="5.14 slopBed" href="slopBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="linksBed.html" title="5.16 linksBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="slopBed.html" title="5.14 slopBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="sortbed">
+<h1>5.15 sortBed<a class="headerlink" href="#sortbed" title="Permalink to this headline">¶</a></h1>
+<p><strong>sortBed</strong> sorts a feature file by chromosome and other criteria.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.15.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>sortBed [OPTIONS] -i &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-sizeA</strong></td>
+<td>Sort by feature size in ascending order.</td>
+</tr>
+<tr class="row-odd"><td><strong>-sizeD</strong></td>
+<td>Sort by feature size in descending order.</td>
+</tr>
+<tr class="row-even"><td><strong>-chrThenSizeA</strong></td>
+<td>Sort by chromosome, then by feature size (asc).</td>
+</tr>
+<tr class="row-odd"><td><strong>-chrThenSizeD</strong></td>
+<td>Sort by chromosome, then by feature size (desc).</td>
+</tr>
+<tr class="row-even"><td><strong>-chrThenScoreA</strong></td>
+<td>Sort by chromosome, then by score (asc).</td>
+</tr>
+<tr class="row-odd"><td><strong>-chrThenScoreD</strong></td>
+<td>Sort by chromosome, then by score (desc).</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.15.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>sortBed</strong> sorts a BED file by chromosome and then by start position in ascending order.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 800 1000
+chr1 80  180
+chr1 1   10
+chr1 750 10000
+
+sortBed -i A.bed
+chr1 1   10
+chr1 80  180
+chr1 750 10000
+chr1 800 1000</pre>
+</div>
+</div>
+<div class="section" id="optional-sorting-behavior">
+<h2>5.15.3 Optional sorting behavior<a class="headerlink" href="#optional-sorting-behavior" title="Permalink to this headline">¶</a></h2>
+<p><strong>sortBed</strong> will also sorts a BED file by chromosome and then by other criteria.</p>
+<p>For example, to sort by chromosome and then by feature size (in descending order):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1 800 1000
+chr1 80  180
+chr1 1   10
+chr1 750 10000
+
+sortBed -i A.bed -sizeD
+chr1 750 10000
+chr1 800 1000
+chr1 80  180
+chr1 1   10</pre>
+</div>
+<p><strong>Disclaimer:</strong> it should be noted that <strong>sortBed</strong> is merely a convenience utility, as the UNIX sort utility
+will sort BED files more quickly while using less memory. For example, UNIX sort will sort a BED file
+by chromosome then by start position in the following manner:</p>
+<div class="highlight-python"><pre>sort -k 1,1 -k2,2 -n a.bed
+chr1 1   10
+chr1 80  180
+chr1 750 10000
+chr1 800 1000</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.15 sortBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.15.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.15.2 Default behavior</a></li>
+<li><a class="reference internal" href="#optional-sorting-behavior">5.15.3 Optional sorting behavior</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="slopBed.html"
+                        title="previous chapter">5.14 slopBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="linksBed.html"
+                        title="next chapter">5.16 linksBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/sortBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="linksBed.html" title="5.16 linksBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="slopBed.html" title="5.14 slopBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/subtractBed.html b/docs/_build/html/content/subtractBed.html
new file mode 100644
index 00000000..4b4e55e0
--- /dev/null
+++ b/docs/_build/html/content/subtractBed.html
@@ -0,0 +1,207 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.7 subtractBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.8 mergeBed" href="mergeBed.html" />
+    <link rel="prev" title="5.6 closestBed" href="closestBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="mergeBed.html" title="5.8 mergeBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="closestBed.html" title="5.6 closestBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="subtractbed">
+<h1>5.7 subtractBed<a class="headerlink" href="#subtractbed" title="Permalink to this headline">¶</a></h1>
+<p><strong>subtractBed</strong> searches for features in B that overlap A. If an overlapping feature is found in B, the
+overlapping portion is removed from A and the remaining portion of A is reported. If a feature in B
+overlaps all of a feature in A, the A feature will not be reported.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.7.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>subtractBed [OPTIONS] -a &lt;BED/GFF/VCF&gt; -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-f</strong></td>
+<td>Minimum overlap required as a fraction of A. Default is 1E-9 (i.e. 1bp).</td>
+</tr>
+<tr class="row-odd"><td><strong>-s</strong></td>
+<td>Force strandedness. That is, find the closest feature in B overlaps A on the same strand.  <em>By default, this is disabled</em>.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.7.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+BED FILE A             *************            ******
+
+BED File B         ^^^^^^^^                   ^^^^^^^^^^^
+
+Result                     =========</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+chr1  10   20
+
+cat B.bed
+chr1  0    30
+chr1  180  300
+
+subtractBed -a A.bed -b B.bed
+chr1  100  180</pre>
+</div>
+</div>
+<div class="section" id="f-requiring-a-minimal-overlap-fraction-before-subtracting">
+<h2>5.7.3  (-f)Requiring a minimal overlap fraction before subtracting<a class="headerlink" href="#f-requiring-a-minimal-overlap-fraction-before-subtracting" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as the -f option for intersectBed. In this case, subtractBed will only
+subtract an overlap with B if it covers at least the fraction of A defined by -f. If an overlap is found,
+but it does not meet the overlap fraction, the original A feature is reported without subtraction.</p>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+
+cat B.bed
+chr1  180  300
+
+subtractBed -a A.bed -b B.bed -f 0.10
+chr1  100  180
+
+subtractBed -a A.bed -b B.bed -f 0.80
+chr1  100  200</pre>
+</div>
+</div>
+<div class="section" id="s-enforcing-strandedness">
+<h2>5.7.4 (-s)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#s-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as the -s option for intersectBed while scanning for features in B that
+should be subtracted from A. See the discussion in the intersectBed section for details.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.7 subtractBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.7.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.7.2 Default behavior</a></li>
+<li><a class="reference internal" href="#f-requiring-a-minimal-overlap-fraction-before-subtracting">5.7.3  (-f)Requiring a minimal overlap fraction before subtracting</a></li>
+<li><a class="reference internal" href="#s-enforcing-strandedness">5.7.4 (-s)Enforcing &#8220;strandedness&#8221;</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="closestBed.html"
+                        title="previous chapter">5.6 closestBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="mergeBed.html"
+                        title="next chapter">5.8 mergeBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/subtractBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="mergeBed.html" title="5.8 mergeBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="closestBed.html" title="5.6 closestBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/unionBedGraphs.html b/docs/_build/html/content/unionBedGraphs.html
new file mode 100644
index 00000000..a45ddd29
--- /dev/null
+++ b/docs/_build/html/content/unionBedGraphs.html
@@ -0,0 +1,296 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.23 unionBedGraphs</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.24 annotateBed" href="annotateBed.html" />
+    <link rel="prev" title="5.22 groupBy" href="groupBy.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="annotateBed.html" title="5.24 annotateBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="groupBy.html" title="5.22 groupBy"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="unionbedgraphs">
+<h1>5.23 unionBedGraphs<a class="headerlink" href="#unionbedgraphs" title="Permalink to this headline">¶</a></h1>
+<p><strong>unionBedGraphs</strong> combines multiple BEDGRAPH files into a single file such that one can directly
+compare coverage (and other text-values such as genotypes) across multiple sample</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.23.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p>Usage:</p>
+<div class="highlight-python"><pre>unionBedGraphs [OPTIONS] -i FILE1 FILE2 FILE3 ... FILEn</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="12%" />
+<col width="88%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-header</strong></td>
+<td>Print a header line, consisting of chrom, start, end followed by the names of each input BEDGRAPH file.</td>
+</tr>
+<tr class="row-odd"><td><strong>-names</strong></td>
+<td>A list of names (one per file) to describe each file in -i. These names will be printed in the header line.</td>
+</tr>
+<tr class="row-even"><td><strong>-empty</strong></td>
+<td>Report empty regions (i.e., start/end intervals w/o values in all files). <em>Requires the &#8216;-g FILE&#8217; parameter (see below)</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-g</strong></td>
+<td>The genome file to be used to calculate empty regions.</td>
+</tr>
+<tr class="row-even"><td><strong>-filler TEXT</strong></td>
+<td>Use TEXT when representing intervals having no value. Default is &#8216;0&#8217;, but you can use &#8216;N/A&#8217; or any other text.</td>
+</tr>
+<tr class="row-odd"><td><strong>-examples</strong></td>
+<td>Show detailed usage examples.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.23.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>cat 1.bg
+chr1 1000 1500 10
+chr1 2000 2100 20
+
+cat 2.bg
+chr1 900 1600 60
+chr1 1700 2050 50
+
+cat 3.bg
+chr1 1980 2070 80
+chr1 2090 2100 20
+
+cat sizes.txt
+chr1 5000
+
+unionBedGraphs -i 1.bg 2.bg 3.bg
+chr1 900  1000 0  60 0
+chr1 1000 1500 10 60 0
+chr1 1500 1600 0  60 0
+chr1 1700 1980 0  50 0
+chr1 1980 2000 0  50 80
+chr1 2000 2050 20 50 80
+chr1 2050 2070 20 0  80
+chr1 2070 2090 20 0  0
+chr1 2090 2100 20 0  20</pre>
+</div>
+</div>
+<div class="section" id="add-a-header-line-to-the-output">
+<h2>5.23.3 Add a header line to the output<a class="headerlink" href="#add-a-header-line-to-the-output" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>unionBedGraphs -i 1.bg 2.bg 3.bg -header
+chrom  start  end  1  2  3
+chr1   900    1000 0  60 0
+chr1   1000   1500 10 60 0
+chr1   1500   1600 0  60 0
+chr1   1700   1980 0  50 0
+chr1   1980   2000 0  50 80
+chr1   2000   2050 20 50 80
+chr1   2050   2070 20 0  80
+chr1   2070   2090 20 0  0
+chr1   2090   2100 20 0  20</pre>
+</div>
+</div>
+<div class="section" id="add-a-header-line-with-custom-file-names-to-the-output">
+<h2>5.23.4 Add a header line with custom file names to the output<a class="headerlink" href="#add-a-header-line-with-custom-file-names-to-the-output" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>unionBedGraphs -i 1.bg 2.bg 3.bg -header -names WT-1 WT-2 KO-1
+chrom  start  end   WT-1  WT-2  KO-1
+chr1   900    1000  0     60    0
+chr1   1000   1500  10    60    0
+chr1   1500   1600  0     60    0
+chr1   1700   1980  0     50    0
+chr1   1980   2000  0     50    80
+chr1   2000   2050  20    50    80
+chr1   2050   2070  20    0     80
+chr1   2070   2090  20    0     0
+chr1   2090   2100  20    0     20</pre>
+</div>
+</div>
+<div class="section" id="include-regions-that-have-zero-coverage-in-all-bedgraph-files">
+<h2>5.23.5 Include regions that have zero coverage in all BEDGRAPH files.<a class="headerlink" href="#include-regions-that-have-zero-coverage-in-all-bedgraph-files" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>unionBedGraphs -i 1.bg 2.bg 3.bg -empty -g sizes.txt -header
+chrom  start  end  WT-1  WT-2  KO-1
+chrom  start  end  1     2     3
+chr1   0      900  0     0     0
+chr1   900    1000 0     60    0
+chr1   1000   1500 10    60    0
+chr1   1500   1600 0     60    0
+chr1   1600   1700 0     0     0
+chr1   1700   1980 0     50    0
+chr1   1980   2000 0     50    80
+chr1   2000   2050 20    50    80
+chr1   2050   2070 20    0     80
+chr1   2070   2090 20    0     0
+chr1   2090   2100 20    0     20
+chr1   2100   5000 0     0     0</pre>
+</div>
+</div>
+<div class="section" id="use-a-custom-value-for-missing-values">
+<h2>5.23.6 Use a custom value for missing values.<a class="headerlink" href="#use-a-custom-value-for-missing-values" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>unionBedGraphs -i 1.bg 2.bg 3.bg -empty -g sizes.txt -header -filler N/A
+chrom start end  WT-1  WT-2  KO-1
+chrom start end  1     2     3
+chr1  0     900  N/A   N/A   N/A
+chr1  900   1000 N/A   60    N/A
+chr1  1000  1500 10    60    N/A
+chr1  1500  1600 N/A   60    N/A
+chr1  1600  1700 N/A   N/A   N/A
+chr1  1700  1980 N/A   50    N/A
+chr1  1980  2000 N/A   50    80
+chr1  2000  2050 20    50    80
+chr1  2050  2070 20    N/A   80
+chr1  2070  2090 20    N/A   N/A
+chr1  2090  2100 20    N/A   20
+chr1  2100  5000 N/A   N/A   N/A</pre>
+</div>
+</div>
+<div class="section" id="use-bedgraph-files-with-non-numeric-values">
+<h2>5.23.7 Use BEDGRAPH files with non-numeric values.<a class="headerlink" href="#use-bedgraph-files-with-non-numeric-values" title="Permalink to this headline">¶</a></h2>
+<p>Figure:</p>
+<div class="highlight-python"><pre>cat 1.snp.bg
+chr1 0 1 A/G
+chr1 5 6 C/T
+
+cat 2.snp.bg
+chr1 0 1 C/C
+chr1 7 8 T/T
+
+cat 3.snp.bg
+chr1 0 1 A/G
+chr1 5 6 C/T
+
+unionBedGraphs -i 1.snp.bg 2.snp.bg 3.snp.bg -filler -/-
+chr1 0 1 A/G C/C A/G
+chr1 5 6 C/T -/- C/T
+chr1 7 8 -/- T/T -/-</pre>
+</div>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.23 unionBedGraphs</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.23.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.23.2 Default behavior</a></li>
+<li><a class="reference internal" href="#add-a-header-line-to-the-output">5.23.3 Add a header line to the output</a></li>
+<li><a class="reference internal" href="#add-a-header-line-with-custom-file-names-to-the-output">5.23.4 Add a header line with custom file names to the output</a></li>
+<li><a class="reference internal" href="#include-regions-that-have-zero-coverage-in-all-bedgraph-files">5.23.5 Include regions that have zero coverage in all BEDGRAPH files.</a></li>
+<li><a class="reference internal" href="#use-a-custom-value-for-missing-values">5.23.6 Use a custom value for missing values.</a></li>
+<li><a class="reference internal" href="#use-bedgraph-files-with-non-numeric-values">5.23.7 Use BEDGRAPH files with non-numeric values.</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="groupBy.html"
+                        title="previous chapter">5.22 groupBy</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="annotateBed.html"
+                        title="next chapter">5.24 annotateBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/unionBedGraphs.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="annotateBed.html" title="5.24 annotateBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="groupBy.html" title="5.22 groupBy"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/content/windowBed.html b/docs/_build/html/content/windowBed.html
new file mode 100644
index 00000000..eb1abe0b
--- /dev/null
+++ b/docs/_build/html/content/windowBed.html
@@ -0,0 +1,297 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>5.5 windowBed</title>
+    
+    <link rel="stylesheet" href="../_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '../',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="../_static/jquery.js"></script>
+    <script type="text/javascript" src="../_static/underscore.js"></script>
+    <script type="text/javascript" src="../_static/doctools.js"></script>
+    <link rel="shortcut icon" href="../_static/bedtools.png"/>
+    <link rel="top" title="None" href="../index.html" />
+    <link rel="up" title="The BEDTools suite" href="bedtools-suite.html" />
+    <link rel="next" title="5.6 closestBed" href="closestBed.html" />
+    <link rel="prev" title="5.4 bamToBed" href="bamToBed.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="closestBed.html" title="5.6 closestBed"
+             accesskey="N">next</a> |</li>
+        <li class="right" >
+          <a href="bamToBed.html" title="5.4 bamToBed"
+             accesskey="P">previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" accesskey="U">The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="windowbed">
+<h1>5.5 windowBed<a class="headerlink" href="#windowbed" title="Permalink to this headline">¶</a></h1>
+<p>Similar to <strong>intersectBed</strong>, <strong>windowBed</strong> searches for overlapping features in A and B. However,
+<strong>windowBed</strong> adds a specified number (1000, by default) of base pairs upstream and downstream of
+each feature in A. In effect, this allows features in B that are &#8220;near&#8221; features in A to be detected.</p>
+<div class="section" id="usage-and-option-summary">
+<h2>5.5.1 Usage and option summary<a class="headerlink" href="#usage-and-option-summary" title="Permalink to this headline">¶</a></h2>
+<p><strong>Usage:</strong></p>
+<div class="highlight-python"><pre>windowBed [OPTIONS] -a &lt;BED/GFF/VCF&gt; -b &lt;BED/GFF/VCF&gt;</pre>
+</div>
+<table border="1" class="docutils">
+<colgroup>
+<col width="11%" />
+<col width="89%" />
+</colgroup>
+<thead valign="bottom">
+<tr class="row-odd"><th class="head">Option</th>
+<th class="head">Description</th>
+</tr>
+</thead>
+<tbody valign="top">
+<tr class="row-even"><td><strong>-abam</strong></td>
+<td>BAM file A. Each BAM alignment in A is compared to B in search of overlaps. Use &#8220;stdin&#8221; if passing A with a UNIX pipe: For example:  samtools view -b &lt;BAM&gt; | windowBed -abam stdin -b genes.bed</td>
+</tr>
+<tr class="row-odd"><td><strong>-ubam</strong></td>
+<td>Write uncompressed BAM output. The default is write compressed BAM output.</td>
+</tr>
+<tr class="row-even"><td><strong>-bed</strong></td>
+<td>When using BAM input (-abam), write output as BED. The default is to write output in BAM when using -abam. For example:  windowBed -abam reads.bam -b genes.bed -bed</td>
+</tr>
+<tr class="row-odd"><td><strong>-w</strong></td>
+<td>Base pairs added upstream and downstream of each entry in A when searching for overlaps in B. <em>Default is 1000 bp</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-l</strong></td>
+<td>Base pairs added upstream (left of) of each entry in A when searching for overlaps in B. <em>Allows one to create assymetrical &#8220;windows&#8221;. Default is 1000bp</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-r</strong></td>
+<td>Base pairs added downstream (right of) of each entry in A when searching for overlaps in B. <em>Allows one to create assymetrical &#8220;windows&#8221;. Default is 1000bp</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-sw</strong></td>
+<td>Define -l and -r based on strand. For example if used, -l 500 for a negative-stranded feature will add 500 bp downstream. <em>By default, this is disabled</em>.</td>
+</tr>
+<tr class="row-odd"><td><strong>-sm</strong></td>
+<td>Only report hits in B that overlap A on the same strand. <em>By default, overlaps are reported without respect to strand</em>.</td>
+</tr>
+<tr class="row-even"><td><strong>-u</strong></td>
+<td>Write original A entry once if any overlaps found in B. In other words, just report the fact at least one overlap was found in B.</td>
+</tr>
+<tr class="row-odd"><td><strong>-c</strong></td>
+<td>For each entry in A, report the number of hits in B while restricting to -f. Reports 0 for A entries that have no overlap with B.</td>
+</tr>
+</tbody>
+</table>
+</div>
+<div class="section" id="default-behavior">
+<h2>5.5.2 Default behavior<a class="headerlink" href="#default-behavior" title="Permalink to this headline">¶</a></h2>
+<p>By default, <strong>windowBed</strong> adds 1000 bp upstream and downstream of each A feature and searches for
+features in B that overlap this &#8220;window&#8221;. If an overlap is found in B, both the <em>original</em> A feature and the
+<em>original</em> B feature are reported. For example, in the figure below, feature B1 would be found, but B2
+would not.</p>
+<div class="highlight-python"><pre>Chromosome  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+                                      "window" = 10
+BED File A                 &lt;----------*************----------&gt;
+
+BED File B            ^^^^^^^^                                          ^^^^^^
+
+Result                ========</pre>
+</div>
+<p>For example:</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+
+cat B.bed
+chr1  500  1000
+chr1  1300 2000
+
+windowBed -a A.bed -b B.bed
+chr1  100  200  chr1  500  1000</pre>
+</div>
+</div>
+<div class="section" id="w-defining-a-custom-window-size">
+<h2>5.5.3 (-w)Defining a custom window size<a class="headerlink" href="#w-defining-a-custom-window-size" title="Permalink to this headline">¶</a></h2>
+<p>Instead of using the default window size of 1000bp, one can define a custom, <em>symmetric</em> window around
+each feature in A using the <strong>-w</strong> option. One should specify the window size in base pairs. For example,
+a window of 5kb should be defined as <strong>-w 5000</strong>.</p>
+<p>For example (note that in contrast to the default behavior, the second B entry is reported):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  100  200
+
+cat B.bed
+chr1  500  1000
+chr1  1300 2000
+
+windowBed -a A.bed -b B.bed -w 5000
+chr1  100  200  chr1  500   1000
+chr1  100  200  chr1  1300  2000</pre>
+</div>
+</div>
+<div class="section" id="l-and-r-defining-assymteric-windows">
+<h2>5.5.4 (-l and -r)Defining assymteric windows<a class="headerlink" href="#l-and-r-defining-assymteric-windows" title="Permalink to this headline">¶</a></h2>
+<p>One can also define asymmetric windows where a differing number of bases are added upstream and
+downstream of each feature using the <strong>-l (upstream)</strong> and <strong>-r (downstream)</strong> options.</p>
+<p>For example (note the difference between -l 200 and -l 300):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  1000  2000
+
+cat B.bed
+chr1  500   800
+chr1  10000 20000
+
+windowBed -a A.bed -b B.bed -l 200 -r 20000
+chr1  100   200  chr1  10000  20000
+
+windowBed -a A.bed -b B.bed -l 300 -r 20000
+chr1  100   200  chr1  500    800
+chr1  100   200  chr1  10000  20000</pre>
+</div>
+</div>
+<div class="section" id="sw-defining-assymteric-windows-based-on-strand">
+<h2>5.5.5 (-sw)Defining assymteric windows based on strand<a class="headerlink" href="#sw-defining-assymteric-windows-based-on-strand" title="Permalink to this headline">¶</a></h2>
+<p>Especially when dealing with gene annotations or RNA-seq experiments, you may want to define
+asymmetric windows based on &#8220;strand&#8221;. For example, you may want to screen for overlaps that occur
+within 5000 bp upstream of a gene (e.g. a promoter region) while screening only 1000 bp downstream of
+the gene. By enabling the <strong>-sw</strong> (&#8220;stranded&#8221; windows) option, the windows are added upstream or
+downstream according to strand. For example, imagine one specifies <strong>-l 5000 -r 1000</strong> as well as the <strong>-
+sw</strong> option. In this case, forward stranded (&#8220;+&#8221;) features will screen 5000 bp to the <em>left</em> (that is, <em>lower</em>
+genomic coordinates) and 1000 bp to the <em>right</em> (that is, <em>higher</em> genomic coordinates). By contrast,
+reverse stranded (&#8220;-&#8221;) features will screen 5000 bp to the <em>right</em> (that is, <em>higher</em> genomic coordinates) and
+1000 bp to the <em>left</em> (that is, <em>lower</em> genomic coordinates).</p>
+<p>For example (note the difference between -l 200 and -l 300):</p>
+<div class="highlight-python"><pre>cat A.bed
+chr1  10000  20000  A.forward  1  +
+chr1  10000  20000  A.reverse  1  -
+
+cat B.bed
+chr1  1000   8000   B1
+chr1  24000  32000  B2
+
+windowBed -a A.bed -b B.bed -l 5000 -r 1000 -sw
+chr1  10000  20000  A.forward  1  +  chr1  1000   8000   B1
+chr1  10000  20000  A.reverse  1  -  chr1  24000  32000  B2</pre>
+</div>
+</div>
+<div class="section" id="sm-enforcing-strandedness">
+<h2>5.5.6 (-sm)Enforcing &#8220;strandedness&#8221;<a class="headerlink" href="#sm-enforcing-strandedness" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as the -s option for intersectBed while scanning for overlaps within the
+&#8220;window&#8221; surrounding A. See the discussion in the intersectBed section for details.</p>
+</div>
+<div class="section" id="u-reporting-the-presence-of-at-least-one-overlapping-feature">
+<h2>5.5.7 (-u)Reporting the presence of at least one overlapping feature<a class="headerlink" href="#u-reporting-the-presence-of-at-least-one-overlapping-feature" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as for intersectBed while scanning for overlaps within the &#8220;window&#8221;
+surrounding A. See the discussion in the intersectBed section for details.</p>
+</div>
+<div class="section" id="c-reporting-the-number-of-overlapping-features">
+<h2>5.5.8 (-c)Reporting the number of overlapping features<a class="headerlink" href="#c-reporting-the-number-of-overlapping-features" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as for intersectBed while scanning for overlaps within the &#8220;window&#8221;
+surrounding A. See the discussion in the intersectBed section for details.</p>
+</div>
+<div class="section" id="v-reporting-the-absence-of-any-overlapping-features">
+<h2>5.5.9 (-v)Reporting the absence of any overlapping features<a class="headerlink" href="#v-reporting-the-absence-of-any-overlapping-features" title="Permalink to this headline">¶</a></h2>
+<p>This option behaves the same as for intersectBed while scanning for overlaps within the &#8220;window&#8221;
+surrounding A. See the discussion in the intersectBed section for details.</p>
+</div>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="../index.html">
+              <img class="logo" src="../_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="../index.html">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#">5.5 windowBed</a><ul>
+<li><a class="reference internal" href="#usage-and-option-summary">5.5.1 Usage and option summary</a></li>
+<li><a class="reference internal" href="#default-behavior">5.5.2 Default behavior</a></li>
+<li><a class="reference internal" href="#w-defining-a-custom-window-size">5.5.3 (-w)Defining a custom window size</a></li>
+<li><a class="reference internal" href="#l-and-r-defining-assymteric-windows">5.5.4 (-l and -r)Defining assymteric windows</a></li>
+<li><a class="reference internal" href="#sw-defining-assymteric-windows-based-on-strand">5.5.5 (-sw)Defining assymteric windows based on strand</a></li>
+<li><a class="reference internal" href="#sm-enforcing-strandedness">5.5.6 (-sm)Enforcing &#8220;strandedness&#8221;</a></li>
+<li><a class="reference internal" href="#u-reporting-the-presence-of-at-least-one-overlapping-feature">5.5.7 (-u)Reporting the presence of at least one overlapping feature</a></li>
+<li><a class="reference internal" href="#c-reporting-the-number-of-overlapping-features">5.5.8 (-c)Reporting the number of overlapping features</a></li>
+<li><a class="reference internal" href="#v-reporting-the-absence-of-any-overlapping-features">5.5.9 (-v)Reporting the absence of any overlapping features</a></li>
+</ul>
+</li>
+</ul>
+
+  <h4>Previous topic</h4>
+  <p class="topless"><a href="bamToBed.html"
+                        title="previous chapter">5.4 bamToBed</a></p>
+  <h4>Next topic</h4>
+  <p class="topless"><a href="closestBed.html"
+                        title="next chapter">5.6 closestBed</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="../_sources/content/windowBed.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="../search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="../genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="closestBed.html" title="5.6 closestBed"
+             >next</a> |</li>
+        <li class="right" >
+          <a href="bamToBed.html" title="5.4 bamToBed"
+             >previous</a> |</li>
+        <li><a href="../index.html">bedtools v2.16.2</a> &raquo;</li>
+          <li><a href="bedtools-suite.html" >The BEDTools suite</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html
new file mode 100644
index 00000000..bec593ed
--- /dev/null
+++ b/docs/_build/html/genindex.html
@@ -0,0 +1,100 @@
+
+
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Index</title>
+    
+    <link rel="stylesheet" href="_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="shortcut icon" href="_static/bedtools.png"/>
+    <link rel="top" title="None" href="index.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="#" title="General Index"
+             accesskey="I">index</a></li>
+        <li><a href="index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+
+<h1 id="index">Index</h1>
+
+<div class="genindex-jumpbox">
+ 
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="index.html">
+              <img class="logo" src="_static/bedtools.png" alt="Logo"/>
+            </a></p>
+
+   
+
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="#" title="General Index"
+             >index</a></li>
+        <li><a href="index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html
new file mode 100644
index 00000000..74fd20c1
--- /dev/null
+++ b/docs/_build/html/index.html
@@ -0,0 +1,139 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>bedtools: a powerful toolset for genome arithmetic</title>
+    
+    <link rel="stylesheet" href="_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <link rel="shortcut icon" href="_static/bedtools.png"/>
+    <link rel="top" title="None" href="#" />
+    <link rel="next" title="Overview" href="content/overview.html" /> 
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li class="right" >
+          <a href="content/overview.html" title="Overview"
+             accesskey="N">next</a> |</li>
+        <li><a href="#">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <div class="section" id="bedtools-a-powerful-toolset-for-genome-arithmetic">
+<h1><strong>bedtools</strong>: <em>a powerful toolset for genome arithmetic</em><a class="headerlink" href="#bedtools-a-powerful-toolset-for-genome-arithmetic" title="Permalink to this headline">¶</a></h1>
+</div>
+<div class="section" id="overview">
+<h1>Overview<a class="headerlink" href="#overview" title="Permalink to this headline">¶</a></h1>
+<p>Brief paragraph of the software.</p>
+</div>
+<div class="section" id="table-of-contents">
+<h1>Table of contents<a class="headerlink" href="#table-of-contents" title="Permalink to this headline">¶</a></h1>
+<div class="toctree-wrapper compound">
+<ul>
+<li class="toctree-l1"><a class="reference internal" href="content/overview.html">Overview</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/quick-start.html">Quick start</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/general-usage.html">General usage</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/bedtools-suite.html">The BEDTools suite</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/example-usage.html">Example usage</a></li>
+<li class="toctree-l1"><a class="reference internal" href="content/advanced-usage.html">Advanced usage</a></li>
+</ul>
+</div>
+</div>
+<div class="section" id="mailing-list">
+<h1>Mailing list<a class="headerlink" href="#mailing-list" title="Permalink to this headline">¶</a></h1>
+<p>Refer to the mailing list.</p>
+</div>
+
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="#">
+              <img class="logo" src="_static/bedtools.png" alt="Logo"/>
+            </a></p>
+  <h3><a href="#">Table Of Contents</a></h3>
+  <ul>
+<li><a class="reference internal" href="#"><strong>bedtools</strong>: <em>a powerful toolset for genome arithmetic</em></a></li>
+<li><a class="reference internal" href="#overview">Overview</a></li>
+<li><a class="reference internal" href="#table-of-contents">Table of contents</a><ul>
+</ul>
+</li>
+<li><a class="reference internal" href="#mailing-list">Mailing list</a></li>
+</ul>
+
+  <h4>Next topic</h4>
+  <p class="topless"><a href="content/overview.html"
+                        title="next chapter">Overview</a></p>
+  <h3>This Page</h3>
+  <ul class="this-page-menu">
+    <li><a href="_sources/index.txt"
+           rel="nofollow">Show Source</a></li>
+  </ul>
+<div id="searchbox" style="display: none">
+  <h3>Quick search</h3>
+    <form class="search" action="search.html" method="get">
+      <input type="text" name="q" />
+      <input type="submit" value="Go" />
+      <input type="hidden" name="check_keywords" value="yes" />
+      <input type="hidden" name="area" value="default" />
+    </form>
+    <p class="searchtip" style="font-size: 90%">
+    Enter search terms or a module, class or function name.
+    </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li class="right" >
+          <a href="content/overview.html" title="Overview"
+             >next</a> |</li>
+        <li><a href="#">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html
new file mode 100644
index 00000000..b84b7926
--- /dev/null
+++ b/docs/_build/html/search.html
@@ -0,0 +1,104 @@
+
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    
+    <title>Search</title>
+    
+    <link rel="stylesheet" href="_static/rtd.css" type="text/css" />
+    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
+    
+    <script type="text/javascript">
+      var DOCUMENTATION_OPTIONS = {
+        URL_ROOT:    '',
+        VERSION:     '2.16.2',
+        COLLAPSE_INDEX: false,
+        FILE_SUFFIX: '.html',
+        HAS_SOURCE:  true
+      };
+    </script>
+    <script type="text/javascript" src="_static/jquery.js"></script>
+    <script type="text/javascript" src="_static/underscore.js"></script>
+    <script type="text/javascript" src="_static/doctools.js"></script>
+    <script type="text/javascript" src="_static/searchtools.js"></script>
+    <link rel="shortcut icon" href="_static/bedtools.png"/>
+    <link rel="top" title="None" href="index.html" />
+  <script type="text/javascript">
+    jQuery(function() { Search.loadIndex("searchindex.js"); });
+  </script>
+   
+
+  </head>
+  <body>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             accesskey="I">index</a></li>
+        <li><a href="index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>  
+
+    <div class="document">
+      <div class="documentwrapper">
+        <div class="bodywrapper">
+          <div class="body">
+            
+  <h1 id="search-documentation">Search</h1>
+  <div id="fallback" class="admonition warning">
+  <script type="text/javascript">$('#fallback').hide();</script>
+  <p>
+    Please activate JavaScript to enable the search
+    functionality.
+  </p>
+  </div>
+  <p>
+    From here you can search these documents. Enter your search
+    words into the box below and click "search". Note that the search
+    function will automatically search for all of the words. Pages
+    containing fewer words won't appear in the result list.
+  </p>
+  <form action="" method="get">
+    <input type="text" name="q" value="" />
+    <input type="submit" value="search" />
+    <span id="search-progress" style="padding-left: 10px"></span>
+  </form>
+  
+  <div id="search-results">
+  
+  </div>
+
+          </div>
+        </div>
+      </div>
+      <div class="sphinxsidebar">
+        <div class="sphinxsidebarwrapper">
+            <p class="logo"><a href="index.html">
+              <img class="logo" src="_static/bedtools.png" alt="Logo"/>
+            </a></p>
+        </div>
+      </div>
+      <div class="clearer"></div>
+    </div>
+    <div class="related">
+      <h3>Navigation</h3>
+      <ul>
+        <li class="right" style="margin-right: 10px">
+          <a href="genindex.html" title="General Index"
+             >index</a></li>
+        <li><a href="index.html">bedtools v2.16.2</a> &raquo;</li> 
+      </ul>
+    </div>
+    <div class="footer">
+        &copy; Copyright 2012.
+      Last updated on Jul 23, 2012.
+    <a href="http://www.gnu.org/licenses/gpl-3.0.txt"><p>GPL3 licensed</p></a>
+    </div>
+  </body>
+</html>
\ No newline at end of file
-- 
GitLab