changeset 0:b2886915ce68 draft default tip

Uploaded
author bgruening
date Tue, 10 Feb 2015 03:21:34 -0500
parents
children
files bamCompare.xml bamCorrelate.xml bamCoverage.xml bamFingerprint.xml bamPEFragmentSize.xml bigwigCompare.xml computeGCBias.xml computeMatrix.xml correctGCBias.xml deepTools_macros.xml heatmapper.xml plotCorrelation.xml profiler.xml readme.rst static/images/QC_GCplots_input.png static/images/QC_bamCorrelate_humanSamples.png static/images/QC_fingerprint.png static/images/flowChart_computeMatrixetc.png static/images/norm_IGVsnapshot_indFiles.png static/images/visual_hm_DmelPolII.png static/images/visual_profiler_DmelPolII.png test-data/1.bigwig test-data/_1.bigwig test-data/_2.bigwig test-data/_3.bigwig test-data/bamCompare_result1.bg test-data/bamCorrelate_result1.png test-data/bamCoverage_result1.bw test-data/bamCoverage_result2.bw test-data/bamCoverage_result3.bg test-data/bamCoverage_result4.bg test-data/bamCoverage_result4.bw test-data/bamFingerprint_result1.png test-data/bamPEFragmentSize_histogram_result1.png test-data/bamPEFragmentSize_result1.txt test-data/bigwigCompare_result1.bw test-data/bigwigCompare_result2.bg test-data/bowtie2-test1.bam test-data/computeGCBias_result1.png test-data/computeGCBias_result1.tabular test-data/computeMatrix1.bed test-data/computeMatrix2.bed test-data/computeMatrix2.bw test-data/computeMatrix_result1.gz test-data/computeMatrix_result2.gz test-data/correctGCBias_result1.bam test-data/phiX.2bit test-data/phiX.bam test-data/phiX.bam.bai test-data/phiX.fasta tool-data/deepTools_seqs.loc.sample tool_data_table_conf.xml.sample tool_dependencies.xml
diffstat 52 files changed, 3452 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamCompare.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,221 @@
+<tool id="deeptools_bamCompare" name="bamCompare" version="@WRAPPER_VERSION@.0">
+    <description>normalizes and compares two BAM files to obtain the ratio, log2ratio or difference. (bam2bigwig)</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bamCompare</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        bamCompare
+
+        @THREADS@
+
+        --bamfile1 '$bamFile1'
+        -bai1 '${bamFile1.metadata.bam_index}'
+        --bamfile2 '$bamFile2'
+        -bai2 '${bamFile2.metadata.bam_index}'
+
+        --outFileName '$outFileName'
+        --outFileFormat '$outFileFormat'
+
+        --fragmentLength $fragmentLength
+        --binSize $binSize
+
+        #if $scaling.method == 'SES':
+            --scaleFactorsMethod SES
+            --sampleLength $scaling.sampleLength
+        #elif $scaling.method == 'readCount':
+            --scaleFactorsMethod readCount
+        #elif $scaling.method == 'own':
+            --scaleFactors '$scaling.scaleFactor1:$scaling.scaleFactor2'
+        #end if
+
+        --ratio $comparison.type
+
+        #if $comparison.type=='subtract':
+            #if $comparison.normalization.type=='rpkm':
+                --normalizeUsingRPKM
+            #elif $comparison.normalization.type=='1x':
+
+                #if $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
+                    --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize
+                #else:
+                    --normalizeTo1x $comparison.normalization.effectiveGenomeSize.effectiveGenomeSize_opt
+                #end if
+
+            #end if
+        #elif $comparison.type in ['ratio','log2']:
+            --pseudocount $comparison.pseudocount
+        #end if
+
+        #if str($region).strip() != '':
+            --region '$region'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes":
+            #if $advancedOpt.smoothLength:
+            --smoothLength '$advancedOpt.smoothLength'
+            #end if
+
+            $advancedOpt.doNotExtendPairedEnds
+            $advancedOpt.ignoreDuplicates
+
+            #if $advancedOpt.minMappingQuality:
+                --minMappingQuality '$advancedOpt.minMappingQuality'
+            #end if
+
+            --missingDataAsZero $advancedOpt.missingDataAsZero
+
+            #if str($advancedOpt.ignoreForNormalization).strip() != '':
+                --ignoreForNormalization '$advancedOpt.ignoreForNormalization'
+            #end if
+
+        #end if
+]]>
+    </command>
+    <inputs>
+        <param name="bamFile1" format="bam" type="data" label="First BAM file (e.g. treated sample)"
+            help="The BAM file must be sorted."/>
+        <param name="bamFile2" format="bam" type="data" label="Second BAM file (e.g. control sample)"
+            help="The BAM file must be sorted."/>
+        <param name="fragmentLength" type="integer" value="200" min="1"
+            label="Length of the average fragment size"
+            help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see &quot;normalize coverage to 1x&quot;). The formula to normalize using the sequencing depth is genomeSize/(number of mapped reads * fragment length). *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length. (--fragmentLength)"/>
+
+        <param name="binSize" type="integer" value="50" min="1" 
+            label="Bin size in bp"
+            help="The genome will be divided in bins (also called tiles) of the specified length. For each bin the overlaping number of fragments (or reads)  will be reported. If only half a fragment overlaps, this fraction will be reported. (--binSize)"/>
+
+        <conditional name="scaling">
+            <param name="method" type="select" 
+                label="Method to use for scaling the largest sample to the smallest">
+                <option value="readCount" selected="true">read count</option>
+                <option value="SES">signal extraction scaling (SES), check the bamFingerprint plot before using it!</option>
+                <option value="own">enter own scaling factors</option>
+            </param>
+            <when value="SES">
+                <param name="sampleLength" type="integer" value="1000" min="10"
+                    label="Length in base pairs used to sample the genome and compute the size or scaling factors to compare the two  BAM files "
+                    help="The default is fine. Only change it if you know what you are doing" />
+            </when>
+            <when value="readCount" />
+            <when value="own">
+                <expand macro="scaleFactor" />
+            </when>
+        </conditional>
+
+        <conditional name="comparison">
+            <param name="type" type="select" 
+                label="How to compare the two files">
+                <option value="log2" selected="true">Compute log2 of the number of reads ratio</option>
+                <option value="ratio">Compute the ratio of the number of reads</option>
+                <option value="subtract">Compute difference (subtract input from treatment) of the number of reads</option>
+            </param>
+            <when value="log2">
+                <expand macro="pseudocount" />
+            </when>
+            <when value="ratio">
+                <expand macro="pseudocount" />
+            </when>
+            <when value="subtract">
+                <conditional name="normalization">
+                    <param name="type" type="select" label="Normalization method" >
+                        <option value="1x">Normalize coverage to 1x</option>
+                        <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option>
+                        <option value="no">Do not normalize or scale</option>
+                    </param>
+                    <when value="rpkm" />
+                    <when value="no" />
+                    <when value="1x">
+                        <expand macro="effectiveGenomeSize" />
+                    </when>
+                </conditional>
+            </when>
+        </conditional>
+
+        <param name="outFileFormat" type="select" label="Coverage file format">
+            <option value="bigwig" selected="true">bigwig</option>
+            <option value="bedgraph">bedgraph</option>
+        </param>
+        <expand macro="region_limit_operation" />
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="smoothLength" type="integer" value="1" optional="true" min="1"
+                    label="Smooth values using the following length (in bp)"
+                    help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied. (--smoothLength)"/>
+                <expand macro="doNotExtendPairedEnds" />
+                <expand macro="ignoreDuplicates" />
+                <expand macro="minMappingQuality" />
+                <expand macro="missingDataAsZero" />
+                <param name="ignoreForNormalization" type="text" value="" size="50"
+                    label="regions that should be excluded for calculating the scaling factor"
+                    help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor. For example, if you know some regions that you suspect to be present more often in your sample's genome than in the reference genome that will therefore accumulate reads (CNV). Another typical example is the single X chromosome in male samples that should be scaled separately from the diploid autosomes. For example chrX,chrY,chr3. or chr10:12220-128932" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="bigwig" name="outFileName">
+        <change_format>
+            <when input="outFileFormat" value="bigwig" format="bigwig" />
+            <when input="outFileFormat" value="bedgraph" format="bedgraph" />
+        </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bamFile1" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="bamFile2" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="outFileFormat" value="bigwig" />
+            <param name="fragmentLength" value="100" />
+            <param name="outFileFormat" value="bedgraph" />
+            <param name="binSize" value="5" />
+            <param name="type" value="ratio" />
+            <output name="outFileName" file="bamCompare_result1.bg" ftype="bedgraph" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool compares two BAM files based on the number of mapped reads. To
+compare the BAM files, the genome is partitioned into bins of equal size, then
+the number of reads found in each BAM file is counted for such bins and
+finally a summarizing value is reported. This value can be the ratio of the
+number of reads per bin, the log2 of the ratio or the difference. This tool
+can normalize the number of reads on each BAM file using the SES method
+proposed by Diaz et al. (2012). "Normalization, bias correction, and peak
+calling for ChIP-seq". Statistical applications in genetics and molecular
+biology, 11(3). Normalization based on read counts is also available. The
+output is either a bedgraph or a bigwig file containing the bin location and
+the resulting comparison values. By default, if reads are mated, the fragment
+length reported in the BAM file is used. In the case of paired-end mapping
+each read mate is treated independently to avoid a bias when a mixture of
+concordant and discordant pairs is present. This means that *each end* will be
+extended to match the fragment length.
+
+
+.. image:: $PATH_TO_IMAGES/norm_IGVsnapshot_indFiles.png
+
+
+You can find more details on the bamCompare wiki page: https://github.com/fidelram/deepTools/wiki/Normalizations#wiki-bamCompare
+
+
+**Output files**:
+
+- same as for bamCoverage, except that you now obtain 1 coverage file that is based on 2 BAM files.
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamCorrelate.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,206 @@
+<tool id="deeptools_bamCorrelate" name="bamCorrelate" version="@WRAPPER_VERSION@.0">
+    <description>correlates pairs of BAM files</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bamCorrelate</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        #set files=[]
+        #set labels=[]
+
+        @multiple_input_bams@
+
+        bamCorrelate
+
+        $mode.modeOpt
+
+        @THREADS@
+
+        --bamfiles #echo " ".join($files)
+        --labels #echo " ".join($labels)
+        --fragmentLength $fragmentLength
+        --corMethod $corMethod
+
+        --plotFile $outFileName
+
+        #if $output.showOutputSettings == "yes"
+            --outRawCounts '$outFileRawCounts' 
+            --outFileCorMatrix '$outFileCorMatrix'
+            --plotFileFormat $output.outFileFormat
+        #else:
+            --plotFileFormat 'png'
+        #end if
+
+        #if $mode.modeOpt == "bins":
+            --binSize '$mode.binSize'
+            --distanceBetweenBins '$mode.distanceBetweenBins'
+            $mode.doNotRemoveOutliers
+
+        #else:
+            --BED $mode.region_file
+        #end if
+
+        #### options available in both modes
+        #if str($mode.region.value) != '':
+            --region '$mode.region'
+        #end if
+
+        #if $mode.advancedOpt.showAdvancedOpt == "yes":
+
+            $mode.advancedOpt.doNotExtendPairedEnds
+            $mode.advancedOpt.ignoreDuplicates
+            $mode.advancedOpt.includeZeros
+
+            #if $mode.advancedOpt.minMappingQuality:
+                --minMappingQuality '$mode.advancedOpt.minMappingQuality'
+            #end if
+
+            #if $mode.advancedOpt.zMin:
+                --zMin $mode.advancedOpt.zMin
+            #end if
+            #if $mode.advancedOpt.zMax:
+                --zMax $mode.advancedOpt.zMax
+            #end if
+            --colorMap '$mode.advancedOpt.colorMap'
+
+        #end if
+]]>
+    </command>
+
+    <inputs>
+        <expand macro="multiple_input_bams" />
+
+        <param name="fragmentLength" type="integer" value="200" min="1"
+            label="Length of the average fragment size"
+            help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length. (--fragmentLength)"/>
+
+        <param name="corMethod" type="select" label="Correlation method">
+            <option value="spearman" selected="True">Spearman</option>
+            <option value="pearson">Pearson</option>
+        </param>
+
+        <conditional name="mode">
+            <param name="modeOpt" type="select" label="Choose computation mode" 
+                help="In the bins mode, the correlation is computed based on equal length bins. In the BED file mode, as list of genomic regions in BED format has to be given. For each region in the BED file the number of overlapping reads is counted in each of the BAM files. Then the correlation is computed.">
+                <option value="bins" selected="true">Bins</option>
+                <option value="BED-file">Limit correlation to certain regions (BED file)</option>
+            </param>
+            <when value="bins">
+                <param name="binSize" type="integer" value="10000" min="1" 
+                    label="Bin size in bp"
+                    help="Length in base pairs for a window used to sample the genome."/>
+
+                <param name="distanceBetweenBins" type="integer" value="0" min="0"
+                    label="Distance between bins"
+                    help="By default, bamCorrelate considers consecutive bins of
+                        the specified 'Bin size'. However, to reduce the
+                        computation time, a larger distance between bins can
+                        by given. Larger distances result in less bins being
+                        considered"/>
+
+                <param name="doNotRemoveOutliers" type="boolean"
+                    truevalue="--doNotRemoveOutliers" falsevalue="" label="Do not filter outliers"
+                    help="By default, bins with very large counts are removed.
+                        By setting this option, outliers will not be
+                        removed. Bins with unusually large counts normally
+                        correspond to regions in the genome that accumulate
+                        lot of reads like satellite regions. If outliers are not
+                        removed the pearson correlation will wrongly report a
+                        very high correlation; that's why, by default,
+                        bamCorrelate tries to remove outliers using
+                        the median absolute deviation (MAD) method applying a
+                        threshold of 200 to only consider extremely large
+                        deviations from the median."/>
+
+                <expand macro="bamCorrelate_mode_actions" />
+            </when>
+            <when value="BED-file">
+                <param name="region_file" type="data" format="bed"
+                    label="Region file in BED format"
+                    help="Correlation is computed for the number of reads that overlap such regions."/>
+                <expand macro="bamCorrelate_mode_actions" />
+            </when>
+        </conditional>
+
+        <conditional name="output">
+            <param name="showOutputSettings" type="select" label="Show advanced output settings" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <expand macro="input_image_file_format"/>
+                <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
+                <param name="saveCorMatrix" type="boolean" label="Save the correlation matrix"/>
+            </when>
+        </conditional>
+
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveRawCounts'] is True
+            ))
+            </filter>
+        </data>
+        <data format="tabular" name="outFileCorMatrix" label="${tool.name} on ${on_string}: correlation matrix">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveCorMatrix'] is True
+            ))
+            </filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+            </repeat>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+            </repeat>
+            <param name="modeOpt" value="bins" />
+            <param name="binSize" value="10" />
+            <param name="showOutputSettings" value="no" />
+            <output name="outFileName" file="bamCorrelate_result1.png" ftype="png" compare="sim_size" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool is useful to assess the overall similarity of different BAM files. A typical application
+is to check the correlation between replicates or published data sets.
+
+The tool splits the genomes into bins of given length. For each bin, the number of reads
+found in each BAM file is counted and a correlation (either Pearson or Spearman) is computed for all
+pairs of BAM files. Finally, a heatmap is drawn based on the similarity of the samples.
+
+
+.. image:: $PATH_TO_IMAGES/QC_bamCorrelate_humanSamples.png
+   :alt: Heatmap of RNA Polymerase II ChIP-seq
+
+
+You can find more details on the bamCorrelate wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamCorrelate
+
+
+**Output files**:
+
+- **diagnostic plot**: clustered heatmap displaying the values for each pair-wise correlation, see below for an example
+- data matrix (optional): if you want to plot the correlation values using a different program, e.g. R, this matrix can be used
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamCoverage.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,198 @@
+<tool id="deeptools_bamCoverage" name="bamCoverage" version="@WRAPPER_VERSION@.0">
+    <description> generates a coverage bigWig file from a given BAM file.  Multiple options are available to count reads and normalize coverage. (bam2bigwig)</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bamCoverage</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        bamCoverage
+
+            @THREADS@
+
+            --bam '$bamInput'
+            --bamIndex ${bamInput.metadata.bam_index}
+            --outFileName '$outFileName'
+            --outFileFormat '$outFileFormat'
+
+            --fragmentLength $fragmentLength
+            --binSize $binSize
+
+            #if $scaling.type=='rpkm':
+                --normalizeUsingRPKM
+            #elif $scaling.type=='1x':
+                #if $scaling.effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
+                    --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize
+                #else:
+                    --normalizeTo1x $scaling.effectiveGenomeSize.effectiveGenomeSize_opt
+                #end if
+            #elif $scaling.type=='own':
+                --scaleFactor $scaling.scaleFactor
+            #end if
+
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+
+            #if $advancedOpt.showAdvancedOpt == "yes":
+                #if $advancedOpt.smoothLength:
+                    --smoothLength '$advancedOpt.smoothLength'
+                #end if
+
+                $advancedOpt.doNotExtendPairedEnds
+                $advancedOpt.ignoreDuplicates
+
+                #if $advancedOpt.minMappingQuality:
+                    --minMappingQuality '$advancedOpt.minMappingQuality'
+                #end if
+
+                --missingDataAsZero $advancedOpt.missingDataAsZero
+
+                ##if str($advancedOpt.ignoreForNormalization).strip() != '':
+                ##    --ignoreForNormalization $advancedOpt.ignoreForNormalization
+                ##end if
+
+            #end if
+]]>
+    </command>
+
+    <inputs>
+        <param name="bamInput" format="bam" type="data" label="BAM file"
+            help="The BAM file must be sorted."/>
+
+        <param name="fragmentLength" type="integer" value="200" min="1"
+            label="Length of the average fragment size"
+            help ="Reads will be extended to match this length unless they are paired-end, in which case they will be extended to match the fragment length. If this value is set to the read length or smaller, the read will not be extended. *Warning* the fragment length affects the normalization to 1x (see &quot;normalize coverage to 1x&quot;). Sequencing depth is defined as: (total number of mapped reads * fragment length) / effective genome size. *NOTE*: If the BAM files contain mated and unmated paired-end reads, unmated reads will be extended to match the fragment length. (--fragmentLength)"/>
+
+        <param name="binSize" type="integer" value="50" min="1" 
+            label="Bin size in bp"
+            help="The genome will be divided in bins (also called tiles) of the specified length. For each bin the overlaping number of fragments (or reads)  will be reported. If only half a fragment overlaps, this fraction will be reported. "/>
+
+        <conditional name="scaling">
+            <param name="type" type="select" label="Scaling/Normalization method" >
+                <option value="1x">Normalize coverage to 1x</option>
+                <option value="rpkm">Normalize to fragments (reads) per kilobase per million (RPKM)</option>
+                <option value="own">Set your own scaling factor</option>
+                <option value="no">Do not normalize or scale</option>
+            </param>
+            <when value="rpkm"/>
+            <when value="no"/>
+            <when value="1x">
+                <expand macro="effectiveGenomeSize" />
+            </when>
+            <when value="own">
+                <param name="scaleFactor" type="float" value="1" size="3" 
+                    label="Scale factor to multiply all values" />
+            </when>
+        </conditional>
+
+        <param name="outFileFormat" type="select" label="Coverage file format">
+            <option value="bigwig" selected="true">bigwig</option>
+            <option value="bedgraph">bedgraph</option>
+        </param>
+
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="smoothLength" type="integer" value="1" optional="true" min="1"
+                    label="Smooth values using the following length (in bp)"
+                    help ="The smooth length defines a window, larger than the bin size, to average the number of reads. For example, if the bin size is set to 20 bp and the smooth length is set to 60 bp, then, for each bin size the average of it and its left and right neighbors is considered. Any value smaller than the bin size will be ignored and no smoothing will be applied. (--smoothLength)"/>
+
+                <expand macro="doNotExtendPairedEnds" />
+                <expand macro="ignoreDuplicates" />
+                <expand macro="minMappingQuality" />
+
+                <expand macro="missingDataAsZero" />
+
+             <!--   <param name="ignoreForNormalization" type="text" value="" size="50"
+                    label="regions that should be excluded for calculating the scaling factor"
+                    help="Sometimes it makes sense to exclude certain regions when calculating the scaling factor. For example, if you know some regions that you suspect to be present more often in your sample's genome than in the reference genome that will therefore accumulate reads (CNV). Another typical example is the single X chromosome in male samples that should be scaled separately from the diploid autosomes. For example chrX,chrY,chr3. or chr10:12220-128932" />
+            -->
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="bigwig" name="outFileName">
+            <change_format>
+                <when input="outFileFormat" value="bigwig" format="bigwig" />
+                <when input="outFileFormat" value="bedgraph" format="bedgraph" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="outFileFormat" value="bigwig" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="binSize" value="10" />
+            <param name="type" value="no" />
+            <output name="outFileName" file="bamCoverage_result1.bw" ftype="bigwig" />
+        </test>
+        <test>
+            <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="outFileFormat" value="bigwig" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="binSize" value="10" />
+            <output name="outFileName" file="bamCoverage_result2.bw" ftype="bigwig" />
+        </test>
+        <test>
+            <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="outFileFormat" value="bedgraph" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="binSize" value="10" />
+            <output name="outFileName" file="bamCoverage_result3.bg" ftype="bedgraph" />
+        </test>
+        <test>
+            <param name="bamInput" value="phiX.bam" ftype="bam" />
+            <param name="outFileFormat" value="bigwig" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="binSize" value="10" />
+            <output name="outFileName" file="bamCoverage_result4.bw" ftype="bigwig" />
+        </test>
+        <test>
+            <param name="bamInput" value="phiX.bam" ftype="bam" />
+            <param name="outFileFormat" value="bedgraph" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="binSize" value="10" />
+            <output name="outFileName" file="bamCoverage_result4.bg" ftype="bedgraph" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Given a BAM file, this tool generates a bigWig or bedGraph file of fragment or
+read coverages. The way the method works is by first calculating all the
+number of reads (either extended to match the fragment length or not) that
+overlap each bin in the genome. The resulting read counts can be normalized
+using either a given scaling factor, the RPKM formula or to get a 1x depth of
+coverage (RPGC). In the case of paired-end mapping each read mate is treated
+independently to avoid a bias when a mixture of concordant and discordant
+pairs is present. This means that *each end* will be extended to match the
+fragment length.
+
+.. image:: $PATH_TO_IMAGES/norm_IGVsnapshot_indFiles.png
+
+
+You can find more details on the bamCoverage wiki page: https://github.com/fidelram/deepTools/wiki/Normalizations#wiki-bamCoverage
+
+
+**Output files**:
+
+- coverage file either in bigWig or bedGraph format
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamFingerprint.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,150 @@
+<tool id="deeptools_bamFingerprint" name="bamFingerprint" version="@WRAPPER_VERSION@.0">
+    <description>plots profiles of BAM files; useful for assesing ChIP signal strength</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bamFingerprint</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        @multiple_input_bams@
+
+        bamFingerprint
+
+            @THREADS@
+
+            --bamfiles #echo " ".join($files)
+            --labels #echo " ".join($labels)
+
+            --fragmentLength $fragmentLength
+
+            #set newoutFileName=str($outFileName)+".png"
+            --plotFile $newoutFileName
+
+            #if $output.showOutputSettings == "yes"
+                --plotFileFormat $output.outFileFormat
+                #if $output.saveRawCounts:
+                    --outRawCounts '$outFileRawCounts' 
+                #end if
+            #else
+                --plotFileFormat 'png'
+            #end if
+
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+
+            #if $advancedOpt.showAdvancedOpt == "yes":
+                --binSize '$advancedOpt.binSize'
+                --numberOfSamples '$advancedOpt.numberOfSamples'
+
+                $advancedOpt.doNotExtendPairedEnds
+                $advancedOpt.ignoreDuplicates
+                $advancedOpt.skipZeros
+
+                #if $advancedOpt.minMappingQuality:
+                --minMappingQuality '$advancedOpt.minMappingQuality'
+                #end if
+            #end if
+        ; mv $newoutFileName $outFileName
+        ; rm $temp_dir -rf
+]]>
+    </command>
+
+    <inputs>
+        <expand macro="multiple_input_bams" />
+        <expand macro="fragmentLength" />
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="binSize" type="integer" value="500" min="1" 
+                   label="Bin size in bp"
+                   help="Length in base pairs for a window used to sample the genome."/>
+                <param name="numberOfSamples" type="integer" value="100000" min="1" 
+                   label="Number of samples"
+                   help="Number of samples taken from the genome to compute the scaling factors. (--numberOfSamples)"/>
+                <expand macro="doNotExtendPairedEnds" />
+                <expand macro="ignoreDuplicates" />
+                <expand macro="minMappingQuality" />
+                <expand macro="skipZeros" />
+
+            </when>
+        </conditional>
+        <conditional name="output">
+            <param name="showOutputSettings" type="select" label="Show advanced output settings">
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <expand macro="input_image_file_format" />
+                <param name="saveRawCounts" type="boolean" label="Save the bin counts"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <data format="tabular" name="outFileRawCounts" label="${tool.name} on ${on_string}: bin counts">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveRawCounts'] is True
+            ))
+            </filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+            </repeat>
+            <repeat name="input_files">
+                <param name="bamfile" value="bowtie2-test1.bam" ftype="bam" />
+            </repeat>
+            <param name="fragmentLength" value="200" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="showOutputSettings" value="no" />
+            <output name="outFileName" file="bamFingerprint_result1.png" ftype="png" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool is useful to assess the strength of a ChIP (i.e. how clearly the enrichment signal can be separated from the background signal)
+and it is based on a method developed by Diaz et al. (2012) Stat Appl Genet Mol Biol 11(3).
+
+The tool first samples indexed BAM files and counts all reads overlapping a window (bin) of specified length.
+These counts are then sorted according to their rank (the bin with the highest number of reads has the highest rank)
+and the cumulative sum of read counts are plotted. An ideal input (control sample) with perfect uniform distribution of reads
+along the genome (i.e. without enrichments in open chromatin etc.) should
+generate a straight diagonal line. A very specific and strong ChIP enrichment will be indicated by a prominent and steep
+rise of the cumulative sum towards the highest rank. This means that a big chunk of reads from the ChIP sample is located in
+few bins which corresponds to high, narrow enrichments seen for transcription factors.
+
+
+.. image:: $PATH_TO_IMAGES/QC_fingerprint.png
+
+
+You can find more details on the bamFingerprint wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-bamFingerprint
+
+
+**Output files**:
+
+- Diagnostic plot
+- Data matrix of raw counts
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bamPEFragmentSize.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,56 @@
+<tool id="deeptools_bamPEFragmentSize" name="bamPEFragmentSize" version="@WRAPPER_VERSION@.0">
+    <description>Given a BAM file it samples several regions to estimate the paird-end fragment length</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bamPEFragmentSize</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        bamPEFragmentSize
+            @THREADS@
+            -bai ${bamInput.metadata.bam_index}
+            #if $histogram:
+                --histogram ./hist.png
+            #end if
+            '$bamInput'
+            > $outfile
+        &&
+        mv ./hist.png $histogram_outfile
+]]>
+    </command>
+    <inputs>
+        <param name="bamInput" format="bam" type="data" label="BAM file"
+            help="The BAM file must be sorted."/>
+        <param name="histogram" type="boolean" truevalue="--histogram" falsevalue=""
+            label="Get the distribion of fragment length as histogram"
+            help="(--histogram)"/>
+    </inputs>
+    <outputs>
+        <data name="outfile" format="txt"/>
+        <data name="histogram_outfile" format="png">
+            <filter>histogram is True</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bamInput" value="bowtie2-test1.bam" ftype="bam" />
+            <param name="histogram" value="True" />
+            <output name="outfile" file="bamPEFragmentSize_result1.txt" ftype="txt" />
+            <output name="histogram_outfile" file="bamPEFragmentSize_histogram_result1.png" ftype="png" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Given a BAM file it samples several regions to estimate the paird-end fragment length.
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bigwigCompare.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,133 @@
+<tool id="deeptools_bigwigCompare" name="bigwigCompare" version="@WRAPPER_VERSION@.0">
+    <description>normalizes and compares two bigWig files to obtain the ratio, log2ratio or difference</description>
+    <expand macro="requirements"/>
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">bigwigCompare</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        bigwigCompare
+
+        @THREADS@
+
+        --bigwig1 '$bigwigFile1'
+        --bigwig2 '$bigwigFile2'
+
+        --outFileName '$outFileName'
+        --outFileFormat '$outFileFormat'
+
+        --ratio $comparison.comparison_select
+
+        #if $comparison.comparison_select in ['ratio','log2']:
+            --pseudocount $comparison.pseudocount
+        #end if
+
+        #if str($region).strip() != '':
+            --region '$region'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes":
+
+          --missingDataAsZero $advancedOpt.missingDataAsZero
+          --scaleFactors '$advancedOpt.scaleFactor1:$advancedOpt.scaleFactor2'
+          --binSize $advancedOpt.binSize
+
+        #end if
+]]>
+    </command>
+    <inputs>
+        <param name="bigwigFile1" format="bigwig" type="data" label="Treatment bigwig file" />
+        <param name="bigwigFile2" format="bigwig" type="data" label="bigWig file" />
+
+        <conditional name="comparison">
+            <param name="comparison_select" type="select" 
+                label="How to compare the two files" help="(--ratio)">
+                <option value="log2" selected="true">compute log2 of the number of reads ratio</option>
+                <option value="ratio">compute the ratio of the number of reads</option>
+                <option value="subtract">compute difference (subtract input from treatment) of the number of reads</option>
+                <option value="add">compute the sum over all reads</option>
+                <option value="reciprocal_ratio">compute the reciprocal ratio of the number of reads</option>
+            </param>
+            <when value="log2">
+                <expand macro="pseudocount" />
+            </when>
+            <when value="ratio">
+                <expand macro="pseudocount" />
+            </when>
+            <when value="subtract" />
+            <when value="add" />
+            <when value="reciprocal_ratio" />
+        </conditional>
+
+        <param name="outFileFormat" type="select" label="Coverage file format">
+            <option value="bigwig" selected="true">bigwig</option>
+            <option value="bedgraph">bedgraph</option>
+        </param>
+
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="binSize" type="integer" value="50" min="1" 
+                    label="Length, in base pairs, of the non-overlapping bin for averaging the score over the regions length"
+                    help="Size of the bins in bp for the output of the bigwig/bedgraph file. (--binSize)"/>
+                <param name="missingDataAsZero" type="boolean" truevalue="yes" falsevalue="no" checked="True"
+                    label ="Treat missing data as zero"
+                    help  ="This parameter determines if missing data should be replaced with a zero. If set to &quot;no&quot;, missing data will be ignored and will not be included in the output file at all. Missing data is defined as those regions for which no value exists in *any* of the bigwig files. The decision to include or exclude missing data depends on the interpretation of the data. Missing data in a bigwig file may mean that there is no information available for certain regions, for example a repetitive region that is not being considered. In the same file regions with low coverage may get zero read counts. If missing data is replaced by zero, this would convert the excluded repetitive regions into regions of low coverage. (--missingDataAsZero)" />
+                <expand macro="scaleFactor" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="bigwig" name="outFileName">
+            <change_format>
+                <when input="outFileFormat" value="bigwig" format="bigwig" />
+                <when input="outFileFormat" value="bedgraph" format="bedgraph" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bigwigFile1" value="1.bigwig" ftype="bigwig" />
+            <param name="bigwigFile2" value="1.bigwig" ftype="bigwig" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="outFileFormat" value="bigwig" />
+            <param name="binSize" value="5" />
+            <param name="comparison_select" value="ratio" />
+            <output name="outFileName" file="bigwigCompare_result1.bw" ftype="bigwig" />
+        </test>
+        <test>
+            <param name="bigwigFile1" value="1.bigwig" ftype="bigwig" />
+            <param name="bigwigFile2" value="1.bigwig" ftype="bigwig" />
+            <param name="showAdvancedOpt" value="no" />
+            <param name="outFileFormat" value="bedgraph" />
+            <param name="binSize" value="10" />
+            <param name="comparison_select" value="ratio" />
+            <output name="outFileName" file="bigwigCompare_result2.bg" ftype="bedgraph" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool compares two bigwig files based on the number of mapped reads. To
+compare the bigwig files the genome is partitioned into bins of equal size,
+then the number of reads found in each BAM file are counted for such bins and
+finally a summarizing value is reported. This value can be the ratio of the
+number of reads per bin, the log2 of the ratio, the sum or the difference.
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/computeGCBias.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,167 @@
+<tool id="deeptools_computeGCBias" name="computeGCBias" version="@WRAPPER_VERSION@.0">
+    <description>to see whether your samples should be normalized for GC bias</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">computeGCBias</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        ln -s $bamInput local_bamInput.bam;
+        ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
+
+        computeGCBias
+            @THREADS@
+
+            --bamfile 'local_bamInput.bam'
+            --GCbiasFrequenciesFile $outFileName
+            --fragmentLength $fragmentLength
+
+            @reference_genome_source@
+
+            #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
+            #else:
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
+            #end if
+
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+
+            #if $advancedOpt.showAdvancedOpt == "yes":
+
+                --sampleSize '$advancedOpt.sampleSize'
+                --regionSize '$advancedOpt.regionSize'
+
+                #if $advancedOpt.filterOut:
+                    --filterOut $advancedOpt.filterOut
+                #end if
+
+                #if $advancedOpt.extraSampling:
+                    --extraSampling $advancedOpt.extraSampling
+                #end if
+            #end if
+
+            #if str($image_format) != 'none':
+                --biasPlot $outImageName
+                --plotFileFormat $image_format
+            #end if
+]]>
+    </command>
+    <inputs>
+        <param name="bamInput" format="bam" type="data" label="BAM file"
+            help="The BAM file must be sorted."/>
+
+        <expand macro="reference_genome_source" />
+        <expand macro="effectiveGenomeSize" />
+        <expand macro="fragmentLength" />
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="sampleSize" type="integer" value="50000000" min="1"
+                    label="Number of sampling points to be considered" help="(--sampleSize)" />
+                <param name="regionSize" type="integer" value="300" min="1"
+                    label="Region size"
+                    help ="To plot the reads per GC over a region, the size of the region is required (see below for more details of the mthod). By default, the bin size is set to 300 bp, which is close to the standard fragment size many sequencing applications. However, if the depth of sequencing is low, a larger bin size will be required, otherwise many bins will not overlap with any read. (--regionSize)"/>
+                <param name="filterOut" type="data" format="bed" optional="true"
+                    label="BED file containing genomic regions to be excluded from the estimation of the correction"
+                    help="Such regions  usually contain repetitive regions and peaks that if included will bias the correction. It is recommended to filter out known repetitive regions if multi-reads (reads that map to more than one genomic position) were excluded. In the case of ChIP-seq data, it is recommended to first use a peak caller to identify and filter out the identified peaks. (--filterOut)" />
+                <param name="extraSampling" type="data" format="bed" optional="true"
+                    label="BED file containing genomic regions for which extra sampling is required because they are underrepresented in the genome"
+                    help="(--extraSampling)" />
+            </when>
+        </conditional>
+        <param name="image_format" type="select"
+            label="GC bias plot"
+            help="If given, a diagnostic image summarizing the GC bias found on the sample will be created. (--plotFileFormat)">
+            <option value="none">No image</option>
+            <option value="png" selected="true">Image in png format</option>
+            <option value="pdf">Image in pdf format</option>
+            <option value="svg">Image in svg format</option>
+            <option value="eps">Image in eps format</option>
+            <option value="emf">Image in emf format</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="outFileName" format="tabular" />
+        <data name="outImageName" format="png" label="${tool.name} GC-bias Plot">
+            <filter>
+            ((
+                image_format != 'none'
+            ))
+            </filter>
+            <change_format>
+                <when input="image_format" value="pdf" format="pdf" />
+                <when input="image_format" value="svg" format="svg" />
+                <when input="image_format" value="eps" format="eps" />
+                <when input="image_format" value="emf" format="emf" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="bamInput" value="phiX.bam" ftype="bam" />
+            <param name="image_format" value="png" />
+            <param name="showAdvancedOpt" value="yes" />
+            <param name="regionSize" value="1" />
+            <param name="fragmentLength" value="100" />
+            <param name="ref_source" value="history" />
+            <param name="input1" value="phiX.2bit" />
+            <output name="outFileName" file="computeGCBias_result1.tabular" ftype="tabular" />
+            <output name="outImageName" file="computeGCBias_result1.png" ftype="png" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool computes the GC bias using the method proposed by Benjamini and Speed (2012) Nucleic Acids Res. (see below for more explanations)
+The output is used to plot the bias and can also be used later on to correct the bias with the tool correctGCbias.
+There are two plots produced by the tool: a boxplot showing the absolute read numbers per genomic-GC bin and an x-y plot
+depicting the ratio of observed/expected reads per genomic GC content bin.
+
+-----
+
+**Summary of the method used**
+
+In order to estimate how many reads with what kind of GC content one should have sequenced, we first need to determine how many regions the specific
+reference genome contains for each amount of GC content, i.e. how many regions in the genome have 50% GC (or 10% GC or 90% GC or...).
+We then sample a large number of equally sized genome bins and count how many times we see a bin with 50% GC (or 10% GC or 90% or...). These EXPECTED values are independent of any 
+sequencing as it only depends on the respective reference genome (i.e. it will most likely vary between mouse and fruit fly due to their genome's different GC contents).
+The OBSERVED values are based on the reads from the sequenced sample. Instead of noting how many genomic regions there are per GC content, we now count the reads per GC content.
+In an ideal sample without GC bias, the ratio of OBSERVED/EXPECTED values should be close to 1 regardless of the GC content. Due to PCR (over)amplifications, the majority of ChIP samples
+usually shows a significant bias towards reads with high GC content (>50%)
+
+.. image:: $PATH_TO_IMAGES/QC_GCplots_input.png
+
+
+You can find more details on the computeGCBias wiki page: computeGCBias wiki: https://github.com/fidelram/deepTools/wiki/QC#wiki-computeGCbias
+
+
+**Output files**:
+
+- Diagnostic plot
+
+  - box plot of absolute read numbers per genomic GC bin
+  - x-y plot of observed/expected read ratios per genomic GC content bin
+
+- Data matrix
+
+  - to be used for GC correction with correctGCbias
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/computeMatrix.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,269 @@
+<tool id="deeptools_computeMatrix" name="computeMatrix" version="@WRAPPER_VERSION@.0">
+    <description>summarizes and prepares an intermediary file containing scores associated with genomic regions that can be used afterwards to plot a heatmap or a profile</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">computeMatrix</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        #import tempfile
+
+        #set $temp_input_handle = tempfile.NamedTemporaryFile()
+        #set $temp_input_path = $temp_input_handle.name
+        #silent $temp_input_handle.close()
+
+        #for $rf in $regionsFiles:
+            cat "$rf.regionsFile" >> $temp_input_path;
+            #if str($rf.label.value).strip():
+                echo "\#$rf.label.value" >> $temp_input_path;
+            #else:
+                echo "\#$rf.regionsFile.name" >> $temp_input_path;
+            #end if
+        #end for
+
+        computeMatrix
+
+            $mode.mode_select
+            --regionsFileName '$temp_input_path'
+            --scoreFileName '$scoreFile'
+            --outFileName '$outFileName'
+
+            @THREADS@
+
+            #if $output.showOutputSettings == "yes"
+                #if $output.saveData:
+                    --outFileNameData '$outFileNameData' 
+                #end if
+                #if $output.saveMatrix:
+                --outFileNameMatrix '$outFileNameMatrix'
+                #end if
+
+                #if $output.saveSortedRegions:
+                    --outFileSortedRegions '$outFileSortedRegions'
+                #end if
+            #end if
+
+            #if $mode.mode_select == "reference-point":
+                --referencePoint $mode.referencePoint
+                $mode.nanAfterEnd
+                --beforeRegionStartLength $mode.beforeRegionStartLength
+                --afterRegionStartLength $mode.afterRegionStartLength
+            #else
+                --regionBodyLength $mode.regionBodyLength
+                --startLabel "$mode.startLabel"
+                --endLabel "$mode.endLabel"
+                #if $mode.regionStartLength.regionStartLength_select == "yes":
+                    --beforeRegionStartLength $mode.regionStartLength.beforeRegionStartLength
+                    --afterRegionStartLength $mode.regionStartLength.afterRegionStartLength
+                #end if
+            #end if
+
+            #if $advancedOpt.showAdvancedOpt == "yes":
+                --sortRegions '$advancedOpt.sortRegions'
+                --sortUsing '$advancedOpt.sortUsing'
+                --averageTypeBins '$advancedOpt.averageTypeBins'
+                $advancedOpt.missingDataAsZero
+                $advancedOpt.skipZeros
+                --binSize $advancedOpt.binSize
+
+                #if $advancedOpt.minThreshold:
+                    --minThreshold $advancedOpt.minThreshold
+                #end if
+                #if $advancedOpt.maxThreshold:
+                    --maxThreshold $advancedOpt.maxThreshold
+                #end if
+                #if $advancedOpt.scale:
+                    --scale $advancedOpt.scale
+                #end if
+
+            #end if
+        ; rm $temp_input_path
+]]>
+    </command>
+    <inputs>
+
+        <repeat name="regionsFiles" title="regions to plot" min="1">
+            <param name="regionsFile" format="bed" type="data" label="Regions to plot" help="File, in BED format, containing the regions to plot."/>
+            <param name="label" type="text" size="30" optional="true" value="" label="Label" help="Label to use in the output."/>
+        </repeat>
+
+        <param name="scoreFile" format="bigwig" type="data"
+            label="Score file"
+            help="Should be a bigWig file (containing a score, usually covering the whole genome). You can generate a bigWig file either from a bedGraph or WIG file using UCSC tools or from a BAM file using the deepTool bamCoverage. (-scoreFile)"/>
+
+        <conditional name="mode" >
+            <param name="mode_select" type="select"
+                label="computeMatrix has two main output options"
+                help="In the scale-regions mode, all regions in the BED file are stretched or shrunk to the same length (bp) that is indicated by the user. Reference-point refers to a position within the BED regions (e.g start of region). In the reference-point mode only those genomic positions before (downstream) and/or after (upstream) the reference point will be plotted.">
+                <option value="scale-regions" selected="true">scale-regions</option>
+                <option value="reference-point">reference-point</option>
+            </param>
+
+            <when value="scale-regions" >
+                <param name="regionBodyLength" type="integer" value="500"
+                    label="Distance in bp to which all regions are going to be fitted" help="(--regionBodyLength)"/>
+                <param name="startLabel" type="text" value="TSS" size="10"
+                    label="Label for the region start"
+                    help ="Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. &quot;peak start&quot;. (--startLabel)" />
+                <param name="endLabel" type="text" value="TES" size="10"
+                    label="Label for the region end"
+                    help="Label shown in the plot for the region end. Default is TES (transcription end site). (--endLabel)"/>
+                <conditional name="regionStartLength">
+                    <param name="regionStartLength_select" type="select" label="Set distance up- and downstream of the given regions">
+                        <option value="no" selected="true">no</option>
+                        <option value="yes">yes</option>
+                    </param>
+                    <when value="no" />
+                    <when value="yes">
+                        <param name="beforeRegionStartLength" type="integer" value="1000" min="1"
+                            label="Distance upstream of the start site of the regions defined in the region file"
+                            help="If the regions are genes, this would be the distance upstream of the transcription start site. (--beforeRegionStartLength)"/>
+                        <param name="afterRegionStartLength" type="integer" value="1000" min="1"
+                            label="Distance downstream of the end site of the given regions"
+                            help="If the regions are genes, this would be the distance downstream of the transcription end site. (--afterRegionStartLength)"/>
+                    </when>
+                </conditional>
+            </when>
+            <when value="reference-point">
+                <param name="referencePoint" type="select" label="The reference point for the plotting">
+                    <option value="TSS" selected="true">beginning of region (e.g. TSS)</option>
+                    <option	 value="TES">end of region (e.g. TES)</option>
+                    <option value="center">center of region</option>
+                </param>
+                <param name="nanAfterEnd" type="boolean" truevalue="--nanAfterEnd" falsevalue=""
+                    label="Discard any values after the region end"
+                    help="This is useful to visualize the region end when not using the scale-regions mode and when the reference-point is set to the TSS. (--nanAfterEnd)"/>
+                <param name="beforeRegionStartLength" type="integer" value="1000" min="1"
+                    label="Distance upstream of the start site of the regions defined in the region file"
+                    help="If the regions are genes, this would be the distance upstream of the transcription start site. (--beforeRegionStartLength)"/>
+                <param name="afterRegionStartLength" type="integer" value="1000" min="1"
+                    label="Distance downstream of the end site of the given regions"
+                    help="If the regions are genes, this would be the distance downstream of the transcription end site. (--afterRegionStartLength)"/>
+            </when>
+        </conditional>
+
+        <expand macro="input_graphic_output_settings">
+            <expand macro="input_save_matrix_values" />
+        </expand>
+
+        <conditional name="advancedOpt" >
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="binSize" type="integer" value="10" min="1"
+                    label="Length, in base pairs, of the non-overlapping bin for averaging the score over the regions length"
+                    help="(--binSize)"/>
+                <param name="sortRegions" type="select" label="Sort regions"
+                    help="Whether the output file should present the regions sorted.">
+                    <option value="no" selected="true">no ordering</option>
+                    <option value="descend">descending order</option>
+                    <option value="ascend">ascending order</option>
+                </param>
+
+                <param name="sortUsing" type="select" label="Method used for sorting"
+                    help="The value is computed for each row. (--sortUsing)" >
+                    <option value="mean" selected="true">mean</option>
+                    <option value="median">median</option>
+                    <option value="min">min</option>
+                    <option value="max">max</option>
+                    <option value="sum">sum</option>
+                    <option value="region_length">region length</option>
+                </param>
+
+                <param name="averageTypeBins" type="select"
+                    label="Define the type of statistic that should be displayed."
+                    help="The value is computed for each bin. (--averageTypeBins)">
+                    <option value="mean" selected="true">mean</option>
+                    <option value="median">median</option>
+                    <option value="min">min</option>
+                    <option value="max">max</option>
+                    <option value="sum">sum</option>
+                    <option value="std">std</option>
+                </param>
+
+                <param name="missingDataAsZero" type="boolean" truevalue="--missingDataAsZero" falsevalue=""
+                    label="Indicate missing data as zero"
+                    help="Set to &quot;yes&quot;, if missing data should be indicated as zeros. Default is to ignore such cases which will be depicted as black areas in the heatmap. (see &quot;Missing data color&quot; options of the heatmapper for additional options). (--missingDataAsZero)"/>
+                <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue=""
+                    label="Skip zeros"
+                    help="Whether regions with only scores of zero should be included or not. Default is to include them. (--skipZeros)"/>
+                <param name="minThreshold" type="float" optional="True"
+                    label="Minimum threshold"
+                    help="Any region containing a value that is equal or less than this numeric value will be skipped. This is useful to skip, for example, genes where the read count is zero for any of the bins. This could be the result of unmappable areas and can bias the overall results. (--minThreshold)"/>
+                <param name="maxThreshold" type="float" optional="True"
+                    label="Maximum threshold"
+                    help="Any region containing a value that is equal or higher that this numeric value will be skipped. The max threshold is useful to skip those few regions with very high read counts (e.g. major satellites) that may bias the average values. (--maxThreshold)"/>
+                <param name="scale" type="float" optional="True" label="Scaling factor"
+                    help="If set, all values are multiplied by this number. (--scale)"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data format="bgzip" name="outFileName" label="${tool.name} on ${on_string}: Matrix" />
+        <expand macro="output_graphic_outputs" />
+        <expand macro="output_save_matrix_values" />
+    </outputs>
+    <!--
+    computeMatrix -S test.bw -R test2.bed -a 100 -b 100 -bs 1 
+    -->
+    <tests>
+        <test>
+            <param name="regionsFile" value="computeMatrix1.bed" ftype="bed" />
+            <param name="scoreFile" value="bamCoverage_result4.bw" ftype="bigwig" />
+            <param name="showAdvancedOpt" value="yes" />
+            <param name="mode_select" value="reference-point" />
+            <param name="binSize" value="10" />
+            <param name="sortUsing" value="sum" />
+            <param name="averageTypeBins" value="sum" />
+            <param name="missingDataAsZero" value="True" />
+            <param name="beforeRegionStartLength" value="10" />
+            <param name="afterRegionStartLength" value="10" />
+            <output name="outFileName" file="computeMatrix_result1.gz" ftype="bgzip" compare="sim_size" />
+        </test>
+        <test>
+            <param name="regionsFile" value="computeMatrix2.bed" ftype="bed" />
+            <param name="scoreFile" value="computeMatrix2.bw" ftype="bigwig" />
+            <param name="showAdvancedOpt" value="yes" />
+            <param name="mode_select" value="reference-point" />
+            <param name="binSize" value="10" />
+            <param name="beforeRegionStartLength" value="10" />
+            <param name="afterRegionStartLength" value="10" />
+            <output name="outFileName" file="computeMatrix_result2.gz" ftype="bgzip" compare="sim_size" />
+        </test>
+    </tests>
+  <help>
+<![CDATA[
+**What it does**
+
+This tool prepares an intermediary file (a gzipped table of values)
+that contains scores associated with genomic regions that can be used
+afterwards to plot a heatmap or a profile.
+
+Genomic regions can really be anything - genes, parts of genes, ChIP-seq
+peaks, favorite genome regions... as long as you provide a proper file
+in BED or INTERVAL format. If you would like to compare different groups of regions
+(i.e. genes from chromosome 2 and 3), you can supply more than 1 BED file, one for each group.
+
+computeMatrix can also be used to filter and sort
+regions according to their score by making use of its advanced output options.
+
+
+.. image:: $PATH_TO_IMAGES/flowChart_computeMatrixetc.png
+   :alt: Relationship between computeMatrix, heatmapper and profiler
+
+
+You can find more details on the computeMatrix wiki page: https://github.com/fidelram/deepTools/wiki/Visualizations#wiki-computeMatrix
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/correctGCBias.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,76 @@
+<tool id="deeptools_correctGCBias" name="correctGCBias" version="@WRAPPER_VERSION@.0">
+    <description>uses the output from computeGCBias to generate corrected BAM files</description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">correctGCBias</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        ln -s $bamInput local_bamInput.bam;
+        ln -s $bamInput.metadata.bam_index local_bamInput.bam.bai;
+
+        correctGCBias
+            @THREADS@
+            --bamfile local_bamInput.bam
+            --GCbiasFrequenciesFile $GCbiasFrequenciesFile
+
+            @reference_genome_source@
+
+            #if $effectiveGenomeSize.effectiveGenomeSize_opt == "specific":
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize
+            #else:
+                --effectiveGenomeSize $effectiveGenomeSize.effectiveGenomeSize_opt
+            #end if
+
+            #if str($region).strip() != '':
+                --region '$region'
+            #end if
+            --correctedFile $outFileName
+]]>
+    </command>
+    <inputs>
+        <param name="GCbiasFrequenciesFile" type="data" format="tabular" label="Output of computeGCBias" />
+        <param name="bamInput" format="bam" type="data"
+            label="BAM file" help="This should be same file that was used for computeGCbias. The BAM file must be sorted."/>
+        <expand macro="reference_genome_source" />
+        <expand macro="effectiveGenomeSize" />
+        <expand macro="region_limit_operation" />
+    </inputs>
+    <outputs>
+        <data format="bam" name="outFileName" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="GCbiasFrequenciesFile" value="computeGCBias_result1.tabular" ftype="tabular" />
+            <param name="bamInput" value="phiX.bam" ftype="bam" />
+            <param name="ref_source" value="history" />
+            <param name="input1" value="phiX.2bit" />
+            <param name="effectiveGenomeSize_opt" value="specific" />
+            <param name="effectiveGenomeSize" value="5386" />
+            <output name="outFileName" file="correctGCBias_result1.bam" ftype="bam" compare="sim_size" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool requires the output from computeGCBias to correct a given BAM file according to the method proposed by
+Benjamini and Speed (2012) Nucleic Acids Res.
+The resulting BAM file can be used in any downstream analyses, but be aware that you should not filter out duplicates from here on.
+
+You can find more details on the correctGCBias wiki page: https://github.com/fidelram/deepTools/wiki/QC#wiki-correctGCbias
+
+
+**Output files**:
+
+- GC-normalized BAM file
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deepTools_macros.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,480 @@
+<macros>
+    <xml name="bamCorrelate_mode_actions">
+
+        <expand macro="region_limit_operation" />
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <expand macro="doNotExtendPairedEnds" />
+                <expand macro="ignoreDuplicates" />
+                <expand macro="minMappingQuality" />
+                <param name="includeZeros" type="boolean" truevalue="--includeZeros" falsevalue=""
+                    label="Include zeros"
+                    help="If set, then regions with zero counts for *all* BAM files given are included. The default behavior is to ignore those cases. (--includeZeros)" />
+                <param name="zMin" type="integer" value="" optional="true" label="Minimum value for the heatmap intensities"
+                    help="If not specified the value is set automatically. (--zMin)"/>
+                <param name="zMax" type="integer" value="" optional="true" label="Maximum value for the heatmap intensities"
+                    help="If not specified the value is set automatically. (--zMax)"/>
+                <expand macro="colormap" />
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="region_limit_operation">
+        <param name="region" type="text" value=""
+            label="Region of the genome to limit the operation to"
+            help="This is useful when testing parameters to reduce the computing time. The format is chr:start:end, for example &quot;chr10&quot; or &quot;chr10:456700:891000&quot;. (--region)" />
+    </xml>
+    <token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token>
+    <token name="@WRAPPER_VERSION@">1.5.9.1</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="binary">@BINARY@</requirement>
+            <requirement type="package" >samtools</requirement>
+            <requirement type="package" >deepTools</requirement>
+            <requirement type="package" >ucsc_tools</requirement>
+            <requirement type="package" version="2.7">python</requirement>
+            <requirement type="package" version="1.5.9.1">deepTools</requirement>
+            <requirement type="package" version="0.1">ucsc_tools</requirement>
+            <requirement type="package" version="1.9">numpy</requirement>
+            <requirement type="package" version="0.8.1">pysam</requirement>
+            <requirement type="package" version="0.14">scipy</requirement>
+            <requirement type="package" version="1.4">matplotlib</requirement>
+            <requirement type="package" version="0.1.19">samtools</requirement>
+            <requirement type="package" version="0.7.2">bx-python</requirement>
+            <yield />
+        </requirements>
+        <version_command>@BINARY@ --version</version_command>
+    </xml>
+
+    <xml name="kmeans_clustering">
+        <conditional name="used_multiple_regions">
+            <param name="used_multiple_regions_options" type="select" 
+                label="Did you compute the matrix with more than one groups of regions?"
+                help="Would you like to cluster the regions according to the similarity of the signal distribution? This is only possible if you used computeMatrix on only one group of regions.">
+                <option value="yes">Yes, I used multiple groups of regions</option>
+                <option value="no">No, I used only one region.</option>
+            </param>
+            <when value="no">
+                <conditional name="clustering">
+                    <param name="clustering_options" type="select" label="Clustering algorithm">
+                        <option value="none">No clustering</option>
+                        <option value="kmeans">Kmeans clustering</option>
+                    </param>
+                    <when value="kmeans">
+                        <param name="k_kmeans" type="integer" value="0" label="Number of clusters to compute" 
+                            help="When this option is set, then the matrix is split into clusters using the kmeans algorithm. Only works for data that is not grouped, otherwise only the first group will be clustered. If more specific clustering methods are required it is advisable to save the underlying matrix and run the clustering using other software. The plotting of the clustering may fail (Error: Segmentation fault) if a cluster has very few members compared to the total number or regions. (default: None)."/>
+                    </when>
+                    <when value="none" />
+                </conditional>
+            </when>
+            <when value="yes" />
+        </conditional>
+    </xml>
+
+    <token name="@KMEANS_CLUSTERING@">
+        #if $advancedOpt.used_multiple_regions.used_multiple_regions_options == 'no':
+            #if $advancedOpt.used_multiple_regions.clustering.clustering_options == 'kmeans':
+                #if int($advancedOpt.used_multiple_regions.clustering.k_kmeans) > 0:
+                    --kmeans $advancedOpt.used_multiple_regions.clustering.k_kmeans
+                #end if
+            #end if
+        #end if
+    </token>
+
+    <xml name="doNotExtendPairedEnds">
+        <param name="doNotExtendPairedEnds" type="boolean" truevalue="--doNotExtendPairedEnds" falsevalue=""
+            label="Do not extend paired ends"
+            help="If set, reads are not extended to match the fragment length reported in the BAM file, instead they will be extended to match the fragment length. Default is to extend the reads if paired end information is available. (--doNotExtendPairedEnds)"/>
+    </xml>
+
+    <xml name="ignoreDuplicates">
+        <param name="ignoreDuplicates" type="boolean" truevalue="--ignoreDuplicates" falsevalue=""
+            label="Ignore duplicates"
+            help="If set, reads that have the same orientation and start position will be considered only once. If reads are paired, the mate position also has to coincide to ignore a read. (--ignoreDuplicates)" />
+    </xml>
+
+    <xml name="minMappingQuality">
+        <param name="minMappingQuality" type="integer" optional="true" value="1" min="1"
+            label="Minimum mapping quality"
+            help= "If set, only reads that have a mapping quality score higher than the given value are considered. *Note* Bowtie's Mapping quality is related to uniqueness: the higher the score, the more unique is a read. A mapping quality defined by Bowtie of 10 or less indicates that there is at least a 1 in 10 chance that the read truly originated elsewhere. (--minMappingQuality)"/>
+    </xml>
+
+    <xml name="skipZeros">
+        <param name="skipZeros" type="boolean" truevalue="--skipZeros" falsevalue=""
+            label ="Skip zeros"
+            help  ="If set, then zero counts that happen for *all* BAM files given are ignored. This might have the effect that fewer regions are considered than indicated in the option where the number of samples is defined. (--skipZeros)" />
+    </xml>
+
+    <xml name="fragmentLength">
+        <param name="fragmentLength" type="integer" value="300" min="1"
+            label="Fragment length used for the sequencing"
+            help ="If paired-end reads are used, the fragment length is computed from the BAM file. (--fragmentLength)"/>
+    </xml>
+
+    <xml name="scaleFactor">
+        <param name="scaleFactor1" type="float" value="1" label="Scale factor for treatment" help="(--scaleFactors)"/>
+        <param name="scaleFactor2" type="float" value="1" label="Scale factor for input" help="(--scaleFactors)"/>
+    </xml>
+
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1:" />
+            <exit_code range=":-1" />
+            <regex match="Error:" />
+            <regex match="Exception:" />
+            <regex match="EXception:" />
+            <regex match="Traceback" />
+        </stdio>
+    </xml>
+
+    <xml name="pseudocount">
+        <param name="pseudocount" type="float" value="1" label="Pseudocount" help="Small number to avoid dividing by zero."/>
+    </xml>
+
+    <token name="@REFERENCES@">
+
+.. class:: infomark
+
+For more information on the tools, please visit our `help site`_.
+
+If you would like to give us feedback or you run into any trouble, please send an email to deeptools@googlegroups.com
+
+This tool is developed by the `Bioinformatics and Deep-Sequencing Unit`_ at the `Max Planck Institute for Immunobiology and Epigenetics`_.
+
+.. _Bioinformatics and Deep-Sequencing Unit: http://www3.ie-freiburg.mpg.de/facilities/research-facilities/bioinformatics-and-deep-sequencing-unit/
+.. _Max Planck Institute for Immunobiology and Epigenetics: http://www3.ie-freiburg.mpg.de
+.. _help site: https://github.com/fidelram/deepTools/wiki/
+
+**References**
+
+If you use this Galaxy tool in work leading to a scientific publication please
+cite the following paper:
+
+    </token>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/nar/gku365</citation>
+            <yield />
+        </citations>
+    </xml>
+
+    <xml name="multiple_input_bams">
+        <repeat name="input_files" title="BAM files" min="2">
+            <param name="bamfile" type="data" format="bam" 
+                label="Bam file" 
+                help="The BAM file must be sorted."/>
+            <param name="label" type="text" size="30" optional="true" value=""
+                label="Label"
+                help="Label to use in the output. If not given the dataset name will be used instead."/>
+          </repeat>
+    </xml>
+
+    <token name="@multiple_input_bams@">
+        #import tempfile
+        #set $temp_dir = os.path.abspath(tempfile.mkdtemp())
+        #set files=[]
+        #set labels=[]
+        #for $i in $input_files:
+            #set $temp_input_handle = tempfile.NamedTemporaryFile( dir=$temp_dir )
+            #set $temp_input_path = $temp_input_handle.name
+            #silent $temp_input_handle.close()
+            #silent os.system("ln -s %s %s.bam" % (str($i.bamfile), $temp_input_path))
+            #silent os.system("ln -s %s %s.bam.bai" % (str($i.bamfile.metadata.bam_index), $temp_input_path))
+            #silent $files.append('%s.bam' % $temp_input_path)
+
+            ##set $files += [str($i.bamfile)]
+            #if str($i.label.value) != "":
+                #set $labels += ["\"%s\"" % ($i.label.value)]
+            #else
+                #set $labels += ["\"%s\"" % ($i.bamfile.name)]
+            #end if
+        #end for
+    </token>
+
+    <xml name="reference_genome_source">
+        <conditional name="source">
+            <param name="ref_source" type="select" label="Reference genome">
+                <option value="cached">locally cached</option>
+                <option value="history">in your history</option>
+            </param>
+            <when value="cached">
+                <param name="input1_2bit" type="select" label="Using reference genome" help="If your genome of interest is not listed, contact the Galaxy team">
+                    <options from_data_table="deepTools_seqs">
+                        <filter type="sort_by" column="1" />
+                        <validator type="no_options" message="No indexes are available." />
+                    </options>
+                </param>
+            </when>
+            <when value="history">
+                <param name="input1" type="data" format="twobit" label="Select a reference dataset in 2bit format" />
+            </when>
+        </conditional>
+    </xml>
+
+    <token name="@reference_genome_source@">
+    #if $source.ref_source=="history":
+        --genome $source.input1
+    #else:
+        --genome "${source.input1_2bit.fields.path}"
+    #end if
+    </token>
+
+    <xml name="effectiveGenomeSize">
+        <conditional name="effectiveGenomeSize">
+            <param name="effectiveGenomeSize_opt" type="select" label="Effective genome size"
+                help="The effective genome size is the portion of the genome that is mappable. Large fractions of the genome are stretches of NNNN that should be discarded. 
+                    Also, if repetitive regions were not included in the mapping of reads, the effective genome size needs to be adjusted accordingly. 
+                    See Table 2 of http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0030377 or http://www.nature.com/nbt/journal/v27/n1/fig_tab/nbt.1518_T1.html for several effective genome sizes.">
+                <option value="93260000">ce10 (93260000)</option>
+                <option value="121400000">dm3 (121400000)</option>
+                <option value="2451960000" selected="true">hg19 (2451960000)</option>
+                <option value="2150570000">mm9 (2150570000)</option>
+                <option value="specific">user specified</option>
+            </param>
+            <when value="specific">
+                <param name="effectiveGenomeSize" type="integer" value="" label="Effective genome size" help="e.g. ce10: 93260000, dm3: 121400000, hg19: 2451960000, mm9: 2150570000"/>
+            </when>
+            <when value="2150570000" />
+            <when value="2451960000" />
+            <when value="121400000" />
+            <when value="93260000" />
+        </conditional>
+    </xml>
+
+    <xml name="image_file_format">
+        <param name="outFileFormat" type="select" label="Image file format">
+            <option value="png" selected="true">png</option>
+            <option value="pdf">pdf</option>
+            <option value="svg">svg</option>
+            <option value="eps">eps</option>
+            <option value="emf">emf</option>
+        </param>
+    </xml>
+
+    <xml name="missingDataAsZero">
+                <param name="missingDataAsZero" type="boolean" truevalue="yes" falsevalue="no" checked="True"
+                    label ="Treat missing data as zero"
+                    help  ="This parameter determines if missing data should be treated as zeros. If unchecked, missing data will be ignored and not included in the output file. Missing data is defined as those regions for which both BAM files have 0 reads." />
+    </xml>
+
+    <xml name="input_save_matrix_values">
+        <param name="saveMatrix" type="boolean" label="Save the matrix of values underlying the heatmap"/>
+    </xml>
+
+    <xml name="input_graphic_output_settings">
+        <conditional name="output" >
+            <param name="showOutputSettings" type="select" label="Show advanced output settings" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <yield />
+                <param name="saveData" type="boolean" label="Save the data underlying the average profile"/>
+                <param name="saveSortedRegions" type="boolean" label="Save the regions after skipping zeros or min/max threshold values" help="The order of the regions in the file follows the sorting order selected. This is useful, for example, to generate other heatmaps keeping the sorting of the first heatmap."/>
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="input_image_file_format">
+        <param name="outFileFormat" type="select" label="Image file format">
+            <option value="png" selected="true">png</option>
+            <option value="pdf">pdf</option>
+            <option value="svg">svg</option>
+            <option value="eps">eps</option>
+            <option value="emf">emf</option>
+        </param>
+    </xml>
+
+    <xml name="output_image_file_format">
+        <data format="png" name="outFileName" label="${tool.name} image">
+            <change_format>
+                <when input="output.outFileFormat" value="pdf" format="pdf" />
+                <when input="output.outFileFormat" value="svg" format="svg" />
+                <when input="output.outFileFormat" value="eps" format="eps" />
+                <when input="output.outFileFormat" value="emf" format="emf" />
+            </change_format>
+        </data>
+    </xml>
+
+    <xml name="output_save_matrix_values">
+        <data format="tabular" name="outFileNameMatrix" label="${tool.name} on ${on_string}: Heatmap values">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveMatrix'] is True
+            ))
+            </filter>
+        </data>
+    </xml>
+
+    <xml name="output_graphic_outputs">
+        <data format="tabular" name="outFileNameData" label="${tool.name} on ${on_string}: averages per matrix column">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveData'] is True
+            ))
+            </filter>
+        </data>
+        <data format="bed" name="outFileSortedRegions" label="${tool.name} on ${on_string}: sorted/filtered regions">
+            <filter>
+            ((
+                output['showOutputSettings'] == 'yes' and 
+                output['saveSortedRegions'] is True
+            ))
+            </filter>
+        </data>
+    </xml>
+
+    <xml name="colormap">
+        <param name="colorMap" type="select" label="Color map to use for the heatmap" help=" Available color map names can be found here: http://www.astro.lsa.umich.edu/~msshin/science/code/matplotlib_cm/">
+            <option value="RdYlBu" selected="true">RdYlBu</option>
+            <option value="Accent">Accent</option>
+            <option value="Spectral">Spectral</option>
+            <option value="Set1">Set1</option>
+            <option value="Set2">Set2</option>
+            <option value="Set3">Set3</option>
+            <option value="Dark2">Dark2</option>
+            <option value="Reds">Reds</option>
+            <option value="Oranges">Oranges</option>
+            <option value="Greens">Greens</option>
+            <option value="Blues">Blues</option>
+            <option value="Greys">Greys</option>
+            <option value="Purples">Purples</option>
+            <option value="Paired">Paired</option>
+            <option value="Pastel1">Pastel1</option>
+            <option value="Pastel2">Pastel2</option>
+            <option value="spring">spring</option>
+            <option value="summer">summer</option>
+            <option value="autumn">autumn</option>
+            <option value="winter">winter</option>
+            <option value="hot">hot</option>
+            <option value="coolwarm">coolwarm</option>
+            <option value="cool">cool</option>
+            <option value="seismic">seismic</option>
+            <option value="terrain">terrain</option>
+            <option value="ocean">ocean</option>
+            <option value="rainbow">rainbow</option>
+            <option value="bone">bone</option>
+            <option value="flag">flag</option>
+            <option value="prism">prism</option>
+            <option value="cubehelix">cubehelix</option>
+            <option value="binary">binary</option>
+            <option value="pink">pink</option>
+            <option value="gray">gray</option>
+            <option value="copper">copper</option>
+            <option value="BrBG">BrBG</option>
+            <option value="BuGn">BuGn</option>
+            <option value="BuPu">BuPu</option>
+            <option value="GnBu">GnBu</option>
+            <option value="OrRd">OrRd</option>
+            <option value="PiYG">PiYG</option>
+            <option value="PRGn">PRGn</option>
+            <option value="PuOr">PuOr</option>
+            <option value="PuRd">PuRd</option>
+            <option value="PuBu">PuBu</option>
+            <option value="RdBu">RdBu</option>
+            <option value="RdGy">RdGy</option>
+            <option value="RdPu">RdPu</option>
+            <option value="YlGn">YlGn</option>
+            <option value="PuBuGn">PuBuGn</option>
+            <option value="RdYlGn">RdYlGn</option>
+            <option value="YlGnBu">YlGnBu</option>
+            <option value="YlOrBr">YlOrBr</option>
+            <option value="YlOrRd">YlOrRd</option>
+            <option value="gist_gray">gist_gray</option>
+            <option value="gist_stern">gist_stern</option>
+            <option value="gist_earth">gist_earth</option>
+            <option value="gist_yarg">gist_yarg</option>
+            <option value="gist_ncar">gist_ncar</option>
+            <option value="gist_rainbow">gist_rainbow</option>
+            <option value="gist_heat">gist_heat</option>
+            <option value="gnuplot">gnuplot</option>
+            <option value="gnuplot2">gnuplot2</option>
+            <option value="CMRmap">CMRmap</option>
+            <option value="bwr">bwr</option>
+            <option value="hsv">hsv</option>
+            <option value="brg">brg</option>
+            <option value="jet">jet</option>
+            <option value="afmhot">afmhot</option>
+            <option value="Accent_r">Accent reversed</option>
+            <option value="Spectral_r">Spectral reversed</option>
+            <option value="Set1_r">Set1 reversed</option>
+            <option value="Set2_r">Set2 reversed</option>
+            <option value="Set3_r">Set3 reversed</option>
+            <option value="Dark2_r">Dark2 reversed</option>
+            <option value="Reds_r">Reds reversed</option>
+            <option value="Oranges_r">Oranges reversed</option>
+            <option value="Greens_r">Greens reversed</option>
+            <option value="Blues_r">Blues reversed</option>
+            <option value="Greys_r">Greys reversed</option>
+            <option value="Purples_r">Purples reversed</option>
+            <option value="Paired_r">Paired reversed</option>
+            <option value="Pastel1_r">Pastel1 reversed</option>
+            <option value="Pastel2_r">Pastel2 reversed</option>
+            <option value="spring_r">spring reversed</option>
+            <option value="summer_r">summer reversed</option>
+            <option value="autumn_r">autumn reversed</option>
+            <option value="winter_r">winter reversed</option>
+            <option value="hot_r">hot reversed</option>
+            <option value="coolwarm_r">coolwarm reversed</option>
+            <option value="cool_r">cool reversed</option>
+            <option value="seismic_r">seismic reversed</option>
+            <option value="terrain_r">terrain reversed</option>
+            <option value="ocean_r">ocean reversed</option>
+            <option value="rainbow_r">rainbow reversed</option>
+            <option value="bone_r">bone reversed</option>
+            <option value="flag_r">flag reversed</option>
+            <option value="prism_r">prism reversed</option>
+            <option value="cubehelix_r">cubehelix reversed</option>
+            <option value="binary_r">binary reversed</option>
+            <option value="pink_r">pink reversed</option>
+            <option value="gray_r">gray reversed</option>
+            <option value="copper_r">copper reversed</option>
+            <option value="BrBG_r">BrBG reversed</option>
+            <option value="BuGn_r">BuGn reversed</option>
+            <option value="BuPu_r">BuPu reversed</option>
+            <option value="GnBu_r">GnBu reversed</option>
+            <option value="OrRd_r">OrRd reversed</option>
+            <option value="PiYG_r">PiYG reversed</option>
+            <option value="PRGn_r">PRGn reversed</option>
+            <option value="PuOr_r">PuOr reversed</option>
+            <option value="PuRd_r">PuRd reversed</option>
+            <option value="PuBu_r">PuBu reversed</option>
+            <option value="RdBu_r">RdBu reversed</option>
+            <option value="RdGy_r">RdGy reversed</option>
+            <option value="RdPu_r">RdPu reversed</option>
+            <option value="YlGn_r">YlGn reversed</option>
+            <option value="PuBuGn_r">PuBuGn reversed</option>
+            <option value="RdYlBu_r">RdYlBu reversed</option>
+            <option value="RdYlGn_r">RdYlGn reversed</option>
+            <option value="YlGnBu_r">YlGnBu reversed</option>
+            <option value="YlOrBr_r">YlOrBr reversed</option>
+            <option value="YlOrRd_r">YlOrRd reversed</option>
+            <option value="gist_gray_r">gist_gray reversed</option>
+            <option value="gist_stern_r">gist_stern reversed</option>
+            <option value="gist_earth_r">gist_earth reversed</option>
+            <option value="gist_yarg_r">gist_yarg reversed</option>
+            <option value="gist_ncar_r">gist_ncar reversed</option>
+            <option value="gist_rainbow_r">gist_rainbow reversed</option>
+            <option value="gist_heat_r">gist_heat reversed</option>
+            <option value="gnuplot_r">gnuplot reversed</option>
+            <option value="gnuplot2_r">gnuplot2 reversed</option>
+            <option value="CMRmap_r">CMRmap reversed</option>
+            <option value="bwr_r">bwr reversed</option>
+            <option value="hsv_r">hsv reversed</option>
+            <option value="brg_r">brg reversed</option>
+            <option value="jet_r">jet reversed</option>
+            <option value="afmhot_r">afmhot reversed</option>
+        </param>
+
+    </xml>
+
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/heatmapper.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,228 @@
+<tool id="deeptools_heatmapper" name="heatmapper" version="@WRAPPER_VERSION@.0">
+    <description>creates a heatmap for a score associated to genomic regions</description>
+    <expand macro="requirements"/>
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">heatmapper</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        heatmapper
+
+        --matrixFile $matrixFile
+        --outFileName $outFileName
+
+        #if $output.showOutputSettings == "yes"
+            --plotFileFormat $output.outFileFormat
+            #if $outFileNameData:
+                --outFileNameData '$outFileNameData'
+            #end if
+
+            #if $outFileNameMatrix:
+                --outFileNameMatrix '$outFileNameMatrix'
+            #end if
+
+            #if $outFileSortedRegions:
+                --outFileSortedRegions '$outFileSortedRegions'
+            #end if
+        #else
+            --plotFileFormat 'png'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes"
+            #if $advancedOpt.sortRegions:
+                --sortRegions '$advancedOpt.sortRegions'
+            #end if
+      
+            #if $advancedOpt.sortUsing:
+                --sortUsing '$advancedOpt.sortUsing'
+            #end if
+
+            #if $advancedOpt.averageTypeSummaryPlot:
+                --averageTypeSummaryPlot '$advancedOpt.averageTypeSummaryPlot'
+            #end if
+
+            #if str($advancedOpt.missingDataColor.value) != "None":
+                --missingDataColor '$advancedOpt.missingDataColor'
+            #end if
+
+            --colorMap '$advancedOpt.colorMap'
+
+            #if str($advancedOpt.zMin).strip() != "":
+                --zMin $advancedOpt.zMin
+            #end if
+            #if $advancedOpt.zMax:
+                --zMax $advancedOpt.zMax
+            #end if
+
+            #if str($advancedOpt.yMin).strip() != "":
+                --yMin $advancedOpt.yMin
+            #end if
+            #if $advancedOpt.yMax:
+                --yMax $advancedOpt.yMax
+            #end if
+
+            --xAxisLabel '$advancedOpt.xAxisLabel'
+            --yAxisLabel '$advancedOpt.yAxisLabel'
+
+            --heatmapWidth $advancedOpt.heatmapWidth
+            --heatmapHeight $advancedOpt.heatmapHeight
+
+            --whatToShow '$advancedOpt.whatToShow'
+
+            --startLabel '$advancedOpt.startLabel' 
+            --endLabel '$advancedOpt.endLabel'
+            --refPointLabel '$advancedOpt.referencePointLabel'
+            --regionsLabel '$advancedOpt.regionsLabel'
+
+            #if str($advancedOpt.plotTitle.value) != "None":
+                --plotTitle '$advancedOpt.plotTitle'
+            #end if
+
+            $advancedOpt.onePlotPerGroup
+
+            @KMEANS_CLUSTERING@
+
+        #end if
+]]>
+    </command>
+    <inputs>
+        <param name="matrixFile" format="bgzip" type="data" label="Matrix file from the computeMatrix tool"/>
+
+        <expand macro="input_graphic_output_settings">
+            <expand macro="input_image_file_format" />
+            <expand macro="input_save_matrix_values" />
+        </expand>
+
+        <conditional name="advancedOpt" >
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="sortRegions" type="select" label="Sort regions"
+                    help="Whether the heatmap should present the regions sorted. The default is to sort in descending order based on the mean value per region.">
+                    <option value="no">no ordering</option>
+                    <option value="descend" selected="true">descending order</option>
+                    <option value="ascend">ascending order</option>
+                </param>
+
+                <param name="sortUsing" type="select" label="Method used for sorting" help="For each row the method is computed." >
+                    <option value="mean" selected="true">mean</option>
+                    <option value="median">median</option>
+                    <option value="min">min</option>
+                    <option value="max">max</option>
+                    <option value="sum">sum</option>
+                    <option value="region_length">region length</option>
+                </param>
+
+                <param name="averageTypeSummaryPlot" type="select" label="Type of statistic that should be plotted in the summary image above the heatmap">
+                    <option value="mean" selected="true">mean</option>
+                    <option value="median">median</option>
+                    <option value="min">min</option>
+                    <option value="max">max</option>
+                    <option value="sum">sum</option>
+                    <option value="std">std</option>
+                </param>
+
+                <param name="missingDataColor" type="text" value="black" optional="true" label="Missing data color" 
+                    help="If 'Represent missing data as zero' is not set, such cases will be colored in black by default. By using this parameter a different color can be set. A value between 0 and 1 will be used for a gray scale (black is 0). Also color names can be used, see a list here: http://packages.python.org/ete2/reference/reference_svgcolors.html. Alternatively colors can be specified using the #rrggbb notation." />
+
+                <expand macro="colormap" />
+
+                <param name="zMin" type="float" value="" size="3"
+                    label="Minimum value for the heatmap intensities. Leave empty for automatic values"/>
+                <param name="zMax" type="float" value="" size="3"
+                    label="Maximum value for the heatmap intensities. Leave empty for automatic values"/>
+                <param name="yMin" type="float" value="" size="3"
+                    label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values"/>
+                <param name="yMax" type="float" value="" size="3"
+                    label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values"/>
+                <param name="xAxisLabel" type="text" value="distance from TSS (bp)" size="200"
+                    label="Description for the x-axis label" />
+                <param name="yAxisLabel" type="text" value="genes" size="30"
+                    label="Description for the y-axis label for the top panel" />
+
+                <param name="heatmapWidth" type="float" value="7.5" min="1" max="100"
+                    label="Heatmap width in cm" help="The minimum value is 1 and the maximum is 100."/>
+                <param name="heatmapHeight" type="float" value="25" min="3" max="100"
+                    label="Heatmap height in cm" help="The minimum value is 3 and the maximum is 100."/>
+
+                <param name="whatToShow" type="select" label="What to show"
+                    help ="The default is to include a summary or profile plot on top of the heatmap and a heatmap colorbar.">
+                    <option value="plot, heatmap and colorbar" selected="true">summary plot, heatmap and colorbar</option>
+                    <option value="plot and heatmap">summary plot and heatmap (no colorbar)</option>
+                    <option value="heatmap only">heatmap only</option>
+                    <option value="heatmap and colorbar">heatmap and colorbar</option>
+                    <option value="colorbar only">colorbar only</option>
+                </param>
+
+                <param name="startLabel" type="text" value="TSS" size="10"
+                    label="Label for the region start"
+                    help ="[only for scale-regions mode] Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. &quot;peak start&quot;." />
+                <param name="endLabel" type="text" value="TES" size="10"
+                    label="Label for the region end"
+                    help="[only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site)."/>
+
+                <param name="referencePointLabel" type="text" value="TSS" size="10"
+                    label="Reference point label"
+                    help ="[only for scale-regions mode] Label shown in the plot for the reference-point. Default is the same as the reference point selected (e.g. TSS), but could be anything, e.g. &quot;peak start&quot; etc." />
+                <param name="regionsLabel" type="text" value="genes" size="30" 
+                    label="Labels for the regions plotted in the heatmap" 
+                    help="If more than one region is being plotted a list of labels separated by comma and limited by quotes, is required. For example, label1, label2.">
+                    <sanitizer>
+                        <valid initial="string.printable">
+                        </valid>
+                    </sanitizer>
+                </param>
+                <param name="plotTitle" type="text" value="" size="30"
+                    label="Title of the plot" help="Title of the plot, to be printed on top of the generated image. Leave blank for no title. (--plotTitle)" />
+                <param name="onePlotPerGroup" type="boolean" truevalue="--onePlotPerGroup" falsevalue="" 
+                    label="Do one plot per group" 
+                    help="When computeMatrix was used on more than one group of genes, the average plots for all the groups will be drawn in one panel by default. If this option is set, each group will get its own plot, stacked on top of each other."/>
+
+                <expand macro="kmeans_clustering" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <expand macro="output_graphic_outputs" />
+        <expand macro="output_save_matrix_values" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="matrixFile" value="computeMatrix_result1.gz" ftype="bgzip" />
+            <output name="outFileName" file="heatmapper_result1.png" ftype="png" compare="sim_size" delta="100" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+The heatmapper visualizes scores associated with genomic regions, for example ChIP enrichment values around the TSS of genes.
+Like profiler, it requires that computeMatrix was run first to calculate the values.
+ 
+We implemented vast optional parameters to optimize the visual output and we encourage you to play around with the min/max values displayed in the heatmap as well as 
+with the different coloring options. The most powerful option is the k-means clustering where you simply need to indicate the number of 
+groups with similar read distributions that you expect and the algorithm will do the sorting for you.
+
+Do check the examples on our help page with step-by-step protocols: https://github.com/fidelram/deepTools/wiki/Example-workflows
+
+
+.. image:: $PATH_TO_IMAGES/visual_hm_DmelPolII.png
+   :alt: Heatmap of RNA Polymerase II ChIP-seq
+
+
+You can find more details on the tool itself on the heatmapper wiki page: https://github.com/fidelram/deepTools/wiki/Visualizations#wiki-heatmapper
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/plotCorrelation.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,197 @@
+<tool id="deeptools_plotCorrelation" name="plotCorrelation" version="@WRAPPER_VERSION@.0">
+    <description>creates a heatmap for a score associated to genomic regions</description>
+    <expand macro="requirements"/>
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">heatmapper</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        heatmapper
+
+        --matrixFile $matrixFile
+        --outFileName $outFileName
+
+        #if $output.showOutputSettings == "yes"
+            --plotFileFormat $output.outFileFormat
+            #if $outFileNameData:
+                --outFileNameData '$outFileNameData'
+            #end if
+
+            #if $outFileNameMatrix:
+                --outFileNameMatrix '$outFileNameMatrix'
+            #end if
+
+            #if $outFileSortedRegions:
+                --outFileSortedRegions '$outFileSortedRegions'
+            #end if
+        #else
+            --plotFileFormat 'png'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes"
+            #if $advancedOpt.sortRegions:
+                --sortRegions '$advancedOpt.sortRegions'
+            #end if
+      
+            #if $advancedOpt.sortUsing:
+                --sortUsing '$advancedOpt.sortUsing'
+            #end if
+
+            #if $advancedOpt.averageTypeSummaryPlot:
+                --averageTypeSummaryPlot '$advancedOpt.averageTypeSummaryPlot'
+            #end if
+
+            #if str($advancedOpt.missingDataColor.value) != "None":
+                --missingDataColor '$advancedOpt.missingDataColor'
+            #end if
+
+            --colorMap '$advancedOpt.colorMap'
+
+            #if str($advancedOpt.zMin).strip() != "":
+                --zMin $advancedOpt.zMin
+            #end if
+            #if $advancedOpt.zMax:
+                --zMax $advancedOpt.zMax
+            #end if
+
+            #if str($advancedOpt.yMin).strip() != "":
+                --yMin $advancedOpt.yMin
+            #end if
+            #if $advancedOpt.yMax:
+                --yMax $advancedOpt.yMax
+            #end if
+
+            --xAxisLabel '$advancedOpt.xAxisLabel'
+            --yAxisLabel '$advancedOpt.yAxisLabel'
+
+            --heatmapWidth $advancedOpt.heatmapWidth
+            --heatmapHeight $advancedOpt.heatmapHeight
+
+            --whatToShow '$advancedOpt.whatToShow'
+
+            --startLabel '$advancedOpt.startLabel' 
+            --endLabel '$advancedOpt.endLabel'
+            --refPointLabel '$advancedOpt.referencePointLabel'
+            --regionsLabel '$advancedOpt.regionsLabel'
+
+            #if str($advancedOpt.plotTitle.value) != "None":
+                --plotTitle '$advancedOpt.plotTitle'
+            #end if
+
+            $advancedOpt.onePlotPerGroup
+
+            @KMEANS_CLUSTERING@
+
+        #end if
+]]>
+    </command>
+    <inputs>
+        <param name="corData" format="bgzip" type="data" label="Matrix file from the computeMatrix tool"/>
+
+        <expand macro="input_graphic_output_settings">
+            <expand macro="input_image_file_format" />
+            <expand macro="input_save_matrix_values" />
+        </expand>
+
+        <conditional name="advancedOpt" >
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+
+                <expand macro="colormap" />
+
+                <param name="zMin" type="float" value="" size="3"
+                    label="Minimum value for the heatmap intensities. Leave empty for automatic values"/>
+                <param name="zMax" type="float" value="" size="3"
+                    label="Maximum value for the heatmap intensities. Leave empty for automatic values"/>
+
+                <param name="plotNumbers" type="boolean" truevalue="--plotNumbers" falsevalue="" 
+                    label="Plot the correlation value" 
+                    help="If set, then the correlation number is plotted on top of the heatmap. (--plotNumbers)"/>
+
+
+
+
+                <param name="yMin" type="float" value="" size="3"
+                    label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values"/>
+                <param name="yMax" type="float" value="" size="3"
+                    label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values"/>
+                <param name="xAxisLabel" type="text" value="distance from TSS (bp)" size="200"
+                    label="Description for the x-axis label" />
+                <param name="yAxisLabel" type="text" value="genes" size="30"
+                    label="Description for the y-axis label for the top panel" />
+
+                <param name="heatmapWidth" type="float" value="7.5" min="1" max="100"
+                    label="Heatmap width in cm" help="The minimum value is 1 and the maximum is 100."/>
+                <param name="heatmapHeight" type="float" value="25" min="3" max="100"
+                    label="Heatmap height in cm" help="The minimum value is 3 and the maximum is 100."/>
+
+                <param name="whatToShow" type="select" label="What to show"
+                    help ="The default is to include a summary or profile plot on top of the heatmap and a heatmap colorbar.">
+                    <option value="plot, heatmap and colorbar" selected="true">summary plot, heatmap and colorbar</option>
+                    <option value="plot and heatmap">summary plot and heatmap (no colorbar)</option>
+                    <option value="heatmap only">heatmap only</option>
+                    <option value="heatmap and colorbar">heatmap and colorbar</option>
+                    <option value="colorbar only">colorbar only</option>
+                </param>
+
+                <param name="startLabel" type="text" value="TSS" size="10"
+                    label="Label for the region start"
+                    help ="[only for scale-regions mode] Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. &quot;peak start&quot;." />
+                <param name="endLabel" type="text" value="TES" size="10"
+                    label="Label for the region end"
+                    help="[only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site)."/>
+
+                <param name="referencePointLabel" type="text" value="TSS" size="10"
+                    label="Reference point label"
+                    help ="[only for scale-regions mode] Label shown in the plot for the reference-point. Default is the same as the reference point selected (e.g. TSS), but could be anything, e.g. &quot;peak start&quot; etc." />
+                <param name="regionsLabel" type="text" value="genes" size="30" 
+                    label="Labels for the regions plotted in the heatmap" 
+                    help="If more than one region is being plotted a list of labels separated by comma and limited by quotes, is required. For example, label1, label2.">
+                    <sanitizer>
+                        <valid initial="string.printable">
+                        </valid>
+                    </sanitizer>
+                </param>
+                <param name="plotTitle" type="text" value="" size="30"
+                    label="Title of the plot" help="Title of the plot, to be printed on top of the generated image. Leave blank for no title. (--plotTitle)" />
+                <param name="onePlotPerGroup" type="boolean" truevalue="--onePlotPerGroup" falsevalue="" 
+                    label="Do one plot per group" 
+                    help="When computeMatrix was used on more than one group of genes, the average plots for all the groups will be drawn in one panel by default. If this option is set, each group will get its own plot, stacked on top of each other."/>
+
+                <expand macro="kmeans_clustering" />
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <expand macro="output_graphic_outputs" />
+        <expand macro="output_save_matrix_values" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="matrixFile" value="computeMatrix_result1.gz" ftype="bgzip" />
+            <output name="outFileName" file="heatmapper_result1.png" ftype="png" compare="sim_size" delta="100" />
+        </test>
+    </tests>
+    <help>
+<![CDATA[
+**What it does**
+
+Tool for visualizing a correlation using either bamCorrelate or
+bigwigCorrelate. Pearson or Spearman methods are available to compute correlation
+coefficients. Results can be saved into a heat map image or as multiple
+scatter plots. Further output files are optional.
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiler.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,183 @@
+<tool id="deeptools_profiler" name="profiler" version="@WRAPPER_VERSION@.0">
+    <description>
+        creates a profile plot for a score associated to genomic regions
+    </description>
+    <expand macro="requirements" />
+    <expand macro="stdio" />
+    <macros>
+        <token name="@BINARY@">profiler</token>
+        <import>deepTools_macros.xml</import>
+    </macros>
+    <command>
+<![CDATA[
+        profiler
+
+        --matrixFile $matrixFile
+        --outFileName $outFileName
+
+        #if $output.showOutputSettings == "yes"
+            --plotFileFormat $output.outFileFormat
+
+            #if $output.saveData:
+                --outFileNameData '$outFileNameData' 
+            #end if
+
+            #if $output.saveSortedRegions:
+                --outFileSortedRegions '$outFileSortedRegions'
+            #end if
+        #else
+            --plotFileFormat 'png'
+        #end if
+
+        #if $scaleRegions.showScaleRegionsOpt == "yes":
+            --startLabel '$scaleRegions.startLabel'
+            --endLabel '$scaleRegions.endLabel'
+        #end if
+
+        #if $advancedOpt.showAdvancedOpt == "yes":
+            #if $advancedOpt.averageType:
+                --averageType '$advancedOpt.averageType'
+            #end if
+            --plotHeight $advancedOpt.plotHeight
+            --plotWidth $advancedOpt.plotWidth
+            --plotType $advancedOpt.plotType
+
+            --regionsLabel '$advancedOpt.regionsLabel'
+
+            #if str($advancedOpt.plotTitle).strip() != "":
+                --plotTitle '$advancedOpt.plotTitle'
+            #end if
+
+            #if str($advancedOpt.colors).strip() != "":
+                --colors #echo ' '.join( ["'%s'" % $color for $color in $advancedOpt.colors.split()] )#
+            #end if
+
+            $advancedOpt.onePlotPerGroup
+
+            #if $advancedOpt.yMin:
+                --yMin $advancedOpt.yMin
+            #end if
+            #if $advancedOpt.yMax:
+                --yMax $advancedOpt.yMax
+            #end if
+
+            --xAxisLabel '$advancedOpt.xAxisLabel'
+            #if str($advancedOpt.yAxisLabel.value) != "None":
+                --yAxisLabel '$advancedOpt.yAxisLabel'
+            #end if
+
+            @KMEANS_CLUSTERING@
+
+        #end if
+]]>
+    </command>
+    <inputs>
+        <param name="matrixFile" format="bgzip" type="data" label="Matrix file from the computeMatrix tool"/>
+        <conditional name="scaleRegions">
+            <param name="showScaleRegionsOpt" type="select" label="The input matrix was computed in scale-regions mode">
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="startLabel" type="text" value="TSS" size="10"
+                    label="Label for the region start"
+                    help ="[only for scale-regions mode] Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. &quot;peak start&quot;." />
+                <param name="endLabel" type="text" value="TES" size="10"
+                    label="Label for the region end"
+                    help="[only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site)."/>
+            </when>
+        </conditional>
+
+        <expand macro="input_graphic_output_settings">
+            <expand macro="input_image_file_format" />
+        </expand>
+
+        <conditional name="advancedOpt">
+            <param name="showAdvancedOpt" type="select" label="Show advanced options" >
+                <option value="no" selected="true">no</option>
+                <option value="yes">yes</option>
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="averageType" type="select" label="Define the type of statistic that should be used for the profile.">
+                    <option value="mean" selected="true">mean</option>
+                    <option value="median">median</option>
+                    <option value="min">min</option>
+                    <option value="max">max</option>
+                    <option value="sum">sum</option>
+                    <option value="std">std</option>
+                </param>
+                <param name="plotHeight" type="integer" value="5" min="3" 
+                    label="Plot height" 
+                    help="Height in cm. The default for the plot height is 5 centimeters. The minimum value is 3 cm." />
+                <param name="plotWidth" type="integer" value="8" min="1" 
+                    label="Plot width" 
+                    help="Width in cm. The default value is 8 centimeters. The minimum value is 1 cm." />
+                <param name="plotType" type="select" label="Plot type"
+                    help="For the summary plot (profile) only. The &quot;lines&quot; option will plot the profile line based on the average type selected. The &quot;fill&quot; option fills the region between zero and the profile curve. The fill in color is semi transparent to distinguish different profiles. The &quot;add standard error&quot; option colors the region between the profile and the standard error of the data. As in the case of fill, a semi-transparent color is used. The option &quot;overlapped_lines&quot; plots each region values, one on top of the other; this option only works if &quot;one plot per proup&quot; is set.">
+                    <option value="lines" selected="true">lines</option>
+                    <option value="fill">fill</option>
+                    <option value="se">add standard error</option>
+                    <option value="overlapped_lines">overlapped lines</option>
+                </param>
+                <param name="regionsLabel" type="text" value="genes" size="30"
+                    label="Labels for the regions plotted in the heatmap"
+                    help="If more than one region is being plotted a list of labels separated by comma and limited by quotes, is required. For example, &quot;label1, label2&quot;."/>
+                <param name="plotTitle" type="text" value="" size="30"
+                    label="Title of the plot"
+                    help="Title of the plot, to be printed on top of the generated image. Leave blank for no title." />
+                <param name="colors" type="text" value="" size="40"
+                    label="List of colors to use for the plotted lines"
+                    help="Color names and html hex strings (e.g. #eeff22) are accepted. The color names should be given separated by spaces. (--colors red blue green)">
+                    <validator type="expression"
+                        message="Only numbers, digits, '#' and spaces are allowed.">all(c in ' #abcdefghijklmnopqrstuvwxyz0123456789' for c in value)</validator>
+                </param>
+
+                <param name="onePlotPerGroup" type="boolean" truevalue="--onePlotPerGroup" falsevalue=""
+                    label="Do one plot per group"
+                    help="When the region file contains groups separated by &quot;#&quot;, the default is to plot the averages for the distinct plots in one plot. If this option is set, each group will get its own plot, stacked on top of each other."/>
+                <param name="yMin" type="float" value="" size="3" optional="true"
+                    label="Minimum value for the Y-axis of the summary plot. Leave empty for automatic values"/>
+                <param name="yMax" type="float" value="" size="3" optional="true"
+                    label="Maximum value for Y-axis of the summary plot. Leave empty for automatic values" />
+                <param name="xAxisLabel" type="text" value="gene distance (bp)" size="50"
+                    label="Description for the x-axis label" />
+                <param name="yAxisLabel" type="text" value="" size="50"
+                    label="Description for the y-axis label for the top panel" />
+
+                <expand macro="kmeans_clustering" />
+
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <expand macro="output_image_file_format" />
+        <expand macro="output_graphic_outputs" />
+    </outputs>
+    <help>
+<![CDATA[
+**What it does**
+
+This tool plots the average enrichments over all genomic
+regions supplied to computeMarix. It requires that computeMatrix was successfully run.
+It is a very useful complement to the heatmapper, especially in cases when you want to
+compare the scores for many different groups. Like heatmapper, profiler does not change the
+values that were compute by computeMatrix, but you can choose between
+many different ways to color and display the plots.
+
+
+.. image:: $PATH_TO_IMAGES/visual_profiler_DmelPolII.png
+   :alt: Meta-gene profile of Rna Polymerase II
+
+
+You can find more details on the profiler wiki page: https://github.com/fidelram/deepTools/wiki/Visualizations#wiki-profiler
+
+
+-----
+
+@REFERENCES@
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/readme.rst	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,74 @@
+========================
+Galaxy deeptools wrapper
+========================
+
+deepTools are user-friendly tools for the normalization and visualization of 
+deep-sequencing data.
+They address the challenge of visualizing the large amounts of data that are now
+routinely generated from sequencing centers in a meaningful way. 
+To do so, deepTools contain useful routines to process the mapped reads data 
+through removal of duplicates and different filtering options to create coverage
+files in standard bedGraph and bigWig file formats. deepTools allow the creation
+of normalized coverage files or the comparison between two files 
+(for example, treatment and control). Finally, using such normalized and 
+standardized files, multiple visualizations can be created to identify 
+enrichments with functional annotations of the genome. 
+For a gallery of images that can be produced and a description 
+of the tools see our poster_.
+
+.. _poster: http://f1000.com/posters/browse/summary/1094053
+
+deeptools is developed under here:
+
+    https://github.com/fidelram/deepTools
+
+For support, questions, or feature requests contact: deeptools@googlegroups.com
+
+
+============
+Installation
+============
+
+Requirements: python-2.7
+
+Galaxy should be able to automatically install all other dependencies, such as numpy or scipy.
+
+For the best performance we recommend to install blas/lapack/atlas in your environment before
+installing deepTools from the Tool Shed.
+
+
+========
+Citation
+========
+
+deeptools are currently under review. In the meantime please refere to https://github.com/fidelram/deepTools.
+
+
+=======
+History
+=======
+
+ * v1.0:        Initial public release
+ * v1.5.8.2:    Include new citation tag, update version to 1.5.8.2 and change wrapper version
+
+
+Licence (MIT)
+=============
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
Binary file static/images/QC_GCplots_input.png has changed
Binary file static/images/QC_bamCorrelate_humanSamples.png has changed
Binary file static/images/QC_fingerprint.png has changed
Binary file static/images/flowChart_computeMatrixetc.png has changed
Binary file static/images/norm_IGVsnapshot_indFiles.png has changed
Binary file static/images/visual_hm_DmelPolII.png has changed
Binary file static/images/visual_profiler_DmelPolII.png has changed
Binary file test-data/1.bigwig has changed
Binary file test-data/_1.bigwig has changed
Binary file test-data/_2.bigwig has changed
Binary file test-data/_3.bigwig has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamCompare_result1.bg	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,1 @@
+chrM	0	16569	1.0
Binary file test-data/bamCorrelate_result1.png has changed
Binary file test-data/bamCoverage_result1.bw has changed
Binary file test-data/bamCoverage_result2.bw has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamCoverage_result3.bg	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,12 @@
+chrM	0	210	8173200.00
+chrM	210	220	7999302.13
+chrM	220	230	7129812.77
+chrM	230	240	5564731.91
+chrM	240	250	4173548.94
+chrM	250	260	2434570.21
+chrM	260	300	1912876.60
+chrM	300	16310	1738978.72
+chrM	16310	16320	1565080.85
+chrM	16320	16330	869489.36
+chrM	16330	16340	695591.49
+chrM	16340	16350	347795.74
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamCoverage_result4.bg	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,456 @@
+phiX174	0	10	3742.31
+phiX174	10	20	18711.54
+phiX174	20	70	63619.23
+phiX174	70	90	82330.77
+phiX174	90	100	101042.31
+phiX174	100	120	104784.62
+phiX174	120	140	119753.85
+phiX174	140	160	138465.38
+phiX174	160	170	153434.62
+phiX174	170	180	183373.08
+phiX174	180	200	202084.62
+phiX174	200	210	205826.92
+phiX174	210	220	224538.46
+phiX174	220	230	265703.85
+phiX174	230	240	295642.31
+phiX174	240	250	303126.92
+phiX174	250	260	318096.15
+phiX174	260	270	366746.15
+phiX174	270	280	404169.23
+phiX174	280	290	419138.46
+phiX174	290	310	437850.00
+phiX174	310	320	456561.54
+phiX174	320	330	479015.38
+phiX174	330	350	497726.92
+phiX174	350	360	505211.54
+phiX174	360	370	508953.85
+phiX174	370	380	523923.08
+phiX174	380	400	550119.23
+phiX174	400	410	553861.54
+phiX174	410	420	550119.23
+phiX174	420	430	565088.46
+phiX174	430	440	583800.00
+phiX174	440	450	595026.92
+phiX174	450	460	609996.15
+phiX174	460	480	643676.92
+phiX174	480	490	658646.15
+phiX174	490	500	669873.08
+phiX174	500	510	673615.38
+phiX174	510	520	669873.08
+phiX174	520	530	684842.31
+phiX174	530	540	677357.69
+phiX174	540	550	707296.15
+phiX174	550	560	684842.31
+phiX174	560	570	711038.46
+phiX174	570	580	707296.15
+phiX174	580	600	699811.54
+phiX174	600	610	673615.38
+phiX174	610	620	722265.38
+phiX174	620	630	740976.92
+phiX174	630	640	722265.38
+phiX174	640	660	718523.08
+phiX174	660	670	711038.46
+phiX174	670	680	692326.92
+phiX174	680	690	733492.31
+phiX174	690	700	752203.85
+phiX174	700	710	737234.62
+phiX174	710	720	740976.92
+phiX174	720	730	759688.46
+phiX174	730	740	748461.54
+phiX174	740	750	759688.46
+phiX174	750	760	733492.31
+phiX174	760	770	714780.77
+phiX174	770	800	755946.15
+phiX174	800	810	744719.23
+phiX174	810	820	740976.92
+phiX174	820	830	726007.69
+phiX174	830	850	711038.46
+phiX174	850	860	729750.00
+phiX174	860	870	733492.31
+phiX174	870	880	722265.38
+phiX174	880	890	740976.92
+phiX174	890	900	748461.54
+phiX174	900	910	767173.08
+phiX174	910	920	759688.46
+phiX174	920	930	774657.69
+phiX174	930	940	770915.38
+phiX174	940	960	744719.23
+phiX174	960	970	714780.77
+phiX174	970	980	684842.31
+phiX174	980	990	692326.92
+phiX174	990	1000	677357.69
+phiX174	1000	1010	681100.00
+phiX174	1010	1020	722265.38
+phiX174	1020	1030	699811.54
+phiX174	1030	1040	744719.23
+phiX174	1040	1050	759688.46
+phiX174	1050	1060	763430.77
+phiX174	1060	1080	793369.23
+phiX174	1080	1100	785884.62
+phiX174	1100	1110	770915.38
+phiX174	1110	1130	767173.08
+phiX174	1130	1140	763430.77
+phiX174	1140	1160	797111.54
+phiX174	1160	1170	793369.23
+phiX174	1170	1190	804596.15
+phiX174	1190	1200	789626.92
+phiX174	1200	1210	782142.31
+phiX174	1210	1220	812080.77
+phiX174	1220	1230	797111.54
+phiX174	1230	1240	778400.00
+phiX174	1240	1250	748461.54
+phiX174	1250	1260	740976.92
+phiX174	1260	1270	759688.46
+phiX174	1270	1280	748461.54
+phiX174	1280	1290	763430.77
+phiX174	1290	1300	755946.15
+phiX174	1300	1310	737234.62
+phiX174	1310	1320	767173.08
+phiX174	1320	1330	755946.15
+phiX174	1330	1340	770915.38
+phiX174	1340	1350	778400.00
+phiX174	1350	1360	789626.92
+phiX174	1360	1370	812080.77
+phiX174	1370	1380	819565.38
+phiX174	1380	1390	778400.00
+phiX174	1390	1400	740976.92
+phiX174	1400	1410	770915.38
+phiX174	1410	1430	778400.00
+phiX174	1430	1440	793369.23
+phiX174	1440	1450	808338.46
+phiX174	1450	1460	830792.31
+phiX174	1460	1470	819565.38
+phiX174	1470	1480	804596.15
+phiX174	1480	1490	800853.85
+phiX174	1490	1500	785884.62
+phiX174	1500	1510	770915.38
+phiX174	1510	1520	759688.46
+phiX174	1520	1530	755946.15
+phiX174	1530	1540	770915.38
+phiX174	1540	1550	755946.15
+phiX174	1550	1560	778400.00
+phiX174	1560	1580	782142.31
+phiX174	1580	1590	718523.08
+phiX174	1590	1600	692326.92
+phiX174	1600	1620	651161.54
+phiX174	1620	1630	647419.23
+phiX174	1630	1640	684842.31
+phiX174	1640	1650	688584.62
+phiX174	1650	1660	692326.92
+phiX174	1660	1670	699811.54
+phiX174	1670	1680	714780.77
+phiX174	1680	1690	696069.23
+phiX174	1690	1710	707296.15
+phiX174	1710	1720	733492.31
+phiX174	1720	1730	740976.92
+phiX174	1730	1740	744719.23
+phiX174	1740	1750	729750.00
+phiX174	1750	1760	703553.85
+phiX174	1760	1770	696069.23
+phiX174	1770	1780	677357.69
+phiX174	1780	1790	666130.77
+phiX174	1790	1800	669873.08
+phiX174	1800	1810	677357.69
+phiX174	1810	1820	658646.15
+phiX174	1820	1830	707296.15
+phiX174	1830	1840	800853.85
+phiX174	1840	1850	819565.38
+phiX174	1850	1860	812080.77
+phiX174	1860	1870	830792.31
+phiX174	1870	1890	827050.00
+phiX174	1890	1900	830792.31
+phiX174	1900	1910	823307.69
+phiX174	1910	1920	812080.77
+phiX174	1920	1930	856988.46
+phiX174	1930	1940	875700.00
+phiX174	1940	1950	838276.92
+phiX174	1950	1960	853246.15
+phiX174	1960	1970	860730.77
+phiX174	1970	1980	886926.92
+phiX174	1980	2000	856988.46
+phiX174	2000	2010	886926.92
+phiX174	2010	2020	871957.69
+phiX174	2020	2030	875700.00
+phiX174	2030	2040	879442.31
+phiX174	2040	2050	883184.62
+phiX174	2050	2060	808338.46
+phiX174	2060	2070	804596.15
+phiX174	2070	2080	785884.62
+phiX174	2080	2090	819565.38
+phiX174	2090	2100	815823.08
+phiX174	2100	2110	819565.38
+phiX174	2110	2120	782142.31
+phiX174	2120	2130	800853.85
+phiX174	2130	2140	785884.62
+phiX174	2140	2160	770915.38
+phiX174	2160	2170	755946.15
+phiX174	2170	2180	737234.62
+phiX174	2180	2190	729750.00
+phiX174	2190	2200	711038.46
+phiX174	2200	2210	722265.38
+phiX174	2210	2220	718523.08
+phiX174	2220	2230	763430.77
+phiX174	2230	2250	770915.38
+phiX174	2250	2260	774657.69
+phiX174	2260	2280	744719.23
+phiX174	2280	2290	748461.54
+phiX174	2290	2300	752203.85
+phiX174	2300	2310	812080.77
+phiX174	2310	2320	842019.23
+phiX174	2320	2330	860730.77
+phiX174	2330	2340	845761.54
+phiX174	2340	2350	853246.15
+phiX174	2350	2360	849503.85
+phiX174	2360	2370	871957.69
+phiX174	2370	2380	860730.77
+phiX174	2380	2390	842019.23
+phiX174	2390	2400	860730.77
+phiX174	2400	2410	815823.08
+phiX174	2410	2420	819565.38
+phiX174	2420	2440	789626.92
+phiX174	2440	2450	785884.62
+phiX174	2450	2460	853246.15
+phiX174	2460	2470	883184.62
+phiX174	2470	2510	928092.31
+phiX174	2510	2520	871957.69
+phiX174	2520	2530	886926.92
+phiX174	2530	2540	916865.38
+phiX174	2540	2560	879442.31
+phiX174	2560	2570	875700.00
+phiX174	2570	2580	916865.38
+phiX174	2580	2590	924350.00
+phiX174	2590	2600	928092.31
+phiX174	2600	2610	909380.77
+phiX174	2610	2620	905638.46
+phiX174	2620	2630	901896.15
+phiX174	2630	2640	946803.85
+phiX174	2640	2650	935576.92
+phiX174	2650	2660	939319.23
+phiX174	2660	2670	943061.54
+phiX174	2670	2680	961773.08
+phiX174	2680	2690	943061.54
+phiX174	2690	2700	928092.31
+phiX174	2700	2710	920607.69
+phiX174	2710	2720	950546.15
+phiX174	2720	2730	969257.69
+phiX174	2730	2740	984226.92
+phiX174	2740	2760	1025392.31
+phiX174	2760	2770	999196.15
+phiX174	2770	2780	987969.23
+phiX174	2780	2790	1006680.77
+phiX174	2790	2810	991711.54
+phiX174	2810	2820	961773.08
+phiX174	2820	2830	931834.62
+phiX174	2830	2840	939319.23
+phiX174	2840	2850	909380.77
+phiX174	2850	2860	894411.54
+phiX174	2860	2870	909380.77
+phiX174	2870	2880	928092.31
+phiX174	2880	2890	913123.08
+phiX174	2890	2900	886926.92
+phiX174	2900	2910	894411.54
+phiX174	2910	2920	868215.38
+phiX174	2920	2930	853246.15
+phiX174	2930	2940	815823.08
+phiX174	2940	2950	864473.08
+phiX174	2950	2960	860730.77
+phiX174	2960	2970	864473.08
+phiX174	2970	2980	875700.00
+phiX174	2980	2990	856988.46
+phiX174	2990	3000	871957.69
+phiX174	3000	3010	901896.15
+phiX174	3010	3020	871957.69
+phiX174	3020	3030	883184.62
+phiX174	3030	3040	864473.08
+phiX174	3040	3050	834534.62
+phiX174	3050	3060	879442.31
+phiX174	3060	3070	890669.23
+phiX174	3070	3090	886926.92
+phiX174	3090	3100	871957.69
+phiX174	3100	3110	916865.38
+phiX174	3110	3120	901896.15
+phiX174	3120	3140	886926.92
+phiX174	3140	3160	898153.85
+phiX174	3160	3170	909380.77
+phiX174	3170	3190	913123.08
+phiX174	3190	3200	898153.85
+phiX174	3200	3220	879442.31
+phiX174	3220	3230	868215.38
+phiX174	3230	3240	886926.92
+phiX174	3240	3250	864473.08
+phiX174	3250	3260	845761.54
+phiX174	3260	3270	875700.00
+phiX174	3270	3280	890669.23
+phiX174	3280	3290	879442.31
+phiX174	3290	3300	853246.15
+phiX174	3300	3310	871957.69
+phiX174	3310	3320	856988.46
+phiX174	3320	3330	901896.15
+phiX174	3330	3340	909380.77
+phiX174	3340	3350	920607.69
+phiX174	3350	3360	935576.92
+phiX174	3360	3370	920607.69
+phiX174	3370	3380	935576.92
+phiX174	3380	3390	950546.15
+phiX174	3390	3410	905638.46
+phiX174	3410	3430	894411.54
+phiX174	3430	3440	909380.77
+phiX174	3440	3460	946803.85
+phiX174	3460	3470	976742.31
+phiX174	3470	3480	946803.85
+phiX174	3480	3490	961773.08
+phiX174	3490	3500	1006680.77
+phiX174	3500	3510	999196.15
+phiX174	3510	3530	1032876.92
+phiX174	3530	3540	991711.54
+phiX174	3540	3550	1010423.08
+phiX174	3550	3560	980484.62
+phiX174	3560	3570	965515.38
+phiX174	3570	3580	939319.23
+phiX174	3580	3600	935576.92
+phiX174	3600	3610	946803.85
+phiX174	3610	3630	916865.38
+phiX174	3630	3640	886926.92
+phiX174	3640	3650	879442.31
+phiX174	3650	3670	894411.54
+phiX174	3670	3690	898153.85
+phiX174	3690	3700	856988.46
+phiX174	3700	3710	868215.38
+phiX174	3710	3720	864473.08
+phiX174	3720	3730	875700.00
+phiX174	3730	3750	856988.46
+phiX174	3750	3760	849503.85
+phiX174	3760	3780	834534.62
+phiX174	3780	3790	808338.46
+phiX174	3790	3800	755946.15
+phiX174	3800	3810	711038.46
+phiX174	3810	3820	707296.15
+phiX174	3820	3830	658646.15
+phiX174	3830	3840	677357.69
+phiX174	3840	3850	692326.92
+phiX174	3850	3860	718523.08
+phiX174	3860	3870	722265.38
+phiX174	3870	3890	707296.15
+phiX174	3890	3900	692326.92
+phiX174	3900	3910	666130.77
+phiX174	3910	3920	636192.31
+phiX174	3920	3930	602511.54
+phiX174	3930	3940	591284.62
+phiX174	3940	3960	606253.85
+phiX174	3960	3970	621223.08
+phiX174	3970	3980	636192.31
+phiX174	3980	3990	617480.77
+phiX174	3990	4020	632450.00
+phiX174	4020	4030	666130.77
+phiX174	4030	4040	669873.08
+phiX174	4040	4050	636192.31
+phiX174	4050	4070	606253.85
+phiX174	4070	4080	602511.54
+phiX174	4080	4090	621223.08
+phiX174	4090	4100	647419.23
+phiX174	4100	4110	632450.00
+phiX174	4110	4120	636192.31
+phiX174	4120	4130	606253.85
+phiX174	4130	4140	624965.38
+phiX174	4140	4160	636192.31
+phiX174	4160	4170	654903.85
+phiX174	4170	4180	636192.31
+phiX174	4180	4190	658646.15
+phiX174	4190	4200	669873.08
+phiX174	4200	4210	707296.15
+phiX174	4210	4230	692326.92
+phiX174	4230	4240	688584.62
+phiX174	4240	4250	726007.69
+phiX174	4250	4260	711038.46
+phiX174	4260	4270	740976.92
+phiX174	4270	4290	744719.23
+phiX174	4290	4310	752203.85
+phiX174	4310	4320	767173.08
+phiX174	4320	4330	770915.38
+phiX174	4330	4340	737234.62
+phiX174	4340	4350	703553.85
+phiX174	4350	4360	711038.46
+phiX174	4360	4380	714780.77
+phiX174	4380	4390	707296.15
+phiX174	4390	4400	673615.38
+phiX174	4400	4410	703553.85
+phiX174	4410	4430	748461.54
+phiX174	4430	4440	759688.46
+phiX174	4440	4450	774657.69
+phiX174	4450	4470	778400.00
+phiX174	4470	4480	759688.46
+phiX174	4480	4490	767173.08
+phiX174	4490	4500	759688.46
+phiX174	4500	4510	729750.00
+phiX174	4510	4520	707296.15
+phiX174	4520	4530	688584.62
+phiX174	4530	4540	692326.92
+phiX174	4540	4550	733492.31
+phiX174	4550	4560	711038.46
+phiX174	4560	4580	703553.85
+phiX174	4580	4590	669873.08
+phiX174	4590	4600	684842.31
+phiX174	4600	4610	707296.15
+phiX174	4610	4620	692326.92
+phiX174	4620	4630	737234.62
+phiX174	4630	4640	733492.31
+phiX174	4640	4650	778400.00
+phiX174	4650	4660	752203.85
+phiX174	4660	4670	748461.54
+phiX174	4670	4680	744719.23
+phiX174	4680	4690	729750.00
+phiX174	4690	4700	770915.38
+phiX174	4700	4710	744719.23
+phiX174	4710	4720	729750.00
+phiX174	4720	4730	733492.31
+phiX174	4730	4740	774657.69
+phiX174	4740	4750	804596.15
+phiX174	4750	4760	800853.85
+phiX174	4760	4770	815823.08
+phiX174	4770	4780	860730.77
+phiX174	4780	4810	868215.38
+phiX174	4810	4830	886926.92
+phiX174	4830	4840	905638.46
+phiX174	4840	4850	931834.62
+phiX174	4850	4860	939319.23
+phiX174	4860	4870	924350.00
+phiX174	4870	4880	905638.46
+phiX174	4880	4890	890669.23
+phiX174	4890	4900	860730.77
+phiX174	4900	4910	845761.54
+phiX174	4910	4930	830792.31
+phiX174	4930	4950	815823.08
+phiX174	4950	4960	789626.92
+phiX174	4960	4970	740976.92
+phiX174	4970	4980	726007.69
+phiX174	4980	4990	699811.54
+phiX174	4990	5000	703553.85
+phiX174	5000	5010	688584.62
+phiX174	5010	5030	669873.08
+phiX174	5030	5050	666130.77
+phiX174	5050	5060	621223.08
+phiX174	5060	5070	606253.85
+phiX174	5070	5080	572573.08
+phiX174	5080	5090	557603.85
+phiX174	5090	5100	542634.62
+phiX174	5100	5120	512696.15
+phiX174	5120	5130	493984.62
+phiX174	5130	5140	479015.38
+phiX174	5140	5150	475273.08
+phiX174	5150	5160	460303.85
+phiX174	5160	5180	426623.08
+phiX174	5180	5190	422880.77
+phiX174	5190	5200	407911.54
+phiX174	5200	5210	348034.62
+phiX174	5210	5220	303126.92
+phiX174	5220	5230	258219.23
+phiX174	5230	5240	243250.00
+phiX174	5240	5250	209569.23
+phiX174	5250	5260	164661.54
+phiX174	5260	5280	160919.23
+phiX174	5280	5290	130980.77
+phiX174	5290	5300	97300.00
+phiX174	5300	5310	78588.46
+phiX174	5310	5340	44907.69
+phiX174	5340	5350	29938.46
+phiX174	5350	5386	14969.2
Binary file test-data/bamCoverage_result4.bw has changed
Binary file test-data/bamFingerprint_result1.png has changed
Binary file test-data/bamPEFragmentSize_histogram_result1.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bamPEFragmentSize_result1.txt	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,9 @@
+Sample size: 3
+
+Min.: 241.0
+1st Qu.: 241.5
+Mean: 244.666666667
+Median: 242.0
+3rd Qu.: 246.5
+Max.: 251.0
+Std: 4.49691252108
Binary file test-data/bigwigCompare_result1.bw has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/bigwigCompare_result2.bg	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,5 @@
+chr21	0	10000000	1.0
+chr21	10000000	20000000	1.0
+chr21	20000000	30000000	1.0
+chr21	30000000	40000000	1.0
+chr21	40000000	48129895	1.0
Binary file test-data/bowtie2-test1.bam has changed
Binary file test-data/computeGCBias_result1.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/computeGCBias_result1.tabular	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,101 @@
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 1.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 2.900000000000000000e+01 1.000000000000000000e+00
+2.000000000000000000e+00 2.900000000000000000e+01 4.068965517241379004e+00
+1.000000000000000000e+00 5.900000000000000000e+01 1.000000000000000000e+00
+3.000000000000000000e+00 9.600000000000000000e+01 1.843750000000000000e+00
+2.000000000000000000e+00 1.570000000000000000e+02 7.515923566878981443e-01
+5.000000000000000000e+00 1.740000000000000000e+02 1.695402298850574585e+00
+5.000000000000000000e+00 2.340000000000000000e+02 1.260683760683760646e+00
+7.000000000000000000e+00 3.590000000000000000e+02 1.150417827298050089e+00
+4.000000000000000000e+00 3.690000000000000000e+02 6.395663956639566772e-01
+7.000000000000000000e+00 4.310000000000000000e+02 9.582366589327145912e-01
+8.000000000000000000e+00 4.820000000000000000e+02 9.792531120331949834e-01
+1.100000000000000000e+01 5.490000000000000000e+02 1.182149362477231236e+00
+8.000000000000000000e+00 5.220000000000000000e+02 9.042145593869731490e-01
+8.000000000000000000e+00 5.670000000000000000e+02 8.324514991181657386e-01
+2.000000000000000000e+00 3.760000000000000000e+02 3.138297872340425343e-01
+6.000000000000000000e+00 2.650000000000000000e+02 1.335849056603773510e+00
+1.000000000000000000e+00 1.840000000000000000e+02 3.206521739130434590e-01
+0.000000000000000000e+00 1.160000000000000000e+02 1.000000000000000000e+00
+4.000000000000000000e+00 8.400000000000000000e+01 2.809523809523809312e+00
+2.000000000000000000e+00 8.300000000000000000e+01 1.421686746987951944e+00
+3.000000000000000000e+00 6.600000000000000000e+01 2.681818181818182101e+00
+0.000000000000000000e+00 3.900000000000000000e+01 1.000000000000000000e+00
+0.000000000000000000e+00 1.600000000000000000e+01 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
+0.000000000000000000e+00 0.000000000000000000e+00 1.000000000000000000e+00
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/computeMatrix1.bed	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,8 @@
+phiX174	1000	1500	CG11023	0	+
+phiX174	150	1750	cda5	0	-
+phiX174	150	177	cda8	0	-
+phiX174	75	1500	cda9	0	+
+phiX174	101	175	C11023	0	+
+phiX174	125	150	ca5	0	-
+phiX174	450	1750	ca8	0	+
+phiX174	80	1500	cda9	0	+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/computeMatrix2.bed	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,6 @@
+ch1	100	150	CG11023	0	+
+ch2	150	175	cda5	0	-
+ch3	100	125	cda8	0	+
+ch1	75	125	C11023	0	+
+ch2	125	150	ca5	0	-
+ch3	75	100	ca8	0	+
Binary file test-data/computeMatrix2.bw has changed
Binary file test-data/computeMatrix_result1.gz has changed
Binary file test-data/computeMatrix_result2.gz has changed
Binary file test-data/phiX.2bit has changed
Binary file test-data/phiX.bam has changed
Binary file test-data/phiX.bam.bai has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/phiX.fasta	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,79 @@
+>phiX174
+GAGTTTTATCGCTTCCATGACGCAGAAGTTAACACTTTCGGATATTTCTGATGAGTCGAAAAATTATCTT
+GATAAAGCAGGAATTACTACTGCTTGTTTACGAATTAAATCGAAGTGGACTGCTGGCGGAAAATGAGAAA
+ATTCGACCTATCCTTGCGCAGCTCGAGAAGCTCTTACTTTGCGACCTTTCGCCATCAACTAACGATTCTG
+TCAAAAACTGACGCGTTGGATGAGGAGAAGTGGCTTAATATGCTTGGCACGTTCGTCAAGGACTGGTTTA
+GATATGAGTCACATTTTGTTCATGGTAGAGATTCTCTTGTTGACATTTTAAAAGAGCGTGGATTACTATC
+TGAGTCCGATGCTGTTCAACCACTAATAGGTAAGAAATCATGAGTCAAGTTACTGAACAATCCGTACGTT
+TCCAGACCGCTTTGGCCTCTATTAAGCTCATTCAGGCTTCTGCCGTTTTGGATTTAACCGAAGATGATTT
+CGATTTTCTGACGAGTAACAAAGTTTGGATTGCTACTGACCGCTCTCGTGCTCGTCGCTGCGTTGAGGCT
+TGCGTTTATGGTACGCTGGACTTTGTGGGATACCCTCGCTTTCCTGCTCCTGTTGAGTTTATTGCTGCCG
+TCATTGCTTATTATGTTCATCCCGTCAACATTCAAACGGCCTGTCTCATCATGGAAGGCGCTGAATTTAC
+GGAAAACATTATTAATGGCGTCGAGCGTCCGGTTAAAGCCGCTGAATTGTTCGCGTTTACCTTGCGTGTA
+CGCGCAGGAAACACTGACGTTCTTACTGACGCAGAAGAAAACGTGCGTCAAAAATTACGTGCAGAAGGAG
+TGATGTAATGTCTAAAGGTAAAAAACGTTCTGGCGCTCGCCCTGGTCGTCCGCAGCCGTTGCGAGGTACT
+AAAGGCAAGCGTAAAGGCGCTCGTCTTTGGTATGTAGGTGGTCAACAATTTTAATTGCAGGGGCTTCGGC
+CCCTTACTTGAGGATAAATTATGTCTAATATTCAAACTGGCGCCGAGCGTATGCCGCATGACCTTTCCCA
+TCTTGGCTTCCTTGCTGGTCAGATTGGTCGTCTTATTACCATTTCAACTACTCCGGTTATCGCTGGCGAC
+TCCTTCGAGATGGACGCCGTTGGCGCTCTCCGTCTTTCTCCATTGCGTCGTGGCCTTGCTATTGACTCTA
+CTGTAGACATTTTTACTTTTTATGTCCCTCATCGTCACGTTTATGGTGAACAGTGGATTAAGTTCATGAA
+GGATGGTGTTAATGCCACTCCTCTCCCGACTGTTAACACTACTGGTTATATTGACCATGCCGCTTTTCTT
+GGCACGATTAACCCTGATACCAATAAAATCCCTAAGCATTTGTTTCAGGGTTATTTGAATATCTATAACA
+ACTATTTTAAAGCGCCGTGGATGCCTGACCGTACCGAGGCTAACCCTAATGAGCTTAATCAAGATGATGC
+TCGTTATGGTTTCCGTTGCTGCCATCTCAAAAACATTTGGACTGCTCCGCTTCCTCCTGAGACTGAGCTT
+TCTCGCCAAATGACGACTTCTACCACATCTATTGACATTATGGGTCTGCAAGCTGCTTATGCTAATTTGC
+ATACTGACCAAGAACGTGATTACTTCATGCAGCGTTACCGTGATGTTATTTCTTCATTTGGAGGTAAAAC
+CTCTTATGACGCTGACAACCGTCCTTTACTTGTCATGCGCTCTAATCTCTGGGCATCTGGCTATGATGTT
+GATGGAACTGACCAAACGTCGTTAGGCCAGTTTTCTGGTCGTGTTCAACAGACCTATAAACATTCTGTGC
+CGCGTTTCTTTGTTCCTGAGCATGGCACTATGTTTACTCTTGCGCTTGTTCGTTTTCCGCCTACTGCGAC
+TAAAGAGATTCAGTACCTTAACGCTAAAGGTGCTTTGACTTATACCGATATTGCTGGCGACCCTGTTTTG
+TATGGCAACTTGCCGCCGCGTGAAATTTCTATGAAGGATGTTTTCCGTTCTGGTGATTCGTCTAAGAAGT
+TTAAGATTGCTGAGGGTCAGTGGTATCGTTATGCGCCTTCGTATGTTTCTCCTGCTTATCACCTTCTTGA
+AGGCTTCCCATTCATTCAGGAACCGCCTTCTGGTGATTTGCAAGAACGCGTACTTATTCGCCACCATGAT
+TATGACCAGTGTTTCCAGTCCGTTCAGTTGTTGCAGTGGAATAGTCAGGTTAAATTTAATGTGACCGTTT
+ATCGCAATCTGCCGACCACTCGCGATTCAATCATGACTTCGTGATAAAAGATTGAGTGTGAGGTTATAAC
+GCCGAAGCGGTAAAAATTTTAATTTTTGCCGCTGAGGGGTTGACCAAGCGAAGCGCGGTAGGTTTTCTGC
+TTAGGAGTTTAATCATGTTTCAGACTTTTATTTCTCGCCATAATTCAAACTTTTTTTCTGATAAGCTGGT
+TCTCACTTCTGTTACTCCAGCTTCTTCGGCACCTGTTTTACAGACACCTAAAGCTACATCGTCAACGTTA
+TATTTTGATAGTTTGACGGTTAATGCTGGTAATGGTGGTTTTCTTCATTGCATTCAGATGGATACATCTG
+TCAACGCCGCTAATCAGGTTGTTTCTGTTGGTGCTGATATTGCTTTTGATGCCGACCCTAAATTTTTTGC
+CTGTTTGGTTCGCTTTGAGTCTTCTTCGGTTCCGACTACCCTCCCGACTGCCTATGATGTTTATCCTTTG
+AATGGTCGCCATGATGGTGGTTATTATACCGTCAAGGACTGTGTGACTATTGACGTCCTTCCCCGTACGC
+CGGGCAATAATGTTTATGTTGGTTTCATGGTTTGGTCTAACTTTACCGCTACTAAATGCCGCGGATTGGT
+TTCGCTGAATCAGGTTATTAAAGAGATTATTTGTCTCCAGCCACTTAAGTGAGGTGATTTATGTTTGGTG
+CTATTGCTGGCGGTATTGCTTCTGCTCTTGCTGGTGGCGCCATGTCTAAATTGTTTGGAGGCGGTCAAAA
+AGCCGCCTCCGGTGGCATTCAAGGTGATGTGCTTGCTACCGATAACAATACTGTAGGCATGGGTGATGCT
+GGTATTAAATCTGCCATTCAAGGCTCTAATGTTCCTAACCCTGATGAGGCCGCCCCTAGTTTTGTTTCTG
+GTGCTATGGCTAAAGCTGGTAAAGGACTTCTTGAAGGTACGTTGCAGGCTGGCACTTCTGCCGTTTCTGA
+TAAGTTGCTTGATTTGGTTGGACTTGGTGGCAAGTCTGCCGCTGATAAAGGAAAGGATACTCGTGATTAT
+CTTGCTGCTGCATTTCCTGAGCTTAATGCTTGGGAGCGTGCTGGTGCTGATGCTTCCTCTGCTGGTATGG
+TTGACGCCGGATTTGAGAATCAAAAAGAGCTTACTAAAATGCAACTGGACAATCAGAAAGAGATTGCCGA
+GATGCAAAATGAGACTCAAAAAGAGATTGCTGGCATTCAGTCGGCGACTTCACGCCAGAATACGAAAGAC
+CAGGTATATGCACAAAATGAGATGCTTGCTTATCAACAGAAGGAGTCTACTGCTCGCGTTGCGTCTATTA
+TGGAAAACACCAATCTTTCCAAGCAACAGCAGGTTTCCGAGATTATGCGCCAAATGCTTACTCAAGCTCA
+AACGGCTGGTCAGTATTTTACCAATGACCAAATCAAAGAAATGACTCGCAAGGTTAGTGCTGAGGTTGAC
+TTAGTTCATCAGCAAACGCAGAATCAGCGGTATGGCTCTTCTCATATTGGCGCTACTGCAAAGGATATTT
+CTAATGTCGTCACTGATGCTGCTTCTGGTGTGGTTGATATTTTTCATGGTATTGATAAAGCTGTTGCCGA
+TACTTGGAACAATTTCTGGAAAGACGGTAAAGCTGATGGTATTGGCTCTAATTTGTCTAGGAAATAACCG
+TCAGGATTGACACCCTCCCAATTGTATGTTTTCATGCCTCCAAATCTTGGAGGCTTTTTTATGGTTCGTT
+CTTATTACCCTTCTGAATGTCACGCTGATTATTTTGACTTTGAGCGTATCGAGGCTCTTAAACCTGCTAT
+TGAGGCTTGTGGCATTTCTACTCTTTCTCAATCCCCAATGCTTGGCTTCCATAAGCAGATGGATAACCGC
+ATCAAGCTCTTGGAAGAGATTCTGTCTTTTCGTATGCAGGGCGTTGAGTTCGATAATGGTGATATGTATG
+TTGACGGCCATAAGGCTGCTTCTGACGTTCGTGATGAGTTTGTATCTGTTACTGAGAAGTTAATGGATGA
+ATTGGCACAATGCTACAATGTGCTCCCCCAACTTGATATTAATAACACTATAGACCACCGCCCCGAAGGG
+GACGAAAAATGGTTTTTAGAGAACGAGAAGACGGTTACGCAGTTTTGCCGCAAGCTGGCTGCTGAACGCC
+CTCTTAAGGATATTCGCGATGAGTATAATTACCCCAAAAAGAAAGGTATTAAGGATGAGTGTTCAAGATT
+GCTGGAGGCCTCCACTATGAAATCGCGTAGAGGCTTTACTATTCAGCGTTTGATGAATGCAATGCGACAG
+GCTCATGCTGATGGTTGGTTTATCGTTTTTGACACTCTCACGTTGGCTGACGACCGATTAGAGGCGTTTT
+ATGATAATCCCAATGCTTTGCGTGACTATTTTCGTGATATTGGTCGTATGGTTCTTGCTGCCGAGGGTCG
+CAAGGCTAATGATTCACACGCCGACTGCTATCAGTATTTTTGTGTGCCTGAGTATGGTACAGCTAATGGC
+CGTCTTCATTTCCATGCGGTGCATTTTATGCGGACACTTCCTACAGGTAGCGTTGACCCTAATTTTGGTC
+GTCGGGTACGCAATCGCCGCCAGTTAAATAGCTTGCAAAATACGTGGCCTTATGGTTACAGTATGCCCAT
+CGCAGTTCGCTACACGCAGGACGCTTTTTCACGTTCTGGTTGGTTGTGGCCTGTTGATGCTAAAGGTGAG
+CCGCTTAAAGCTACCAGTTATATGGCTGTTGGTTTCTATGTGGCTAAATACGTTAACAAAAAGTCAGATA
+TGGACCTTGCTGCTAAAGGTCTAGGAGCTAAAGAATGGAACAACTCACTAAAAACCAAGCTGTCGCTACT
+TCCCAAGAAGCTGTTCAGAATCAGAATGAGCCGCAACTTCGGGATGAAAATGCTCACAATGACAAATCTG
+TCCACGGAGTGCTTAATCCAACTTACCAAGCTGGGTTACGACGCGACGCCGTTCAACCAGATATTGAAGC
+AGAACGCAAAAAGAGAGATGAGATTGAGGCTGGGAAAAGTTACTGTAGCCGACGTTTTGGCGGCGCAACC
+TGTGACGACAAATCTGCTCAAATTTATGCGCGCTTCGATAAAAATGATTGGCGTATCCAACCTGCA
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/deepTools_seqs.loc.sample	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,27 @@
+#This is a sample file distributed with Galaxy that enables tools
+#to use a directory of 2bit genome files for use with deepTools. You will
+#need to supply these files and then create a deepTools_seqs.loc file
+#similar to this one (store it in this directory) that points to
+#the directories in which those files are stored. The deepTools_seqs.loc
+#file has this format:
+#
+#<unique_build_id>	<display_name>	<file_path>
+#
+#So, for example, if your deepTools_seqs.loc began like this:
+#
+#hg18	Human (Homo sapiens): hg18	/depot/data2/galaxy/twobit/hg18.2bit
+#hg19	Human (Homo sapiens): hg19	/depot/data2/galaxy/twobit/hg19.2bit
+#mm9	Mouse (Mus musculus): mm9	/depot/data2/galaxy/twobit/mm9.2bit
+#
+#then your /depot/data2/galaxy/twobit/ directory
+#would need to contain the following 2bit files:
+#
+#-rw-r--r--  1 james    universe 830134 2005-09-13 10:12 hg18.2bit
+#-rw-r--r--  1 james    universe 527388 2005-09-13 10:12 hg19.2bit
+#-rw-r--r--  1 james    universe 269808 2005-09-13 10:12 mm9.2bit
+#
+#Your deepTools_seqs.loc file should include an entry per line for 
+#each file you have stored that you want to be available. Note that 
+#your files should all have the extension '2bit'.
+#
+#Please note that the <unique_build_id> is also used as "Species name abbreviation".
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,7 @@
+<tables>
+    <!-- Locations of 2bit sequence files for use in deepTools -->
+    <table name="deepTools_seqs" comment_char="#">
+        <columns>value, name, path</columns>
+        <file path="tool-data/deepTools_seqs.loc" />
+    </table>
+</tables>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_dependencies.xml	Tue Feb 10 03:21:34 2015 -0500
@@ -0,0 +1,103 @@
+<?xml version="1.0"?>
+<tool_dependency>
+    <package name="samtools" version="0.1.19">
+        <repository changeset_revision="632f1a03db92" name="package_samtools_0_1_19" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="numpy" version="1.9">
+        <repository changeset_revision="dd91d64330d4" name="package_numpy_1_9" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="matplotlib" version="1.4">
+        <repository changeset_revision="38e91928f905" name="package_matplotlib_1_4" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="scipy" version="0.14">
+        <repository changeset_revision="a257ce4d82ad" name="package_scipy_0_14" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="pysam" version="0.8.1">
+        <repository changeset_revision="6b6843e15541" name="package_pysam_0_8_1" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="bx-python" version="0.7.2">
+        <repository changeset_revision="8c4879fee3cc" name="package_bx_python_0_7_2" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="python" version="2.7">
+        <repository changeset_revision="2c52c900e56a" name="package_python_2_7" owner="iuc" prior_installation_required="True" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+    </package>
+    <package name="ucsc_tools" version="0.1">
+        <install version="1.0">
+            <actions>
+                <action type="download_binary">
+                    <url_template architecture="x86_64" os="linux">http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bedGraphToBigWig</url_template>
+                    <url_template architecture="i686" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bedGraphToBigWig</url_template>
+                    <url_template architecture="i386" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bedGraphToBigWig</url_template>
+                    <url_template architecture="x86_64" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/bedGraphToBigWig</url_template>
+                </action>
+                <action type="chmod">
+                    <file mode="755">$INSTALL_DIR/bedGraphToBigWig</file>
+                </action>
+                <action type="download_binary">
+                    <url_template architecture="x86_64" os="linux">http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bigWigInfo</url_template>
+                    <url_template architecture="i686" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bigWigInfo</url_template>
+                    <url_template architecture="i386" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bigWigInfo</url_template>
+                    <url_template architecture="x86_64" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/bigWigInfo</url_template>
+                </action>
+                <action type="chmod">
+                    <file mode="755">$INSTALL_DIR/bigWigInfo</file>
+                </action>
+                <action type="download_binary">
+                    <url_template architecture="x86_64" os="linux">http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/bigWigToBedGraph</url_template>
+                    <url_template architecture="i686" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bigWigToBedGraph</url_template>
+                    <url_template architecture="i386" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.i386/bigWigToBedGraph</url_template>
+                    <url_template architecture="x86_64" os="darwin">http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/bigWigToBedGraph</url_template>
+                </action>
+                <action type="chmod">
+                    <file mode="755">$INSTALL_DIR/bigWigToBedGraph</file>
+                </action>
+                <action type="set_environment">
+                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR</environment_variable>
+                </action>
+             </actions>
+         </install>
+         <readme>The tools downloaded by this dependency definition are free for academic use. TODO: UCSC tools are only available with their latest version. That is not good for reproducibility.</readme>
+     </package>
+
+    <package name="deepTools" version="1.5.9.1">
+        <install version="1.0">
+            <actions>
+                <action type="set_environment_for_install">
+                    <repository changeset_revision="6b6843e15541" name="package_pysam_0_8_1" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                        <package name="pysam" version="0.8.1" />
+                    </repository>
+                    <repository changeset_revision="8c4879fee3cc" name="package_bx_python_0_7_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                        <package name="bx-python" version="0.7.2" />
+                    </repository>
+                    <repository changeset_revision="dd91d64330d4" name="package_numpy_1_9" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                        <package name="numpy" version="1.9" />
+                    </repository>
+                    <repository changeset_revision="38e91928f905" name="package_matplotlib_1_4" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                        <package name="matplotlib" version="1.4" />
+                    </repository>
+                    <repository changeset_revision="a257ce4d82ad" name="package_scipy_0_14" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                        <package name="scipy" version="0.14" />
+                    </repository>
+                </action>
+                <action type="setup_python_environment">
+                   <repository changeset_revision="2c52c900e56a" name="package_python_2_7" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu">
+                       <package name="python" version="2.7" />
+                   </repository>
+                    <!-- allow downloading and installing an Python package from https://pypi.org/ -->
+                    <package>https://pypi.python.org/packages/source/d/deepTools/deepTools-1.5.9.1.tar.gz</package>
+                </action>
+
+                <action type="set_environment">
+                    <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
+                    <environment_variable action="prepend_to" name="PYTHONPATH">$INSTALL_DIR</environment_variable>
+                    <!-- disable the config file of deepTools -->
+                    <environment_variable action="set_to" name="DEEP_TOOLS_NO_CONFIG">TRUE</environment_variable>
+                </action>
+             </actions>
+         </install>
+         <readme>
+            Installation of deepTools from Fidel Ramirez.
+            https://github.com/fidelram/deepTools
+         </readme>
+     </package>
+</tool_dependency>