Repository 'hicexplorer_hicbuildmatrix'
hg clone https://eddie.galaxyproject.org/repos/bgruening/hicexplorer_hicbuildmatrix

Changeset 0:611b0f02e109 (2016-10-09)
Next changeset 1:8ffb4beeabcf (2017-03-29)
Commit message:
planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 6a4d8b48a6504eacbb9ed7228f77117fa759286d-dirty
added:
_hicExport._xml
hicBuildMatrix.xml
hicFindEnrichedContacts.xml
macros.xml
b
diff -r 000000000000 -r 611b0f02e109 _hicExport._xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/_hicExport._xml Sun Oct 09 17:35:32 2016 -0400
[
@@ -0,0 +1,55 @@
+<tool id="hicExport" name="hicExport" version="1.0">
+    <description>saves a HiC Matrix in text format</description>
+    <macros>
+        <token name="@BINARY@">hicExport</token>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command><![CDATA[
+        hicExport
+            #if $matrix and $matrix is not None:
+                --matrix $matrix
+            #end if
+            --outputFormat $outputFormat
+            $clearMaskedBins
+            --outFileName $output
+
+    ]]></command>
+    <inputs>
+        <param label="Matrix to use" name="matrix" type="data" help="(--matrix)" />
+        <param label="Output format" name="outputFormat" type="select"
+            help="There are two possibilities: &quot;dekker&quot; and &quot;ren&quot;.
+            The dekker format outputs the whole matrix where the first column and first row are the bin widths and labels.
+            The &quot;ren&quot; format is a list of tuples of the form chrom, bin_star, bin_end, values. (--outputFormat)">
+            <option selected="true" value="dekker">Dekker (first column and first rows are labels)</option>
+            <option value="ren">Ren (chrom, bin_star, bin_end, values)</option>
+        </param>
+        <param name="clearMaskedBins" type="boolean" truevalue="--clearMaskedBins" falsevalue="" label="If set, masked bins are removed from the matrix"
+            help="Masked bins are those that do not have any values, mainly because they are repetitive regions of the genome (--clearMaskedBins)" />
+    </inputs>
+    <outputs>
+        <data format="txt" name="output"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="matrix" value="hicBuildMatrix_result1.npz"/>
+            <param name="outputFormat" value="dekker"/>
+            <output name="output" file="hicExport_result1.txt" ftpye="txt"/>
+        </test>
+        <test>
+            <param name="matrix" value="hicBuildMatrix_result1.npz"/>
+            <param name="outputFormat" value="ren"/>
+            <param name="clearMaskedBins" value="True"/>
+            <output name="output" file="hicExport_result2.txt" ftpye="txt"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+**What it does**
+
+Saves a HiC Matrix in text format
+
+    ]]></help>
+    <expand macro="citations" />
+</tool>
+
b
diff -r 000000000000 -r 611b0f02e109 hicBuildMatrix.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hicBuildMatrix.xml Sun Oct 09 17:35:32 2016 -0400
[
@@ -0,0 +1,128 @@
+<tool id="hicexplorer_hicbuildmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0">
+    <description>creates a matrix of interactions</description>
+    <macros>
+        <token name="@BINARY@">hicBuildMatrix</token>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command>
+<![CDATA[
+
+        hicBuildMatrix
+
+            --samFiles
+            #for $repeat in $samFiles:
+                '${repeat.samFile}'
+            #end for
+
+            #if $binSize and $binSize is not None:
+                --binSize $binSize
+            #end if
+
+            #if $fragmentLength and $fragmentLength is not None:
+                --fragmentLength $fragmentLength
+            #end if
+
+            #if $restrictionCutFile and $restrictionCutFile is not None:
+                --restrictionCutFile $restrictionCutFile
+            #end if
+
+            #if $minDistance and $minDistance is not None:
+                --minDistance $minDistance
+            #end if
+
+            #if $maxDistance and $maxDistance is not None:
+                --maxDistance $maxDistance
+            #end if
+
+            #if $restrictionSequence and $restrictionSequence is not None:
+                --restrictionSequence '$restrictionSequence'
+            #end if
+
+            #if $region and $region is not None:
+                --region '$region'
+            #end if
+
+            --outFileName ./numpy_array.npz
+            --outBam ./unsorted.bam
+
+            #if $restrictionCutFile:
+                --restrictionCutFile '$restrictionCutFile'
+            #end if
+
+            $removeSelfCircles
+
+            #if $minMappingQuality
+                --minMappingQuality $minMappingQuality
+            #end if
+        &&
+
+        samtools sort ./unsorted.bam -o sorted.bam
+
+]]>
+    </command>
+    <inputs>
+        <repeat max="2" min="2" name="samFiles" title="Sam/Bam files to process">
+            <param name="samFile" type="data" format="sam,bam"/>
+        </repeat>
+
+        <param argument="--restrictionCutFile" type="data" format="bed" optional="True"
+            help="BED file with all restriction cut places. Should contain only mappable restriction sites. If given, the
+                  bins are set to match the restriction fragments (i.e. the region between one restriction site and the next)"/>
+
+        <param name="binSize" type="integer" value="10000" label="Bin size in bp"
+            help="If used, the restriction cut places (if given) are used to only consider reads that are in the vicinity of the resctriction sites.
+            Otherwise all reads in the interval are considered. " argument="--binSize"/>
+
+        <param name="fragmentLength" type="integer" value="300" optional="true" label="Estimated fragment length" argument="--fragmentLength" />
+
+        <param name="restrictionCutFile" type="data" format="bed" optional="true" label="BED file with all restriction cut places"
+            help="Should contaion only  mappable restriction sites. If given, the bins are set to match the restriction fragments
+            (i.e. the region between one restriction site and the next)." argument="--restrictionCutFile"/>
+
+        <param name="minDistance" type="integer" value="300" optional="true" label="Minimum distance between restriction sites"
+            help="Restriction sites that are closer that this distance are merged into one.
+            This option only applies if --restrictionCutFile is given." argument="--minDistance"/>
+
+        <param name="maxDistance" type="integer" value="800" optional="true" label="Maximum distance in bp from restriction site to read, to consider a read a valid one"
+            help="This option only applies if --restrictionCutFile is given."  argument="--maxDistance"/>
+
+        <param name="restrictionSequence" type="text" optional="true" label="Sequence of the restriction site"
+            help="This is used to discard reads that end/start with such sequence and that are considered un-ligated fragments or
+            &quot;dangling-ends&quot;. If not given, such statistics will not be available." argument="--restrictionSequence"/>
+
+        <expand macro="region" />
+
+        <param argument="--removeSelfCircles" type="boolean" truevalue="--removeSelfCircles" falsevalue=""
+            label="Save the matrix of values underlying the heatmap" help="If set, outward facing reads, at a distance of less thatn 25kbs are removed." />
+
+        <expand macro="minMappingQuality" />
+
+
+    </inputs>
+    <outputs>
+        <data name="outBam" from_work_dir="sorted.bam" format="bam" label="${tool.name} BAM file on ${on_string}"/>
+        <data name="outFileName" from_work_dir="numpy_array.npz.h5" format="h5" label="${tool.name} MATRIX on ${on_string}"/>
+    </outputs>
+    <tests>
+        <test>
+            <repeat name="samFiles">
+                <param name="samFile" value="r1.sam" ftype="sam" />
+            </repeat>
+            <repeat name="samFiles">
+                <param name="samFile" value="r2.sam" ftype="sam"/>
+            </repeat>
+            <param name="binSize" value="10000"/>
+            <output name="outBam" file="hicBuildMatrix_result1.bam" ftype="bam"/>
+            <output name="outFileName" file="hicBuildMatrix_result1.npz.h5" ftype="h5" compare="sim_size"/>
+        </test>
+    </tests>
+    <help><![CDATA[
+
+**What it does**
+
+Creates a matrix of interactions
+
+]]></help>
+    <expand macro="citations" />
+</tool>
b
diff -r 000000000000 -r 611b0f02e109 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Sun Oct 09 17:35:32 2016 -0400
[
b'@@ -0,0 +1,541 @@\n+<macros>\n+    <xml name="stdio">\n+        <stdio>\n+            <exit_code range="1:" />\n+            <exit_code range=":-1" />\n+            <regex match="Error:" />\n+            <regex match="Exception:" />\n+            <regex match="EXception:" />\n+            <regex match="Traceback" />\n+        </stdio>\n+    </xml>\n+\n+    <token name="@THREADS@">--numberOfProcessors "\\${GALAXY_SLOTS:-4}"</token>\n+    <token name="@WRAPPER_VERSION@">1.2</token>\n+    <xml name="requirements">\n+        <requirements>\n+            <requirement type="package" version="@WRAPPER_VERSION@">hicexplorer</requirement>\n+            <yield />\n+        </requirements>\n+        <expand macro="stdio" />\n+        <version_command>@BINARY@ --version</version_command>\n+    </xml>\n+\n+    <xml name="citations">\n+        <citations>\n+            <citation type="doi">10.5281/zenodo.159780</citation>\n+            <yield />\n+        </citations>\n+    </xml>\n+\n+    <xml name="zMax">\n+        <param argument="--zMax" name="zMax" type="float" optional="true" label="zMax for 3D plot"/> <!-- this should only be enabled when both or 3d is selected for param whatToShow -->\n+    </xml>\n+\n+    <xml name="colormap">\n+        <param argument="--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/">\n+            <option value="RdYlBu" selected="true">RdYlBu</option>\n+            <option value="Accent">Accent</option>\n+            <option value="Spectral">Spectral</option>\n+            <option value="Set1">Set1</option>\n+            <option value="Set2">Set2</option>\n+            <option value="Set3">Set3</option>\n+            <option value="Dark2">Dark2</option>\n+            <option value="Reds">Reds</option>\n+            <option value="Oranges">Oranges</option>\n+            <option value="Greens">Greens</option>\n+            <option value="Blues">Blues</option>\n+            <option value="Greys">Greys</option>\n+            <option value="Purples">Purples</option>\n+            <option value="Paired">Paired</option>\n+            <option value="Pastel1">Pastel1</option>\n+            <option value="Pastel2">Pastel2</option>\n+            <option value="spring">spring</option>\n+            <option value="summer">summer</option>\n+            <option value="autumn">autumn</option>\n+            <option value="winter">winter</option>\n+            <option value="hot">hot</option>\n+            <option value="coolwarm">coolwarm</option>\n+            <option value="cool">cool</option>\n+            <option value="seismic">seismic</option>\n+            <option value="terrain">terrain</option>\n+            <option value="ocean">ocean</option>\n+            <option value="rainbow">rainbow</option>\n+            <option value="bone">bone</option>\n+            <option value="flag">flag</option>\n+            <option value="prism">prism</option>\n+            <option value="cubehelix">cubehelix</option>\n+            <option value="binary">binary</option>\n+            <option value="pink">pink</option>\n+            <option value="gray">gray</option>\n+            <option value="copper">copper</option>\n+            <option value="BrBG">BrBG</option>\n+            <option value="BuGn">BuGn</option>\n+            <option value="BuPu">BuPu</option>\n+            <option value="GnBu">GnBu</option>\n+            <option value="OrRd">OrRd</option>\n+            <option value="PiYG">PiYG</option>\n+            <option value="PRGn">PRGn</option>\n+            <option value="PuOr">PuOr</option>\n+            <option value="PuRd">PuRd</option>\n+            <option value="PuBu">PuBu</option>\n+            <option value="RdBu">RdBu</option>\n+            <option value="RdGy">RdGy</option>\n+            <option value="RdPu">RdPu</option>\n+            <option value="YlGn">YlGn</option>\n+            <option value="PuBuGn">PuBuGn</option>\n+            <option value="RdYlGn">RdYlGn<'..b'="93260000" />\n+        </conditional>\n+    </xml>\n+\n+    <xml name="image_file_format">\n+        <param name="outFileFormat" type="select" label="Image file format">\n+            <option value="png" selected="true">png</option>\n+            <option value="pdf">pdf</option>\n+            <option value="svg">svg</option>\n+            <option value="eps">eps</option>\n+            <option value="emf">emf</option>\n+        </param>\n+    </xml>\n+\n+    <xml name="missingDataAsZero">\n+                <param name="missingDataAsZero" type="boolean" truevalue="yes" falsevalue="no" checked="True"\n+                    label ="Treat missing data as zero"\n+                    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." />\n+    </xml>\n+\n+    <xml name="input_save_matrix_values">\n+        <param name="saveMatrix" type="boolean" label="Save the matrix of values underlying the heatmap"/>\n+    </xml>\n+\n+    <xml name="input_graphic_output_settings">\n+        <conditional name="output" >\n+            <param name="showOutputSettings" type="select" label="Show advanced output settings" >\n+                <option value="no" selected="true">no</option>\n+                <option value="yes">yes</option>\n+            </param>\n+            <when value="no" />\n+            <when value="yes">\n+                <yield />\n+                <param name="saveData" type="boolean" label="Save the data underlying the average profile"/>\n+                <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."/>\n+            </when>\n+        </conditional>\n+    </xml>\n+\n+    <xml name="input_image_file_format">\n+        <param name="outFileFormat" type="select" label="Image file format">\n+            <option value="png" selected="true">png</option>\n+            <option value="pdf">pdf</option>\n+            <option value="svg">svg</option>\n+            <option value="eps">eps</option>\n+            <option value="emf">emf</option>\n+        </param>\n+    </xml>\n+\n+    <xml name="output_image_file_format">\n+        <data format="png" name="outFileName" label="${tool.name} image">\n+            <change_format>\n+                <when input="output.outFileFormat" value="pdf" format="pdf" />\n+                <when input="output.outFileFormat" value="svg" format="svg" />\n+                <when input="output.outFileFormat" value="eps" format="eps" />\n+                <when input="output.outFileFormat" value="emf" format="emf" />\n+            </change_format>\n+        </data>\n+    </xml>\n+\n+    <xml name="output_save_matrix_values">\n+        <data format="tabular" name="outFileNameMatrix" label="${tool.name} on ${on_string}: Heatmap values">\n+            <filter>\n+            ((\n+                output[\'showOutputSettings\'] == \'yes\' and\n+                output[\'saveMatrix\'] is True\n+            ))\n+            </filter>\n+        </data>\n+    </xml>\n+\n+    <xml name="output_graphic_outputs">\n+        <data format="tabular" name="outFileNameData" label="${tool.name} on ${on_string}: averages per matrix column">\n+            <filter>\n+            ((\n+                output[\'showOutputSettings\'] == \'yes\' and\n+                output[\'saveData\'] is True\n+            ))\n+            </filter>\n+        </data>\n+        <data format="bed" name="outFileSortedRegions" label="${tool.name} on ${on_string}: sorted/filtered regions">\n+            <filter>\n+            ((\n+                output[\'showOutputSettings\'] == \'yes\' and\n+                output[\'saveSortedRegions\'] is True\n+            ))\n+            </filter>\n+        </data>\n+    </xml>\n+\n+\n+\n+</macros>\n'