changeset 0:65575e70af7e draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/pileometh commit 033c712216994524fdd120b771052ac4ca9e51c0-dirty
author bgruening
date Fri, 18 Sep 2015 11:39:55 -0400
parents
children d1b66015effd
files PileOMeth.xml all_fasta.loc.sample static/images/example.svg test-data/cg100.fa test-data/cg_aln.bam test-data/test_1.bedGraph test-data/test_2_output.svg tool-data/all_fasta.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 10 files changed, 1371 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PileOMeth.xml	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,212 @@
+<tool id="pileometh" name="PileOMeth" version="0.1.5">
+    <description>A tool for processing bisulfite sequencing alignments</description>
+    <requirements>
+        <requirement type="package" version="0.1.5">pileometh</requirement>
+    </requirements>
+    <stdio>
+        <!-- Anything other than zero is an error -->
+        <exit_code range="1:" />
+        <exit_code range=":-1" />
+        <!-- In case the return code has not been set propery check stderr too -->
+        <regex match="Error:" />
+        <regex match="Exception:" />
+    </stdio>
+    <version_command><![CDATA[PileOMeth 2>&1  | head -n 2 | tail -n 1]]></version_command>
+    <command><![CDATA[
+        ln -s $reference_source.ref_file reference.fasta &&
+
+        PileOMeth
+            $main_task.task
+
+            #if $main_task.task == "extract":
+                -o output
+                $main_task.mergeContext
+            #end if
+
+            #if $advanced_options.options=="yes":
+                #if $advanced_options.mbias_regionString:
+                    -r $advanced_options.mbias_regionString
+                #end if
+                $advanced_options.keepDupes
+                $advanced_options.keepSingleton
+                -q $advanced_options.min_mapq
+                -p $advanced_options.min_phred
+                -D $advanced_options.max_pbdepth
+                $advanced_options.CHG
+                $advanced_options.CHH
+            #end if
+
+            reference.fasta
+
+            $input_sortedAlignBAM
+
+            #if $main_task.task == "mbias":
+                out_mbias
+            #end if
+    ]]></command>
+    <inputs>
+        <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Load reference genome from">
+                <option value="cached">Local cache</option>
+                <option value="history">History</option>
+            </param>
+            <when value="cached">
+                <param name="ref_file" type="select" label="Using reference genome" help="Reference sequence">
+                    <options from_data_table="all_fasta"/>
+                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
+                </param>
+            </when>
+            <when value="history">
+                <param name="ref_file" type="data" format="fasta" label="Use the folloing dataset as the reference sequence" help="REFERENCE_SEQUENCE; You can upload a FASTA sequence to the history and use it as reference" />
+            </when>
+        </conditional>
+
+        <param name="input_sortedAlignBAM" multiple="False" type="data" format="bam" label="sorted_alignments.bam"/>
+        <conditional name="main_task">
+            <param name="task" type="select" label="What do you want to do?" >
+                 <option value="extract">Extract methylation metrics from an alignment file in BAM/CRAM format</option>
+                 <option value="mbias">Determine the position-dependent methylation bias in a dataset, producing diagnostic SVG images</option>
+            </param>
+            <when value="extract">
+                <param name="mergeContext" type="boolean" checked="false" truevalue="--mergeContext" falsevalue=""
+                label="Merge per-Cytosine metrics from CpG and CHG contexts into per-CPG or per-CHG metrics" help="(--mergeContext)" />
+            </when>
+            <when value="mbias"/>
+        </conditional>
+        <conditional name="advanced_options">
+            <param name="options" type="select" label="Advanced options">
+                <option value="">Hide advanced options</option>
+                <option value="yes">Display advanced options</option>
+            </param>
+            <when value="yes">
+                <param name="mbias_regionString" type="text" value="" label="Region string in which to extract methylation"/>
+                <param name="keepDupes" type="boolean" checked="false" truevalue="--keepDupes" falsevalue=""
+                    label="By default, any alignment marked as a duplicate is ignored. This option causes them to be incorporated" />
+                <param name="keepSingleton" type="boolean" checked="false" truevalue="--keepSingleton" falsevalue=""
+                    label="By default, if only one read in a pair aligns (a singleton) then it's ignored." />
+                <param name="min_mapq" type="integer" value="10" label="Minimum MAPQ threshold to include an alignment (default 10)"/>
+                <param name="min_phred" type="integer" value="5" label="Minimum Phred threshold to include a base (default 5). This must be >0."/>
+                <param name="max_pbdepth" type="integer" value="2000" label="Maximum per-base depth (default 2000)"/>
+
+                <param name="CHG" type="boolean" checked="false" truevalue="--CHG" falsevalue=""
+                    label="Additional output file with CHG methylation metrics" />
+                <param name="CHH" type="boolean" checked="false" truevalue="--CHH" falsevalue=""
+                    label="Additional output file with CHH methylation metrics" />
+            </when>
+            <when value=""/>
+        </conditional>
+    </inputs>
+    <outputs>
+            <data  name="outFileExtractCpG" format="bedgraph" from_work_dir="output_CpG.bedGraph" 
+                label="${tool.name} on ${on_string}">
+                <filter>main_task['task']  == "extract"</filter>
+            </data>
+            <data  name="outFileExtractCHG" format="bedgraph" from_work_dir="output_CHG.bedGraph" 
+                label="${tool.name} on ${on_string} (CHG)">
+                <filter>main_task['task'] == 'extract'</filter>
+                <filter>advanced_options['options'] == "yes"</filter>
+                <filter>advanced_options['CHG'] == "--CHG"</filter>
+            </data>
+            <data  name="outFileExtractCHH" format="bedgraph" from_work_dir="output_CHH.bedGraph" 
+                label="${tool.name} on ${on_string} (CHH)">
+                <filter>main_task['task']  == 'extract'</filter>
+                <filter>advanced_options['options'] == "yes"</filter>
+                <filter>advanced_options['CHH'] == "--CHH" </filter>
+            </data>
+            <data  name="outFileMbiasCpG" format="svg" from_work_dir="out_mbias_OT.svg"
+                label="${tool.name} on ${on_string} (methylation bias)">
+                <filter>main_task['task']  == 'mbias'</filter>
+            </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="task" value="extract" />
+            <param name="min_mapq" value="2" />
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" value="cg100.fa" ftype="fasta" />
+            <param name="input_sortedAlignBAM" value="cg_aln.bam" ftype="bam"/>
+            <param name="mergeContext" value="false"/>
+            <param name="options" value="yes"/>
+            <output name="outFileExtractCpG" file="test_1.bedGraph" ftype="bedgraph" compare="diff"/>
+        </test>
+        <test>
+            <param name="task" value="mbias" />
+            <param name="min_mapq" value="2" />
+            <param name="options" value="yes"/>
+            <param name="reference_source_selector" value="history" />
+            <param name="ref_file" value="cg100.fa" ftype="fasta" />
+            <param name="input_sortedAlignBAM" value="cg_aln.bam" ftype="bam"/>
+            <output name="outFileMbiasCpG" file="test_2_output.svg" ftype="svg" compare="diff"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+**What it does**
+
+PileOMeth (using a PILEup to extract METHylation metrics) will process a coordinate-sorted and indexed BAM or CRAM file containing some form of BS-seq alignments and extract per-base methylation metrics from them. PileOMeth requires an indexed fasta file containing the reference genome as well.
+
+By default, PileOMeth will only calculate metrics for Cytosines in a CpG context, but metrics for those in CHG and CHH contexts are supported as well.
+
+**Methylation context**
+
+PileOMeth groups all Cytosines into one of three sequence contexts: CpG, CHG, and CHH. Here, H is the IUPAC ambiguity code for any nucleotide other than G. If an N is encountered in the reference sequence, then the context will be assigned to CHG or CHH, as appropriate (e.g., CNG would be categorized as in a CHG context and CNC as in a CHH context). If a Cytosine is close enough to the end of a chromosome/contig such that its context can't be inferred, then it is categorized as CHH (e.g., a Cytosine as the last base of a chromosome is considered as being in a CHH context).
+
+
+**Output information**
+
+If no methylation can be found, the output will be empty.
+
+Otherwise a variant of bedGraph that's similar to the "coverage" file is produced.  In short, each line consists of 6 tab separated columns:
+
+1. The chromosome/contig/scaffold name
+2. The start coordinate
+3. The end coordinate
+4. The methylation percentage rounded to an integer
+5. The number of alignments/pairs reporting methylated bases
+6. The number of alignments/pairs reporting unmethylated bases
+
+All coordinates are 0-based half open, which conforms to the bedGraph definition. When paired-end reads are aligned, it can often occur that their alignments overlap. In such cases, PileOMeth will not count both reads of the pair in its output, as doing so would lead to incorrect downstream statistical results.
+
+An example of the output is below::
+
+#track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"
+#1   25115   25116   100 3   0
+#1   29336   29337   50  1   1
+
+Note the header line, which starts with "track". The "description" field is used as a label in programs such as IGV. Each of the subsequent lines describe single Cytosines, the 25116th and 29337th base on chromosome 1, respectively. The first position has 3 alignments (or pairs of alignments) indicating methylation and 0 indicating unmethylation (100% methylation) and the second position has 1 alignment each supporting methylation and unmethylation (50% methylation).
+
+**Per-CpG/CHG metrics**
+
+In many circumstances, it's desireable for metrics from individual Cytosines in a CpG to be merged, producing per-CpG metrics rather than per-Cytosine metrics. This can be accomplished with the **Merge per-Cytosine** parameter. If this is used, then this output::
+
+#track type="bedGraph" description="SRR1182519.sorted CpG methylation levels"
+#1   25114   25115   100 2   1
+#1   25115   25116   100 3   0
+
+is changed to this::
+
+#track type="bedGraph" description="SRR1182519.sorted merged CpG methylation levels"
+#1   25114   25116   100 5   1
+
+This also works for CHG-level metrics. If bedGraph files containing per-Cytosine metrics already exist, they can be converted to instead contain per-CpG/CHG metrics with PileOMeth mergeContext.
+
+**Methylation bias plotting and correction**
+
+In an ideal experiment, we expect that the probability of observing a methylated C is constant across the length of any given read. In practice, however, there are often increases/decreases in observed methylation rate at the ends of reads and/or more global changes. These are termed methylation bias and including such regions in the extracted methylation metrics will result in noisier and less accurate data. For this reason, users are strongly encouraged to make a methylation bias plot.
+
+That command will create a methylation bias (mbias for short) plot for each of the strands for which there are valid alignments.
+The resulting mbias graphs are in SVG format and can be viewed in most modern web browsers:
+
+.. image:: example.svg
+
+
+If you have paired-end data, both reads in the pair will be shown separately, as is the case above. The program will suggest regions for inclusion ("--OT 2,0,0,98" above) and mark them on the plot, if applicable. The format of this output is described in PileOMeth extract -h. These suggestions should not be accepted blindly; users are strongly encouraged to have a look for themselves and tweak the actual bounds as appropriate. The lines indicate the average methylation percentage at a given position and the shaded regions the 99.9% confidence interval around it. This is useful in gauging how many methylation calls a given position has relative to its neighbors. Note the spike in methylation at the end of read #2 and the corresponding dip at the beginning of read #1. This is common and these regions can be ignored with the suggested trimming bounds. Note also that the numbers refer to the first and last base that should be included during methylation extraction, not the last and first base to ignore!.
+
+-----
+
+**PileOMeth** is a Free and Open Source Software, see more details on the PileOMeth_ Website.
+
+.. _PileOMeth: https://github.com/dpryan79/PileOMeth
+    ]]></help>
+    <citations>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/all_fasta.loc.sample	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,18 @@
+#This file lists the locations and dbkeys of all the fasta files
+#under the "genome" directory (a directory that contains a directory
+#for each build). The script extract_fasta.py will generate the file
+#all_fasta.loc. This file has the format (white space characters are
+#TAB characters):
+#
+#<unique_build_id>	<dbkey>		<display_name>	<file_path>
+#
+#So, all_fasta.loc could look something like this:
+#
+#apiMel3	apiMel3	Honeybee (Apis mellifera): apiMel3		/path/to/genome/apiMel3/apiMel3.fa
+#hg19canon	hg19		Human (Homo sapiens): hg19 Canonical		/path/to/genome/hg19/hg19canon.fa
+#hg19full	hg19		Human (Homo sapiens): hg19 Full			/path/to/genome/hg19/hg19full.fa
+#
+#Your all_fasta.loc file should contain an entry for each individual
+#fasta file. So there will be multiple fasta files for each build,
+#such as with hg19 above.
+#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/static/images/example.svg	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,653 @@
+<svg height="660" width="660"
+    xmlns="http://www.w3.org/2000/svg"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:ev="http://www.w3.org/2001/xml-events">
+<title>Original Top Strand</title>
+<rect x="0" y="0" width="660" height="660" fill="white" />
+<text x="330" y="20" text-anchor="middle">Original Top Strand</text>
+<line x1="80" y1="80" x2="80" y2="580" stroke="black" />
+<line x1="80" y1="580" x2="580" y2="580" stroke="black" />
+<text x="15" y="330" transform="rotate(270 15, 330)" text-anchor="middle" dominant-baseline="text-before-edge">CpG Methylation %</text>
+<text x="330" y="620" text-anchor="middle">Position along mapped read (5'->3' of + strand)</text>
+<line x1="80" y1="580" x2="80" y2="585" stroke="black" />
+<text x="80" y="600" text-anchor="middle">0</text>
+<line x1="205.000000" y1="80" x2="205.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="205.000000" y1="580" x2="205.000000" y2="585" stroke="black" />
+<text x="205.000000" y="600" text-anchor="middle">25</text>
+<line x1="330.000000" y1="80" x2="330.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="330.000000" y1="580" x2="330.000000" y2="585" stroke="black" />
+<text x="330.000000" y="600" text-anchor="middle">50</text>
+<line x1="455.000000" y1="80" x2="455.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="455.000000" y1="580" x2="455.000000" y2="585" stroke="black" />
+<text x="455.000000" y="600" text-anchor="middle">75</text>
+<line x1="580.000000" y1="80" x2="580.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="580.000000" y1="580" x2="580.000000" y2="585" stroke="black" />
+<text x="580.000000" y="600" text-anchor="middle">100</text>
+<line x1="80" y1="580.000000" x2="75" y2="580.000000" stroke="black" />
+<text x="55" y="580.000000" text-anchor="middle" dominant-baseline="middle">0.00</text>
+<line x1="80" y1="508.571429" x2="75" y2="508.571429" stroke="black" />
+<text x="55" y="508.571429" text-anchor="middle" dominant-baseline="middle">0.05</text>
+<line x1="80" y1="437.142857" x2="75" y2="437.142857" stroke="black" />
+<text x="55" y="437.142857" text-anchor="middle" dominant-baseline="middle">0.10</text>
+<line x1="80" y1="365.714286" x2="75" y2="365.714286" stroke="black" />
+<text x="55" y="365.714286" text-anchor="middle" dominant-baseline="middle">0.15</text>
+<line x1="80" y1="294.285714" x2="75" y2="294.285714" stroke="black" />
+<text x="55" y="294.285714" text-anchor="middle" dominant-baseline="middle">0.20</text>
+<line x1="80" y1="222.857143" x2="75" y2="222.857143" stroke="black" />
+<text x="55" y="222.857143" text-anchor="middle" dominant-baseline="middle">0.25</text>
+<line x1="80" y1="151.428571" x2="75" y2="151.428571" stroke="black" />
+<text x="55" y="151.428571" text-anchor="middle" dominant-baseline="middle">0.30</text>
+<line x1="80" y1="80.000000" x2="75" y2="80.000000" stroke="black" />
+<text x="55" y="80.000000" text-anchor="middle" dominant-baseline="middle">0.35</text>
+<path d="M 85.000000 220.215318
+  L 90.000000 299.961263
+  L 95.000000 320.212737
+  L 100.000000 300.232053
+  L 105.000000 300.479717
+  L 110.000000 283.312780
+  L 115.000000 316.080490
+  L 120.000000 313.034416
+  L 125.000000 290.520854
+  L 130.000000 302.029102
+  L 135.000000 290.250188
+  L 140.000000 311.984847
+  L 145.000000 320.921035
+  L 150.000000 311.168011
+  L 155.000000 310.209516
+  L 160.000000 297.571641
+  L 165.000000 293.944620
+  L 170.000000 293.853322
+  L 175.000000 297.182924
+  L 180.000000 304.190904
+  L 185.000000 302.233141
+  L 190.000000 317.026718
+  L 195.000000 303.414620
+  L 200.000000 306.681984
+  L 205.000000 303.408463
+  L 210.000000 302.854023
+  L 215.000000 296.800547
+  L 220.000000 283.177874
+  L 225.000000 306.765239
+  L 230.000000 293.634017
+  L 235.000000 309.381584
+  L 240.000000 333.801271
+  L 245.000000 298.970595
+  L 250.000000 301.524096
+  L 255.000000 304.284754
+  L 260.000000 300.677919
+  L 265.000000 287.230152
+  L 270.000000 323.674252
+  L 275.000000 305.934302
+  L 280.000000 330.646841
+  L 285.000000 299.457181
+  L 290.000000 300.372766
+  L 295.000000 305.479869
+  L 300.000000 329.243254
+  L 305.000000 304.263685
+  L 310.000000 329.769575
+  L 315.000000 303.679101
+  L 320.000000 317.418085
+  L 325.000000 302.759696
+  L 330.000000 329.154842
+  L 335.000000 293.856671
+  L 340.000000 320.769696
+  L 345.000000 306.587958
+  L 350.000000 315.047548
+  L 355.000000 310.169953
+  L 360.000000 307.327008
+  L 365.000000 300.524187
+  L 370.000000 305.007639
+  L 375.000000 290.884795
+  L 380.000000 317.199589
+  L 385.000000 294.883460
+  L 390.000000 306.106110
+  L 395.000000 307.048885
+  L 400.000000 306.901489
+  L 405.000000 316.584330
+  L 410.000000 320.589166
+  L 415.000000 286.320429
+  L 420.000000 293.463520
+  L 425.000000 289.705732
+  L 430.000000 283.812955
+  L 435.000000 293.058381
+  L 440.000000 289.277551
+  L 445.000000 286.251995
+  L 450.000000 314.761985
+  L 455.000000 317.252077
+  L 460.000000 290.849314
+  L 465.000000 286.802068
+  L 470.000000 306.048592
+  L 475.000000 321.381441
+  L 480.000000 311.592109
+  L 485.000000 306.048592
+  L 490.000000 302.812468
+  L 495.000000 323.239270
+  L 500.000000 332.302062
+  L 505.000000 317.991105
+  L 510.000000 320.214875
+  L 515.000000 305.461315
+  L 520.000000 306.560120
+  L 525.000000 329.777863
+  L 530.000000 298.318875
+  L 535.000000 339.652723
+  L 540.000000 315.294616
+  L 545.000000 329.276151
+  L 550.000000 326.245994
+  L 555.000000 311.426851
+  L 560.000000 318.926930
+  L 565.000000 312.574963
+  L 570.000000 309.989147
+  L 575.000000 299.516872
+  L 580.000000 316.885061
+  L 580.000000 221.593613
+  L 575.000000 206.843683
+  L 570.000000 221.184400
+  L 565.000000 222.403502
+  L 560.000000 232.019085
+  L 555.000000 223.138051
+  L 550.000000 240.107017
+  L 545.000000 243.039207
+  L 540.000000 230.869233
+  L 535.000000 257.418627
+  L 530.000000 210.797149
+  L 525.000000 246.626641
+  L 520.000000 221.805142
+  L 515.000000 218.184865
+  L 510.000000 236.375374
+  L 505.000000 234.187716
+  L 500.000000 251.485313
+  L 495.000000 238.807694
+  L 490.000000 218.100704
+  L 485.000000 221.968487
+  L 480.000000 227.847615
+  L 475.000000 239.223997
+  L 470.000000 221.968487
+  L 465.000000 201.488981
+  L 460.000000 206.970793
+  L 455.000000 234.700483
+  L 450.000000 231.344497
+  L 445.000000 200.806463
+  L 440.000000 204.376284
+  L 435.000000 208.611300
+  L 430.000000 198.246937
+  L 425.000000 206.092307
+  L 420.000000 209.671228
+  L 415.000000 201.809039
+  L 410.000000 239.423678
+  L 405.000000 234.654642
+  L 400.000000 226.676212
+  L 395.000000 223.816666
+  L 390.000000 221.639703
+  L 385.000000 210.224641
+  L 380.000000 235.333480
+  L 375.000000 208.256737
+  L 370.000000 221.930227
+  L 365.000000 218.097709
+  L 360.000000 223.477258
+  L 355.000000 227.448863
+  L 350.000000 234.720116
+  L 345.000000 224.290156
+  L 340.000000 239.256205
+  L 335.000000 210.433679
+  L 330.000000 248.805009
+  L 325.000000 220.338008
+  L 320.000000 235.904038
+  L 315.000000 221.670229
+  L 310.000000 251.059644
+  L 305.000000 221.093348
+  L 300.000000 248.305428
+  L 295.000000 222.995900
+  L 290.000000 216.604163
+  L 285.000000 215.839085
+  L 280.000000 251.005620
+  L 275.000000 222.611198
+  L 270.000000 243.717429
+  L 265.000000 204.514232
+  L 260.000000 217.551736
+  L 255.000000 221.215115
+  L 250.000000 218.887029
+  L 245.000000 216.794105
+  L 240.000000 253.403692
+  L 235.000000 228.618760
+  L 230.000000 209.140464
+  L 225.000000 225.617376
+  L 220.000000 198.816658
+  L 215.000000 214.362782
+  L 210.000000 221.806635
+  L 205.000000 221.240543
+  L 200.000000 224.219513
+  L 195.000000 221.793661
+  L 190.000000 235.798021
+  L 185.000000 218.645518
+  L 180.000000 222.941463
+  L 175.000000 215.801517
+  L 170.000000 211.234954
+  L 165.000000 210.177762
+  L 160.000000 214.691688
+  L 155.000000 227.981589
+  L 150.000000 228.704965
+  L 145.000000 239.247971
+  L 140.000000 228.546336
+  L 135.000000 208.158783
+  L 130.000000 219.517642
+  L 125.000000 209.411375
+  L 120.000000 232.190896
+  L 115.000000 231.546228
+  L 110.000000 198.983245
+  L 105.000000 217.490471
+  L 100.000000 218.005585
+  L 95.000000 242.021067
+  L 90.000000 210.082554
+  L 85.000000 140.576281
+Z" fill="rgb(248,118,109)" fill-opacity="0.2"/>
+<path d="M 85.000000 317.497119
+  L 90.000000 323.125444
+  L 95.000000 321.057367
+  L 100.000000 325.123264
+  L 105.000000 326.487558
+  L 110.000000 328.773575
+  L 115.000000 313.996694
+  L 120.000000 298.135398
+  L 125.000000 311.962757
+  L 130.000000 326.702598
+  L 135.000000 318.509472
+  L 140.000000 304.871048
+  L 145.000000 317.545475
+  L 150.000000 304.204132
+  L 155.000000 318.248816
+  L 160.000000 312.443039
+  L 165.000000 309.846191
+  L 170.000000 308.455469
+  L 175.000000 323.233975
+  L 180.000000 315.795226
+  L 185.000000 297.119341
+  L 190.000000 310.303111
+  L 195.000000 329.895694
+  L 200.000000 304.880406
+  L 205.000000 324.998405
+  L 210.000000 312.780257
+  L 215.000000 313.630941
+  L 220.000000 311.820928
+  L 225.000000 299.578269
+  L 230.000000 310.139651
+  L 235.000000 307.656063
+  L 240.000000 319.752339
+  L 245.000000 298.496672
+  L 250.000000 306.098721
+  L 255.000000 313.999520
+  L 260.000000 286.950656
+  L 265.000000 313.270842
+  L 270.000000 309.038234
+  L 275.000000 301.081124
+  L 280.000000 299.649495
+  L 285.000000 298.203346
+  L 290.000000 317.973002
+  L 295.000000 327.770665
+  L 300.000000 315.328585
+  L 305.000000 293.207635
+  L 310.000000 320.746127
+  L 315.000000 311.329119
+  L 320.000000 323.815302
+  L 325.000000 318.168638
+  L 330.000000 281.356594
+  L 335.000000 302.440401
+  L 340.000000 311.179469
+  L 345.000000 324.729866
+  L 350.000000 295.210169
+  L 355.000000 293.900983
+  L 360.000000 318.585073
+  L 365.000000 314.586213
+  L 370.000000 317.805857
+  L 375.000000 313.380628
+  L 380.000000 295.567958
+  L 385.000000 307.113832
+  L 390.000000 315.636799
+  L 395.000000 326.350575
+  L 400.000000 311.597746
+  L 405.000000 307.936874
+  L 410.000000 316.395608
+  L 415.000000 308.466493
+  L 420.000000 289.762607
+  L 425.000000 326.239694
+  L 430.000000 301.409348
+  L 435.000000 305.843641
+  L 440.000000 303.578685
+  L 445.000000 296.248913
+  L 450.000000 329.332296
+  L 455.000000 301.651090
+  L 460.000000 340.050779
+  L 465.000000 340.449290
+  L 470.000000 336.979889
+  L 475.000000 288.492520
+  L 480.000000 324.643142
+  L 485.000000 299.287449
+  L 490.000000 308.948892
+  L 495.000000 330.313763
+  L 500.000000 282.968801
+  L 505.000000 337.026442
+  L 510.000000 331.812563
+  L 515.000000 318.995575
+  L 520.000000 308.368128
+  L 525.000000 346.266378
+  L 530.000000 333.294488
+  L 535.000000 322.220073
+  L 540.000000 327.246589
+  L 545.000000 321.939803
+  L 550.000000 315.090538
+  L 555.000000 320.619038
+  L 560.000000 327.519663
+  L 565.000000 334.482153
+  L 570.000000 332.350768
+  L 575.000000 482.090953
+  L 580.000000 513.933441
+  L 580.000000 471.718208
+  L 575.000000 428.714343
+  L 570.000000 241.378663
+  L 565.000000 249.036418
+  L 560.000000 247.523104
+  L 555.000000 233.592913
+  L 550.000000 233.549023
+  L 545.000000 233.565244
+  L 540.000000 242.111369
+  L 535.000000 239.669766
+  L 530.000000 251.143075
+  L 525.000000 265.758417
+  L 520.000000 224.886794
+  L 515.000000 234.277101
+  L 510.000000 248.678239
+  L 505.000000 255.278476
+  L 500.000000 195.290206
+  L 495.000000 248.942439
+  L 490.000000 225.119670
+  L 485.000000 213.167090
+  L 480.000000 241.156429
+  L 475.000000 202.549743
+  L 470.000000 256.529393
+  L 465.000000 259.802175
+  L 460.000000 259.177810
+  L 455.000000 215.829707
+  L 450.000000 247.793410
+  L 445.000000 212.953535
+  L 440.000000 220.042982
+  L 435.000000 221.309294
+  L 430.000000 217.900727
+  L 425.000000 245.093496
+  L 420.000000 203.453159
+  L 415.000000 226.831092
+  L 410.000000 233.412755
+  L 405.000000 224.932447
+  L 400.000000 227.956354
+  L 395.000000 244.824162
+  L 390.000000 232.655925
+  L 385.000000 225.136192
+  L 380.000000 213.798493
+  L 375.000000 230.807396
+  L 370.000000 236.099815
+  L 365.000000 233.768518
+  L 360.000000 237.668615
+  L 355.000000 210.031441
+  L 350.000000 211.660536
+  L 345.000000 244.957806
+  L 340.000000 228.912985
+  L 335.000000 218.712978
+  L 330.000000 194.925344
+  L 325.000000 237.715367
+  L 320.000000 244.277439
+  L 315.000000 229.579380
+  L 310.000000 241.522595
+  L 305.000000 209.898570
+  L 300.000000 233.945167
+  L 295.000000 246.633716
+  L 290.000000 238.214730
+  L 285.000000 215.112811
+  L 280.000000 216.267294
+  L 275.000000 218.973530
+  L 270.000000 226.024984
+  L 265.000000 232.114511
+  L 260.000000 202.317643
+  L 255.000000 231.784864
+  L 250.000000 225.849711
+  L 245.000000 215.934238
+  L 240.000000 239.238446
+  L 235.000000 224.384609
+  L 230.000000 228.556582
+  L 225.000000 216.735113
+  L 220.000000 230.292048
+  L 215.000000 231.709656
+  L 210.000000 231.023343
+  L 205.000000 245.584408
+  L 200.000000 221.770724
+  L 195.000000 250.247824
+  L 190.000000 229.317486
+  L 185.000000 213.296966
+  L 180.000000 234.819198
+  L 175.000000 243.063837
+  L 170.000000 226.724297
+  L 165.000000 227.620654
+  L 160.000000 231.725663
+  L 155.000000 237.050657
+  L 150.000000 223.575956
+  L 145.000000 237.305803
+  L 140.000000 222.327402
+  L 135.000000 238.239274
+  L 130.000000 244.856654
+  L 125.000000 231.030653
+  L 120.000000 214.843567
+  L 115.000000 232.266974
+  L 110.000000 249.116546
+  L 105.000000 246.605001
+  L 100.000000 243.876734
+  L 95.000000 239.320323
+  L 90.000000 242.340935
+  L 85.000000 233.346725
+Z" fill="rgb(0,191,196)" fill-opacity="0.2"/>
+<path d="M 85.000000 181.613974
+  L 90.000000 257.226539
+  L 95.000000 283.005940
+  L 100.000000 260.998613
+  L 105.000000 260.898876
+  L 110.000000 242.964381
+  L 115.000000 275.945946
+  L 120.000000 274.550940
+  L 125.000000 251.717172
+  L 130.000000 262.681279
+  L 135.000000 250.991944
+  L 140.000000 272.307692
+  L 145.000000 282.135998
+  L 150.000000 271.927727
+  L 155.000000 271.067398
+  L 160.000000 258.014636
+  L 165.000000 253.948064
+  L 170.000000 254.383587
+  L 175.000000 258.310516
+  L 180.000000 265.440756
+  L 185.000000 262.394458
+  L 190.000000 278.405584
+  L 195.000000 264.487292
+  L 200.000000 267.399498
+  L 205.000000 264.230550
+  L 210.000000 264.184555
+  L 215.000000 257.439638
+  L 220.000000 242.813717
+  L 225.000000 268.084841
+  L 230.000000 253.301034
+  L 235.000000 270.901175
+  L 240.000000 295.726731
+  L 245.000000 259.748823
+  L 250.000000 262.114133
+  L 255.000000 264.702219
+  L 260.000000 261.036149
+  L 265.000000 247.658730
+  L 270.000000 285.696602
+  L 275.000000 266.251392
+  L 280.000000 292.882026
+  L 285.000000 259.578838
+  L 290.000000 260.433930
+  L 295.000000 266.176357
+  L 300.000000 290.876549
+  L 305.000000 264.634892
+  L 310.000000 292.418301
+  L 315.000000 264.576485
+  L 320.000000 278.670796
+  L 325.000000 263.459652
+  L 330.000000 291.053652
+  L 335.000000 254.017258
+  L 340.000000 282.055686
+  L 345.000000 267.379885
+  L 350.000000 276.818465
+  L 355.000000 270.802348
+  L 360.000000 267.416866
+  L 365.000000 261.201673
+  L 370.000000 265.428311
+  L 375.000000 251.384922
+  L 380.000000 278.289876
+  L 385.000000 254.486031
+  L 390.000000 265.902610
+  L 395.000000 267.418087
+  L 400.000000 268.644689
+  L 405.000000 277.639638
+  L 410.000000 282.031603
+  L 415.000000 245.914221
+  L 420.000000 253.450985
+  L 425.000000 249.742284
+  L 430.000000 242.899198
+  L 435.000000 252.741525
+  L 440.000000 248.718083
+  L 445.000000 245.415267
+  L 450.000000 275.121951
+  L 455.000000 278.030924
+  L 460.000000 250.773970
+  L 465.000000 246.031162
+  L 470.000000 266.020932
+  L 475.000000 282.380952
+  L 480.000000 271.771643
+  L 485.000000 266.020932
+  L 490.000000 262.465091
+  L 495.000000 283.226710
+  L 500.000000 294.022140
+  L 505.000000 278.208325
+  L 510.000000 280.438717
+  L 515.000000 263.969684
+  L 520.000000 266.229330
+  L 525.000000 290.415371
+  L 530.000000 256.643317
+  L 535.000000 300.813945
+  L 540.000000 275.201483
+  L 545.000000 288.515203
+  L 550.000000 285.494505
+  L 555.000000 269.537641
+  L 560.000000 277.745902
+  L 565.000000 269.844536
+  L 570.000000 267.850049
+  L 575.000000 255.504551
+  L 580.000000 271.893768
+" stroke="rgb(248,118,109)" stroke-width="2" fill-opacity="0"/>
+<path d="M 85.000000 277.551608
+  L 90.000000 284.766193
+  L 95.000000 282.244617
+  L 100.000000 286.574304
+  L 105.000000 288.571429
+  L 110.000000 290.982659
+  L 115.000000 275.118029
+  L 120.000000 258.394546
+  L 125.000000 273.428823
+  L 130.000000 287.898064
+  L 135.000000 280.339239
+  L 140.000000 265.534591
+  L 145.000000 279.379971
+  L 150.000000 265.738790
+  L 155.000000 279.653446
+  L 160.000000 274.011639
+  L 165.000000 270.701720
+  L 170.000000 269.523810
+  L 175.000000 285.155031
+  L 180.000000 277.277401
+  L 185.000000 257.125966
+  L 190.000000 271.729323
+  L 195.000000 292.120247
+  L 200.000000 265.285129
+  L 205.000000 287.280460
+  L 210.000000 273.877551
+  L 215.000000 274.661416
+  L 220.000000 273.013184
+  L 225.000000 260.056198
+  L 230.000000 271.291368
+  L 235.000000 268.013136
+  L 240.000000 281.483078
+  L 245.000000 259.093614
+  L 250.000000 267.823913
+  L 255.000000 274.899818
+  L 260.000000 246.493977
+  L 265.000000 274.646817
+  L 270.000000 269.526430
+  L 275.000000 261.909801
+  L 280.000000 259.881006
+  L 285.000000 258.555420
+  L 290.000000 280.030989
+  L 295.000000 289.298510
+  L 300.000000 276.620584
+  L 305.000000 253.414820
+  L 310.000000 283.073985
+  L 315.000000 272.415910
+  L 320.000000 286.029522
+  L 325.000000 279.911739
+  L 330.000000 240.022665
+  L 335.000000 262.539683
+  L 340.000000 272.028986
+  L 345.000000 286.846552
+  L 350.000000 255.324675
+  L 355.000000 253.856885
+  L 360.000000 280.121228
+  L 365.000000 276.129114
+  L 370.000000 278.974958
+  L 375.000000 274.111482
+  L 380.000000 256.503272
+  L 385.000000 268.057041
+  L 390.000000 276.204215
+  L 395.000000 287.687232
+  L 400.000000 271.824320
+  L 405.000000 268.418577
+  L 410.000000 276.969697
+  L 415.000000 269.578714
+  L 420.000000 248.560606
+  L 425.000000 287.747630
+  L 430.000000 261.599167
+  L 435.000000 265.606571
+  L 440.000000 263.776352
+  L 445.000000 256.489430
+  L 450.000000 290.694334
+  L 455.000000 260.785337
+  L 460.000000 301.829326
+  L 465.000000 302.334004
+  L 470.000000 298.915344
+  L 475.000000 247.447307
+  L 480.000000 285.073560
+  L 485.000000 258.262065
+  L 490.000000 269.063855
+  L 495.000000 291.761971
+  L 500.000000 241.075210
+  L 505.000000 298.377088
+  L 510.000000 292.480033
+  L 515.000000 278.807781
+  L 520.000000 268.636213
+  L 525.000000 308.279329
+  L 530.000000 294.422028
+  L 535.000000 283.049759
+  L 540.000000 286.959707
+  L 545.000000 280.129386
+  L 550.000000 276.308186
+  L 555.000000 279.403227
+  L 560.000000 289.562109
+  L 565.000000 294.138363
+  L 570.000000 289.499051
+  L 575.000000 457.999187
+  L 580.000000 495.224302
+" stroke="rgb(0,191,196)" stroke-width="2" fill-opacity="0"/>
+<text x="650" y="650" text-anchor="end">--OT 2,0,0,98</text>
+<line x1="90.000000" y1="580" x2="90.000000" y2="80" stroke-dasharray="5 1" stroke="rgb(248,118,109)" stroke-width="1" />
+<line x1="570.000000" y1="580" x2="570.000000" y2="80" stroke-dasharray="5 1" stroke="rgb(0,191,196)" stroke-width="1" />
+<rect x="590" y="310" width="20" height="20" fill="rgb(248,118,109)" />
+<text x="615" y="320" text-anchor="start" dominant-baseline="middle">#1</text>
+<rect x="590" y="330" width="20" height="20" fill="rgb(0,191,196)" />
+<text x="615" y="340" text-anchor="start" dominant-baseline="middle">#2</text>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cg100.fa	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,2 @@
+>chrCG
+cgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcgcA
Binary file test-data/cg_aln.bam has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_1.bedGraph	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,49 @@
+track type="bedGraph" description="output CpG methylation levels"
+chrCG	0	1	100	1	0
+chrCG	2	3	100	1	0
+chrCG	4	5	100	1	0
+chrCG	6	7	100	1	0
+chrCG	8	9	100	1	0
+chrCG	10	11	100	1	0
+chrCG	12	13	100	1	0
+chrCG	14	15	100	1	0
+chrCG	18	19	100	1	0
+chrCG	20	21	100	1	0
+chrCG	22	23	100	1	0
+chrCG	24	25	100	1	0
+chrCG	26	27	100	1	0
+chrCG	28	29	100	1	0
+chrCG	30	31	100	1	0
+chrCG	32	33	100	1	0
+chrCG	34	35	100	1	0
+chrCG	36	37	100	1	0
+chrCG	38	39	100	1	0
+chrCG	40	41	100	1	0
+chrCG	42	43	100	1	0
+chrCG	44	45	100	1	0
+chrCG	46	47	100	1	0
+chrCG	48	49	100	1	0
+chrCG	50	51	100	1	0
+chrCG	52	53	100	1	0
+chrCG	54	55	100	1	0
+chrCG	56	57	100	1	0
+chrCG	58	59	100	1	0
+chrCG	60	61	100	1	0
+chrCG	62	63	100	1	0
+chrCG	64	65	100	1	0
+chrCG	66	67	100	1	0
+chrCG	68	69	100	1	0
+chrCG	70	71	100	1	0
+chrCG	72	73	100	1	0
+chrCG	74	75	100	1	0
+chrCG	76	77	100	1	0
+chrCG	78	79	100	1	0
+chrCG	80	81	100	1	0
+chrCG	82	83	100	1	0
+chrCG	84	85	100	1	0
+chrCG	86	87	100	1	0
+chrCG	88	89	100	1	0
+chrCG	90	91	100	1	0
+chrCG	92	93	100	1	0
+chrCG	94	95	100	1	0
+chrCG	96	97	100	1	0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/test_2_output.svg	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,390 @@
+<svg height="660" width="660"
+    xmlns="http://www.w3.org/2000/svg"
+    xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:ev="http://www.w3.org/2001/xml-events">
+<title>Original Top Strand</title>
+<rect x="0" y="0" width="660" height="660" fill="white" />
+<text x="330" y="20" text-anchor="middle">Original Top Strand</text>
+<line x1="80" y1="80" x2="80" y2="580" stroke="black" />
+<line x1="80" y1="580" x2="580" y2="580" stroke="black" />
+<text x="15" y="330" transform="rotate(270 15, 330)" text-anchor="middle" dominant-baseline="text-before-edge">CpG Methylation %</text>
+<text x="330" y="620" text-anchor="middle">Position along mapped read (5'->3' of + strand)</text>
+<line x1="80" y1="580" x2="80" y2="585" stroke="black" />
+<text x="80" y="600" text-anchor="middle">0</text>
+<line x1="130.000000" y1="80" x2="130.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="130.000000" y1="580" x2="130.000000" y2="585" stroke="black" />
+<text x="130.000000" y="600" text-anchor="middle">10</text>
+<line x1="180.000000" y1="80" x2="180.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="180.000000" y1="580" x2="180.000000" y2="585" stroke="black" />
+<text x="180.000000" y="600" text-anchor="middle">20</text>
+<line x1="230.000000" y1="80" x2="230.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="230.000000" y1="580" x2="230.000000" y2="585" stroke="black" />
+<text x="230.000000" y="600" text-anchor="middle">30</text>
+<line x1="280.000000" y1="80" x2="280.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="280.000000" y1="580" x2="280.000000" y2="585" stroke="black" />
+<text x="280.000000" y="600" text-anchor="middle">40</text>
+<line x1="330.000000" y1="80" x2="330.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="330.000000" y1="580" x2="330.000000" y2="585" stroke="black" />
+<text x="330.000000" y="600" text-anchor="middle">50</text>
+<line x1="380.000000" y1="80" x2="380.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="380.000000" y1="580" x2="380.000000" y2="585" stroke="black" />
+<text x="380.000000" y="600" text-anchor="middle">60</text>
+<line x1="430.000000" y1="80" x2="430.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="430.000000" y1="580" x2="430.000000" y2="585" stroke="black" />
+<text x="430.000000" y="600" text-anchor="middle">70</text>
+<line x1="480.000000" y1="80" x2="480.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="480.000000" y1="580" x2="480.000000" y2="585" stroke="black" />
+<text x="480.000000" y="600" text-anchor="middle">80</text>
+<line x1="530.000000" y1="80" x2="530.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="530.000000" y1="580" x2="530.000000" y2="585" stroke="black" />
+<text x="530.000000" y="600" text-anchor="middle">90</text>
+<line x1="580.000000" y1="80" x2="580.000000" y2="580" stroke-dasharray="5 5" stroke="grey" />
+<line x1="580.000000" y1="580" x2="580.000000" y2="585" stroke="black" />
+<text x="580.000000" y="600" text-anchor="middle">100</text>
+<line x1="80" y1="580.000000" x2="75" y2="580.000000" stroke="black" />
+<text x="55" y="580.000000" text-anchor="middle" dominant-baseline="middle">0.00</text>
+<line x1="80" y1="555.000000" x2="75" y2="555.000000" stroke="black" />
+<text x="55" y="555.000000" text-anchor="middle" dominant-baseline="middle">0.05</text>
+<line x1="80" y1="530.000000" x2="75" y2="530.000000" stroke="black" />
+<text x="55" y="530.000000" text-anchor="middle" dominant-baseline="middle">0.10</text>
+<line x1="80" y1="505.000000" x2="75" y2="505.000000" stroke="black" />
+<text x="55" y="505.000000" text-anchor="middle" dominant-baseline="middle">0.15</text>
+<line x1="80" y1="480.000000" x2="75" y2="480.000000" stroke="black" />
+<text x="55" y="480.000000" text-anchor="middle" dominant-baseline="middle">0.20</text>
+<line x1="80" y1="455.000000" x2="75" y2="455.000000" stroke="black" />
+<text x="55" y="455.000000" text-anchor="middle" dominant-baseline="middle">0.25</text>
+<line x1="80" y1="430.000000" x2="75" y2="430.000000" stroke="black" />
+<text x="55" y="430.000000" text-anchor="middle" dominant-baseline="middle">0.30</text>
+<line x1="80" y1="405.000000" x2="75" y2="405.000000" stroke="black" />
+<text x="55" y="405.000000" text-anchor="middle" dominant-baseline="middle">0.35</text>
+<line x1="80" y1="380.000000" x2="75" y2="380.000000" stroke="black" />
+<text x="55" y="380.000000" text-anchor="middle" dominant-baseline="middle">0.40</text>
+<line x1="80" y1="355.000000" x2="75" y2="355.000000" stroke="black" />
+<text x="55" y="355.000000" text-anchor="middle" dominant-baseline="middle">0.45</text>
+<line x1="80" y1="330.000000" x2="75" y2="330.000000" stroke="black" />
+<text x="55" y="330.000000" text-anchor="middle" dominant-baseline="middle">0.50</text>
+<line x1="80" y1="305.000000" x2="75" y2="305.000000" stroke="black" />
+<text x="55" y="305.000000" text-anchor="middle" dominant-baseline="middle">0.55</text>
+<line x1="80" y1="280.000000" x2="75" y2="280.000000" stroke="black" />
+<text x="55" y="280.000000" text-anchor="middle" dominant-baseline="middle">0.60</text>
+<line x1="80" y1="255.000000" x2="75" y2="255.000000" stroke="black" />
+<text x="55" y="255.000000" text-anchor="middle" dominant-baseline="middle">0.65</text>
+<line x1="80" y1="230.000000" x2="75" y2="230.000000" stroke="black" />
+<text x="55" y="230.000000" text-anchor="middle" dominant-baseline="middle">0.70</text>
+<line x1="80" y1="205.000000" x2="75" y2="205.000000" stroke="black" />
+<text x="55" y="205.000000" text-anchor="middle" dominant-baseline="middle">0.75</text>
+<line x1="80" y1="180.000000" x2="75" y2="180.000000" stroke="black" />
+<text x="55" y="180.000000" text-anchor="middle" dominant-baseline="middle">0.80</text>
+<line x1="80" y1="155.000000" x2="75" y2="155.000000" stroke="black" />
+<text x="55" y="155.000000" text-anchor="middle" dominant-baseline="middle">0.85</text>
+<line x1="80" y1="130.000000" x2="75" y2="130.000000" stroke="black" />
+<text x="55" y="130.000000" text-anchor="middle" dominant-baseline="middle">0.90</text>
+<line x1="80" y1="105.000000" x2="75" y2="105.000000" stroke="black" />
+<text x="55" y="105.000000" text-anchor="middle" dominant-baseline="middle">0.95</text>
+<line x1="80" y1="80.000000" x2="75" y2="80.000000" stroke="black" />
+<text x="55" y="80.000000" text-anchor="middle" dominant-baseline="middle">1.00</text>
+<path d="M 85.000000 547.204569
+  L 95.000000 547.204569
+  L 105.000000 547.204569
+  L 115.000000 547.204569
+  L 125.000000 547.204569
+  L 135.000000 547.204569
+  L 145.000000 547.204569
+  L 155.000000 547.204569
+  L 165.000000 589.478693
+  L 175.000000 547.204569
+  L 185.000000 547.204569
+  L 195.000000 547.204569
+  L 205.000000 547.204569
+  L 215.000000 547.204569
+  L 225.000000 547.204569
+  L 235.000000 547.204569
+  L 245.000000 547.204569
+  L 255.000000 547.204569
+  L 265.000000 547.204569
+  L 275.000000 547.204569
+  L 285.000000 547.204569
+  L 295.000000 547.204569
+  L 305.000000 547.204569
+  L 315.000000 547.204569
+  L 325.000000 547.204569
+  L 335.000000 547.204569
+  L 345.000000 547.204569
+  L 355.000000 547.204569
+  L 365.000000 547.204569
+  L 375.000000 547.204569
+  L 385.000000 547.204569
+  L 395.000000 547.204569
+  L 405.000000 547.204569
+  L 415.000000 547.204569
+  L 425.000000 547.204569
+  L 435.000000 547.204569
+  L 445.000000 547.204569
+  L 455.000000 547.204569
+  L 465.000000 547.204569
+  L 475.000000 547.204569
+  L 485.000000 547.204569
+  L 495.000000 547.204569
+  L 505.000000 547.204569
+  L 515.000000 547.204569
+  L 525.000000 547.204569
+  L 535.000000 547.204569
+  L 545.000000 547.204569
+  L 555.000000 547.204569
+  L 565.000000 547.204569
+  L 565.000000 70.521307
+  L 555.000000 70.521307
+  L 545.000000 70.521307
+  L 535.000000 70.521307
+  L 525.000000 70.521307
+  L 515.000000 70.521307
+  L 505.000000 70.521307
+  L 495.000000 70.521307
+  L 485.000000 70.521307
+  L 475.000000 70.521307
+  L 465.000000 70.521307
+  L 455.000000 70.521307
+  L 445.000000 70.521307
+  L 435.000000 70.521307
+  L 425.000000 70.521307
+  L 415.000000 70.521307
+  L 405.000000 70.521307
+  L 395.000000 70.521307
+  L 385.000000 70.521307
+  L 375.000000 70.521307
+  L 365.000000 70.521307
+  L 355.000000 70.521307
+  L 345.000000 70.521307
+  L 335.000000 70.521307
+  L 325.000000 70.521307
+  L 315.000000 70.521307
+  L 305.000000 70.521307
+  L 295.000000 70.521307
+  L 285.000000 70.521307
+  L 275.000000 70.521307
+  L 265.000000 70.521307
+  L 255.000000 70.521307
+  L 245.000000 70.521307
+  L 235.000000 70.521307
+  L 225.000000 70.521307
+  L 215.000000 70.521307
+  L 205.000000 70.521307
+  L 195.000000 70.521307
+  L 185.000000 70.521307
+  L 175.000000 70.521307
+  L 165.000000 112.795431
+  L 155.000000 70.521307
+  L 145.000000 70.521307
+  L 135.000000 70.521307
+  L 125.000000 70.521307
+  L 115.000000 70.521307
+  L 105.000000 70.521307
+  L 95.000000 70.521307
+  L 85.000000 70.521307
+Z" fill="rgb(248,118,109)" fill-opacity="0.2"/>
+<path d="M 85.000000 547.204569
+  L 95.000000 547.204569
+  L 105.000000 547.204569
+  L 115.000000 547.204569
+  L 125.000000 547.204569
+  L 135.000000 547.204569
+  L 145.000000 547.204569
+  L 155.000000 547.204569
+  L 165.000000 547.204569
+  L 175.000000 547.204569
+  L 185.000000 547.204569
+  L 195.000000 547.204569
+  L 205.000000 547.204569
+  L 215.000000 547.204569
+  L 225.000000 547.204569
+  L 235.000000 547.204569
+  L 245.000000 547.204569
+  L 255.000000 547.204569
+  L 265.000000 547.204569
+  L 275.000000 547.204569
+  L 285.000000 547.204569
+  L 295.000000 547.204569
+  L 305.000000 547.204569
+  L 315.000000 547.204569
+  L 325.000000 547.204569
+  L 335.000000 547.204569
+  L 345.000000 547.204569
+  L 355.000000 547.204569
+  L 365.000000 547.204569
+  L 375.000000 547.204569
+  L 385.000000 547.204569
+  L 395.000000 547.204569
+  L 405.000000 547.204569
+  L 415.000000 547.204569
+  L 425.000000 547.204569
+  L 435.000000 547.204569
+  L 445.000000 547.204569
+  L 455.000000 547.204569
+  L 465.000000 547.204569
+  L 475.000000 547.204569
+  L 485.000000 547.204569
+  L 495.000000 547.204569
+  L 505.000000 547.204569
+  L 515.000000 547.204569
+  L 525.000000 547.204569
+  L 535.000000 547.204569
+  L 545.000000 547.204569
+  L 555.000000 547.204569
+  L 565.000000 547.204569
+  L 565.000000 70.521307
+  L 555.000000 70.521307
+  L 545.000000 70.521307
+  L 535.000000 70.521307
+  L 525.000000 70.521307
+  L 515.000000 70.521307
+  L 505.000000 70.521307
+  L 495.000000 70.521307
+  L 485.000000 70.521307
+  L 475.000000 70.521307
+  L 465.000000 70.521307
+  L 455.000000 70.521307
+  L 445.000000 70.521307
+  L 435.000000 70.521307
+  L 425.000000 70.521307
+  L 415.000000 70.521307
+  L 405.000000 70.521307
+  L 395.000000 70.521307
+  L 385.000000 70.521307
+  L 375.000000 70.521307
+  L 365.000000 70.521307
+  L 355.000000 70.521307
+  L 345.000000 70.521307
+  L 335.000000 70.521307
+  L 325.000000 70.521307
+  L 315.000000 70.521307
+  L 305.000000 70.521307
+  L 295.000000 70.521307
+  L 285.000000 70.521307
+  L 275.000000 70.521307
+  L 265.000000 70.521307
+  L 255.000000 70.521307
+  L 245.000000 70.521307
+  L 235.000000 70.521307
+  L 225.000000 70.521307
+  L 215.000000 70.521307
+  L 205.000000 70.521307
+  L 195.000000 70.521307
+  L 185.000000 70.521307
+  L 175.000000 70.521307
+  L 165.000000 70.521307
+  L 155.000000 70.521307
+  L 145.000000 70.521307
+  L 135.000000 70.521307
+  L 125.000000 70.521307
+  L 115.000000 70.521307
+  L 105.000000 70.521307
+  L 95.000000 70.521307
+  L 85.000000 70.521307
+Z" fill="rgb(0,191,196)" fill-opacity="0.2"/>
+<path d="M 85.000000 80.000000
+  L 95.000000 80.000000
+  L 105.000000 80.000000
+  L 115.000000 80.000000
+  L 125.000000 80.000000
+  L 135.000000 80.000000
+  L 145.000000 80.000000
+  L 155.000000 80.000000
+  L 165.000000 580.000000
+  L 175.000000 80.000000
+  L 185.000000 80.000000
+  L 195.000000 80.000000
+  L 205.000000 80.000000
+  L 215.000000 80.000000
+  L 225.000000 80.000000
+  L 235.000000 80.000000
+  L 245.000000 80.000000
+  L 255.000000 80.000000
+  L 265.000000 80.000000
+  L 275.000000 80.000000
+  L 285.000000 80.000000
+  L 295.000000 80.000000
+  L 305.000000 80.000000
+  L 315.000000 80.000000
+  L 325.000000 80.000000
+  L 335.000000 80.000000
+  L 345.000000 80.000000
+  L 355.000000 80.000000
+  L 365.000000 80.000000
+  L 375.000000 80.000000
+  L 385.000000 80.000000
+  L 395.000000 80.000000
+  L 405.000000 80.000000
+  L 415.000000 80.000000
+  L 425.000000 80.000000
+  L 435.000000 80.000000
+  L 445.000000 80.000000
+  L 455.000000 80.000000
+  L 465.000000 80.000000
+  L 475.000000 80.000000
+  L 485.000000 80.000000
+  L 495.000000 80.000000
+  L 505.000000 80.000000
+  L 515.000000 80.000000
+  L 525.000000 80.000000
+  L 535.000000 80.000000
+  L 545.000000 80.000000
+  L 555.000000 80.000000
+  L 565.000000 80.000000
+" stroke="rgb(248,118,109)" stroke-width="2" fill-opacity="0"/>
+<path d="M 85.000000 80.000000
+  L 95.000000 80.000000
+  L 105.000000 80.000000
+  L 115.000000 80.000000
+  L 125.000000 80.000000
+  L 135.000000 80.000000
+  L 145.000000 80.000000
+  L 155.000000 80.000000
+  L 165.000000 80.000000
+  L 175.000000 80.000000
+  L 185.000000 80.000000
+  L 195.000000 80.000000
+  L 205.000000 80.000000
+  L 215.000000 80.000000
+  L 225.000000 80.000000
+  L 235.000000 80.000000
+  L 245.000000 80.000000
+  L 255.000000 80.000000
+  L 265.000000 80.000000
+  L 275.000000 80.000000
+  L 285.000000 80.000000
+  L 295.000000 80.000000
+  L 305.000000 80.000000
+  L 315.000000 80.000000
+  L 325.000000 80.000000
+  L 335.000000 80.000000
+  L 345.000000 80.000000
+  L 355.000000 80.000000
+  L 365.000000 80.000000
+  L 375.000000 80.000000
+  L 385.000000 80.000000
+  L 395.000000 80.000000
+  L 405.000000 80.000000
+  L 415.000000 80.000000
+  L 425.000000 80.000000
+  L 435.000000 80.000000
+  L 445.000000 80.000000
+  L 455.000000 80.000000
+  L 465.000000 80.000000
+  L 475.000000 80.000000
+  L 485.000000 80.000000
+  L 495.000000 80.000000
+  L 505.000000 80.000000
+  L 515.000000 80.000000
+  L 525.000000 80.000000
+  L 535.000000 80.000000
+  L 545.000000 80.000000
+  L 555.000000 80.000000
+  L 565.000000 80.000000
+" stroke="rgb(0,191,196)" stroke-width="2" fill-opacity="0"/>
+<text x="650" y="650" text-anchor="end">--OT 18,0,0,0</text>
+<line x1="170.000000" y1="580" x2="170.000000" y2="80" stroke-dasharray="5 1" stroke="rgb(248,118,109)" stroke-width="1" />
+<rect x="590" y="310" width="20" height="20" fill="rgb(248,118,109)" />
+<text x="615" y="320" text-anchor="start" dominant-baseline="middle">#1</text>
+<rect x="590" y="330" width="20" height="20" fill="rgb(0,191,196)" />
+<text x="615" y="340" text-anchor="start" dominant-baseline="middle">#2</text>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/all_fasta.loc.sample	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,18 @@
+#This file lists the locations and dbkeys of all the fasta files
+#under the "genome" directory (a directory that contains a directory
+#for each build). The script extract_fasta.py will generate the file
+#all_fasta.loc. This file has the format (white space characters are
+#TAB characters):
+#
+#<unique_build_id>	<dbkey>		<display_name>	<file_path>
+#
+#So, all_fasta.loc could look something like this:
+#
+#apiMel3	apiMel3	Honeybee (Apis mellifera): apiMel3		/path/to/genome/apiMel3/apiMel3.fa
+#hg19canon	hg19		Human (Homo sapiens): hg19 Canonical		/path/to/genome/hg19/hg19canon.fa
+#hg19full	hg19		Human (Homo sapiens): hg19 Full			/path/to/genome/hg19/hg19full.fa
+#
+#Your all_fasta.loc file should contain an entry for each individual
+#fasta file. So there will be multiple fasta files for each build,
+#such as with hg19 above.
+#
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of all fasta files under genome directory -->
+    <table name="all_fasta" comment_char="#">
+        <columns>value, dbkey, name, path</columns>
+        <file path="tool-data/all_fasta.loc" />
+    </table>
+</tables>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Fri Sep 18 11:39:55 2015 -0400
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="pileometh" version="0.1.5">
+        <install version="1.0">
+            <actions>
+                <action target_filename="PileOMeth-0.1.5.tar.gz" type="download_by_url">https://github.com/dpryan79/PileOMeth/archive/0.1.5.tar.gz</action>
+                <action type="shell_command">make</action>
+                <action type="shell_command">make install prefix=$INSTALL_DIR</action>
+                <action type="set_environment">
+                    <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR</environment_variable>
+                    <environment_variable name="PILEOMETH_ROOT_PATH" action="set_to">$INSTALL_DIR</environment_variable>
+                </action>
+            </actions>
+        </install>
+            <readme>
+        <![CDATA[
+            PileOMeth: A tool for processing bisulfite sequencing alignments.
+            See https://github.com/dpryan79/PileOMeth/
+        ]]>
+        </readme>
+    </package>
+</tool_dependency>