diff hicNormalize.xml @ 1:483e507c8d42 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 5744259254d4254a29cb7a6687fbbfd103301064"
author bgruening
date Wed, 05 Feb 2020 20:01:26 -0500
parents 4f36f2d51d33
children 05257e5d5016
line wrap: on
line diff
--- a/hicNormalize.xml	Mon Dec 16 15:47:25 2019 -0500
+++ b/hicNormalize.xml	Wed Feb 05 20:01:26 2020 -0500
@@ -16,27 +16,40 @@
         #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
+        #if $normalize_conditional.normalize == 'multiplicative':
+            --multiplicativeValue $normalize_conditional.multiplicativeValue
+        #end if
+        --normalize $normalize_conditional.normalize
+        #if $zero_threshold_value:
+            --setToZeroThreshold $zero_threshold_value
+        #end if
+
         --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>
-
+        <conditional name="normalize_conditional">
+            <param name='normalize' type='select' label='Normalize matrices'>
+                <option value='norm_range'>0 to 1 range</option>
+                <option value='smallest'>Smallest read count</option>
+                <option value='multiplicative'>Multiply by value</option>
+            </param>
+            <when value='norm_range'/>
+            <when value='smallest'/>
+            <when value='multiplicative'>
+                <param name="multiplicativeValue" type="float" value="1.0" label="Multiplicative value"/>
+            </when>
+        </conditional>
+        <param name="zero_threshold_value" type="float" value="1.0" optional='True' label="Set values below this threshold to zero"/>
     </inputs>
     <outputs>
-        <data name="normalize_matrix">
-            <discover_datasets pattern="__name_and_ext__" directory="output" visible="true"/>
-            <!-- <change_format>
+        <data format='cool' 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> -->
+            </change_format>
         </data>
-
     </outputs>
     <tests>
         <test>
@@ -48,11 +61,9 @@
                 </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>
@@ -61,13 +72,10 @@
                     <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>
@@ -76,15 +84,13 @@
                     <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.
+**hicNormalize** normalizes either each matrix to a 0 - 1 value range, to the smallest read coverage or with a user given factor.
 
 _________________