diff hicSumMatrices.xml @ 15:f5d54dc64697 draft

"planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 91a0182476a7fc26be7bef1677790518c4e88348-dirty"
author bgruening
date Mon, 16 Dec 2019 13:12:48 +0000
parents 34ea556ba897
children 3a7698050cb6
line wrap: on
line diff
--- a/hicSumMatrices.xml	Mon Dec 09 10:37:59 2019 +0000
+++ b/hicSumMatrices.xml	Mon Dec 16 13:12:48 2019 +0000
@@ -8,41 +8,38 @@
     <command detect_errors="exit_code"><![CDATA[
 
         #for $counter, $m in enumerate($matrix_h5_cooler_multiple):
-            ln -s '$m' '${counter}_matrix.$m.ext' &&
+            ln -s '$m' ${counter}_matrix &&
         #end for
-        #set $m = ' '.join([ '\'%s_matrix.%s\'' % ($counter, $matrix.ext) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
-        #set $extension = $matrix_h5_cooler_multiple[0].ext
-        @BINARY@
-            --matrices $m
-            --outFileName 'matrix.$extension'
+        #set $m = '" "'.join([ '%s_matrix' % $counter for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
 
-        && mv 'matrix.$extension' matrix
+        hicSumMatrices
+            --matrices "$m"
+            --outFileName matrix.$outputFormat
+
+        && mv matrix.$outputFormat matrix
 ]]>
     </command>
     <inputs>
         <expand macro='matrix_h5_cooler_multiple_macro'/>
+
+        <param name='outputFormat' type='select' label="Output file format">
+            <option value='h5'>HiCExplorer format</option>
+            <option value="cool">cool</option>
+        </param>
     </inputs>
     <outputs>
-        <data name="outFileName" from_work_dir="matrix" format_source='matrix_h5_cooler_multiple'/>
+        <data name="outFileName" from_work_dir="matrix" format="h5">
+             <change_format>
+                <when input="outputFormat" value="cool" format="cool" />
+            </change_format>
+        </data>
     </outputs>
     <tests>
         <test>
-            <param name="matrix_h5_cooler_multiple" value="small_test_matrix.h5,small_test_matrix.h5"/>
-
-            <output name="outFileName" ftype="h5">
-                <assert_contents>
-                    <has_h5_keys keys='intervals,matrix'/>
-                </assert_contents>
-            </output>
-        </test>
-         <test>
-            <param name="matrix_h5_cooler_multiple" value="small_test_matrix.cool,small_test_matrix.cool"/>
-
-            <output name="outFileName" ftype="cool">
-                <assert_contents>
-                    <has_h5_keys keys='bins,chroms,indexes,pixels'/>
-                </assert_contents>
-            </output>
+            <param name="matrix_h5_cooler_multiple" value="hicCorrectMatrix_result1.npz.h5,hicCorrectMatrix_result1.npz.h5"/>
+            <!-- <param name="matrices" value="hicCorrectMatrix_result1.npz.h5,hicCorrectMatrix_result1.npz.h5"/> -->
+            <param name='outputFormat' value='h5'/>
+            <output name="outFileName" file="hicSumMatrices_result1.npz.h5" ftype="h5" compare="sim_size" delta="70000"/>
         </test>
     </tests>
     <help><![CDATA[