Mercurial > repos > bgruening > hicexplorer_hicnormalize
diff hicNormalize.xml @ 0:4f36f2d51d33 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 3b41d687ff30583540d055f6995de00530cca81d-dirty"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 15:47:25 -0500 |
parents | |
children | 483e507c8d42 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hicNormalize.xml Mon Dec 16 15:47:25 2019 -0500 @@ -0,0 +1,104 @@ +<tool id="hicexplorer_hicnormalize" name="@BINARY@" version="@WRAPPER_VERSION@.0"> + <description>normalizes a matrix to norm range or smallest read count</description> + <macros> + <token name="@BINARY@">hicNormalize</token> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <command detect_errors="exit_code"><![CDATA[ + #import re + + mkdir output && + #for $counter, $m in enumerate($matrix_h5_cooler_multiple): + ln -s '$m' '${counter}_matrix.$m.ext' && + #end for + #set $m = ' '.join([ '\'%s_matrix.%s\'' % ($counter, $matrix.ext) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ]) + #set $m_out = ' '.join([ "'output/%s_norm_%s'" % ($counter, @ESCAPE_IDENTIFIER_MATRIX@) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ]) + + @BINARY@ --matrices $m + --normalize $normalize + --outFileName $m_out +]]> + </command> + <inputs> + <expand macro='matrix_h5_cooler_multiple_macro'/> + + <param name='normalize' type='select' label='Normalize matrices'> + <option value='norm_range'>0 to 1 range</option> + <option value='smallest'>Smallest read count</option> + </param> + + </inputs> + <outputs> + <data name="normalize_matrix"> + <discover_datasets pattern="__name_and_ext__" directory="output" visible="true"/> + <!-- <change_format> + <when input_dataset="matrix_h5_cooler_multiple" attribute="ext" value="h5" format="h5"/> + </change_format> --> + </data> + + </outputs> + <tests> + <test> + <param name="matrix_h5_cooler_multiple" value="small_test_matrix.cool"/> + <param name='normalize' value='norm_range'/> + <output name="normalize_matrix"> + <discovered_dataset designation="0_norm_small_test_matrix" ftype="cool"> + <assert_contents><has_h5_keys keys="bins,chroms,indexes,pixels"/></assert_contents> + </discovered_dataset> + </output> + </test> + + <test> + <param name="matrix_h5_cooler_multiple" value="small_test_matrix.cool,small_test_matrix.cool"/> + <param name='normalize' value='smallest'/> + + <output name="normalize_matrix"> + <discovered_dataset designation="0_norm_small_test_matrix" ftype="cool"> + <assert_contents><has_h5_keys keys="bins,chroms,indexes,pixels"/></assert_contents> + </discovered_dataset> + <discovered_dataset designation="1_norm_small_test_matrix" ftype="cool"> + <assert_contents><has_h5_keys keys="bins,chroms,indexes,pixels"/></assert_contents> + </discovered_dataset> + </output> + + </test> + + <test> + <param name="matrix_h5_cooler_multiple" value="small_test_matrix.h5,small_test_matrix.h5"/> + <param name='normalize' value='smallest'/> + + <output name="normalize_matrix"> + <discovered_dataset designation="0_norm_small_test_matrix" ftype="h5"> + <assert_contents><has_h5_keys keys="intervals,matrix"/></assert_contents> + </discovered_dataset> + <discovered_dataset designation="1_norm_small_test_matrix" ftype="h5"> + <assert_contents><has_h5_keys keys="intervals,matrix"/></assert_contents> + </discovered_dataset> + </output> + + </test> + + </tests> + <help><![CDATA[ +Normalization of matrices +===================================== + +**hicNormalize** normalizes either each matrix to a 0 - 1 value range or to the smallest read coverage. + +_________________ + +Output +------ + +The normalized matrices. + +_________________ + +| For more information about HiCExplorer please consider our documentation on readthedocs.io_ + +.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html +.. _`Lieberman-Aiden et al. (2009)`: https://doi.org/10.1126%2Fscience.1181369 +]]></help> + <expand macro="citations" /> +</tool>