diff hicSumMatrices.xml @ 13:e89bc5e38823 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:24:24 -0500
parents 0399cd2c25aa
children 5aa5ef83f975
line wrap: on
line diff
--- a/hicSumMatrices.xml	Mon Dec 16 08:37:13 2019 -0500
+++ b/hicSumMatrices.xml	Mon Dec 16 15:24:24 2019 -0500
@@ -8,38 +8,41 @@
     <command detect_errors="exit_code"><![CDATA[
 
         #for $counter, $m in enumerate($matrix_h5_cooler_multiple):
-            ln -s '$m' ${counter}_matrix &&
+            ln -s '$m' '${counter}_matrix.$m.ext' &&
         #end for
-        #set $m = '" "'.join([ '%s_matrix' % $counter for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
+        #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'
 
-        hicSumMatrices
-            --matrices "$m"
-            --outFileName matrix.$outputFormat
-
-        && mv matrix.$outputFormat matrix
+        && mv 'matrix.$extension' 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="h5">
-             <change_format>
-                <when input="outputFormat" value="cool" format="cool" />
-            </change_format>
-        </data>
+        <data name="outFileName" from_work_dir="matrix" format_source='matrix_h5_cooler_multiple'/>
     </outputs>
     <tests>
         <test>
-            <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"/>
+            <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>
         </test>
     </tests>
     <help><![CDATA[