diff hicSumMatrices.xml @ 5:b9f41afc3312 draft

planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 80462804e4fd7deafbcf8e8c5283cc7a98fa7dd5
author bgruening
date Sat, 30 Dec 2017 09:36:36 -0500
parents d387dacb6867
children e0df60f3b0d5
line wrap: on
line diff
--- a/hicSumMatrices.xml	Sat Dec 16 16:35:53 2017 -0500
+++ b/hicSumMatrices.xml	Sat Dec 30 09:36:36 2017 -0500
@@ -7,27 +7,42 @@
     <expand macro="requirements" />
     <command detect_errors="exit_code"><![CDATA[
 
-        #for $counter, $m in enumerate($matrices):
-            ln -s '$m' ${counter}.npz.h5 &&
+         #for $counter, $m in enumerate($matrix_h5_cooler_multiple):
+            ln -s '$m' ${counter}_matrix &&
         #end for
+        #set $m = '" "'.join([ '%s_matrix' % $counter for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
 
-        #set $m = '" "'.join([ '%s.npz.h5' % $counter for $counter, $matrix in enumerate($matrices) ])
         hicSumMatrices
             --matrices "$m"
-            --outFileName ./out.npz.h5
+        #if $outputFormat == 'h5'
+            --outFileName matrix.h5
+        #elif $outputFormat == 'cool'
+            --outFileName matrix.cool
+        #end if
 ]]>
     </command>
     <inputs>
-        <param argument="--matrices" type="data" format="h5" multiple="True"
-            label="Matrices to combine" help="Needs to have the same shape"/>
+        <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="out.npz.h5" format="h5"/>
+        <data name="outFileName_h5" from_work_dir="matrix.h5" format="h5">
+            <filter>outputFormat == 'h5'</filter>
+        </data>
+        <data name="outFileName_cool" from_work_dir="matrix.cool" format="cool">
+            <filter>outputFormat == 'cool'</filter>
+        </data>
     </outputs>
     <tests>
         <test>
-            <param name="matrices" value="hicCorrectMatrix_result1.npz.h5,hicCorrectMatrix_result1.npz.h5"/>
-            <output name="outFileName" file="hicSumMatrices_result1.npz.h5" ftype="h5" compare="sim_size" delta="70000"/>
+            <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_h5" file="hicSumMatrices_result1.npz.h5" ftype="h5" compare="sim_size" delta="70000"/>
         </test>
     </tests>
     <help><![CDATA[
@@ -36,10 +51,10 @@
 
 ``hicSumMatrix`` is combining two (or more) contact matrices of the same size to one. 
 This is useful if replicates of an Hi-C experiment should be merged into one contact matrix to 
-increase the power of the data. It is the nature of Hi-C that real contact cannot be distinguished
- from noise, especially with a low contact count. The more contacts are given, the more likely it is 
- that a high number of contacts are real contact or contain at least a high amount. Therefore it is 
- a common way to merge replicates of Hi-C experiments to increase the validity of the experiment.
+increase the power of the data. It is the nature of Hi-C that real contact cannot be distinguished 
+from noise, especially with a low contact count. The more contacts are given, the more likely it is 
+that a high number of contacts are real contact or contain at least a high amount. Therefore it is 
+a common way to merge replicates of Hi-C experiments to increase the validity of the experiment.
 
 Input
 -----