diff macros.xml @ 8:ae9cc6dbfaca 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:41:36 -0500
parents 09ae55eb26fa
children 3f529510975e
line wrap: on
line diff
--- a/macros.xml	Mon Dec 16 08:53:27 2019 -0500
+++ b/macros.xml	Mon Dec 16 15:41:36 2019 -0500
@@ -1,6 +1,6 @@
 <macros>
     <token name="@THREADS@">\${GALAXY_SLOTS:-4}</token>
-    <token name="@WRAPPER_VERSION@">2.1.4</token>
+    <token name="@WRAPPER_VERSION@">3.3.1</token>
     <token name="@USE_RANGE@">
         #if $use_range.select_use_range == "yes_use_range":
             --range $range_min:$range_max
@@ -15,6 +15,25 @@
         <version_command>@BINARY@ --version</version_command>
     </xml>
 
+    <token name="@CHROMOSOME_LIST@">
+        #if $chromosome_list:
+            #set $chromosomes = []
+            #for $chrom in $chromosome_list:
+                #silent $chromosomes.append("'%s'" % $chrom.chromosomes)
+            #end for
+            #set $chromosome_string = ' '.join($chromosomes)
+            --chromosomes $chromosome_string
+        #end if
+    </token>
+
+    <xml name="chromosome_list">
+        <repeat name="chromosome_list" min="0" title="Chromosomes to include" help="Chromosomes to include in the analysis. If not set, all chromosomes are included.">
+            <param argument="--chromosomes" type="text" value="" >
+                <validator type="empty_field" />
+            </param>
+        </repeat>
+    </xml>
+
     <xml name="citations">
         <citations>
             <citation type="doi">10.5281/zenodo.1133705</citation>
@@ -114,6 +133,7 @@
             <option value="brg">brg</option>
             <option value="jet">jet</option>
             <option value="afmhot">afmhot</option>
+            <option value="plasma">plasma</option>
             <option value="Accent_r">Accent reversed</option>
             <option value="Spectral_r">Spectral reversed</option>
             <option value="Set1_r">Set1 reversed</option>
@@ -183,10 +203,10 @@
             <option value="brg_r">brg reversed</option>
             <option value="jet_r">jet reversed</option>
             <option value="afmhot_r">afmhot reversed</option>
+            <option value="plasma_r">plasma reversed</option>
         </param>
     </xml>
 
-
     <xml name="multiple_input_matrices">
         <repeat name="input_files" title="Hi-C Matrix files" min="2">
             <param name="matrix" type="data" format="h5,cool"
@@ -202,19 +222,22 @@
         #set $matrices = []
         #set $mlabels = []
         #for $counter, $i in enumerate($input_files):
-            ln -s $i.matrix #echo str($counter)+'_matrix'#;
-            #silent $matrices.append( '%s_matrix' % $counter )
+            ln -s '$i.matrix' '${counter}_matrix.$i.matrix.ext'; 
+            #silent $matrices.append( '\'%s_matrix.%s\'' % ($counter,  $i.matrix.ext))
 
             #if str($i.mlabel.value) != "":
-                #set $mlabels += ['"%s"' % ($i.mlabel.value)]
+                #set $mlabels += ['\'%s\'' % ($i.mlabel.value)]
             #else
-                #set $mlabels += ['"%s"' % ($i.matrix.name)]
+                #set $mlabels += ['\'%s\'' % ($i.matrix.name)]
             #end if
         #end for
         #set $mlabels = ' '.join($mlabels)
         #set $matrices = ' '.join($matrices)
     </token>
 
+    <token name="@ESCAPE_IDENTIFIER_FILE@"><![CDATA[re.sub('[^\s\w\-\.]', '_', str($file.element_identifier))]]></token>
+    <token name="@ESCAPE_IDENTIFIER_MATRIX@"><![CDATA[re.sub('[^\s\w\-\.]', '_', str($matrix.element_identifier))]]></token>
+    <token name="@ESCAPE_IDENTIFIER_M@"><![CDATA[re.sub('[^\s\w\-\.]', '_', str($m.element_identifier))]]></token>
 
     <xml name="region">
         <param name="region" type="text" label="Region of the genome to limit the operation"
@@ -330,6 +353,96 @@
         <param name='matrix_h5_cooler_multiple' type="data" format="h5,cool"
             label="Matricies to compute on" multiple="true"/>
     </xml>
+
+    
+
+    <xml name='convertFormat_single_macro'>
+        <conditional name="inputFormat_conditional">
+            <param name="inputFormat_selector" type="select" label="Choose input file type">
+                <option value="optionCool" selected="True">cool</option>
+                <option value="optionH5">h5</option>
+                <!-- <option value="optionHic">hic</option> -->
+                <option value="optionHomer">Homer</option>
+                <option value="optionHicpro">HiCPro</option>
+            </param>
+            <when value="optionCool">
+                <expand macro='matrix_h5_cooler_macro' />
+                <param name='correctionName' type='text' label='Correction factors column name'/>
+                <param name='correctionDivision' type="boolean" truevalue="yes" falsevalue="" label='Apply correction factors with a division instead multiplication'/>
+                <param name='chromosome' type='text' label='Load only one chromosome'/>
+                <param name='loadRawValues' type="boolean" truevalue="yes" falsevalue="" label='Load raw data'/>
+
+            </when>
+            <when value="optionH5">
+                <expand macro='matrix_h5_cooler_macro' />
+            </when>
+            <!-- <when value="optionHic">
+                <param name='matrixHic' type='data' format='binary' label='.hic matrix'/>
+                <param name='resolutions' type='text' label='List of resolutions'/>
+            </when> --> 
+
+            <when value="optionHomer">
+                <param name='matrixHomer' type='data' format='txt' label='Homer interaction matrix'/>
+            </when>
+
+            <when value="optionHicpro">
+                <param name='matrixHicpro' type='data' format='txt' label='.hic matrix'/>
+                <param name='bedHicpro' type='data' format='bed' label='HicPro bed file'/>
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name='convertFormat_multiple_macro'>
+        <conditional name="inputFormat_conditional">
+            <param name="inputFormat_selector" type="select" label="Choose input file type">
+                <option value="optionCool" selected="True">cool</option>
+                <option value="optionH5">h5</option>
+                <option value="optionHomer">Homer</option>
+                <option value="optionHicpro">HiCPro</option>
+            </param>
+            <when value="optionCool">
+                <expand macro='matrix_h5_cooler_multiple_macro' />
+                <param name='correctionName' type='text' label='Correction factors column name'/>
+                <param name='correctionDivision' type="boolean" truevalue="yes" falsevalue="" label='Apply correction factors with a division instead multiplication'/>
+                <param name='chromosome' type='text' label='Load only one chromosome'/>
+                <param name='loadRawValues' type="boolean" truevalue="yes" falsevalue="" label='Load raw data'/>
+
+            </when>
+            <when value="optionH5">
+                <expand macro='matrix_h5_cooler_multiple_macro' />
+            </when>
+           
+            <when value="optionHomer">
+                <param name='matrixHomer' type='data' format='txt' label='Homer interaction matrix' multiple="true"/>
+            </when>
+
+            <when value="optionHicpro">
+                <param name='matrixHicpro' type='data' format='txt' label='.hic matrix' multiple="true"/>
+                <param name='bedHicpro' type='data' format='bed' label='HicPro bed file' multiple="true"/>
+            </when>
+        </conditional>
+    </xml>
+    <xml name='convertFormat_single_output_macro'>
+        <!-- <filter>outputSingleMultiple_conditional.inputFormat_conditional.inputFormat_selector == 'optionCool'</filter> -->
+
+        <conditional name="outputFormat_conditional">
+            <param name="outputFormat_selector" type="select" label="Choose output file type">
+                <option value="cool" selected="True">cool</option>
+                <option value="h5">h5</option>
+                <option value="homer">Homer</option>
+                <option value="ginteractions">ginteractions</option>
+
+            </param>
+            <when value="cool">
+                <param name='storeAppliedCorrection' type="boolean" truevalue="yes" falsevalue=""   label='Store applied correction factors in column count'/>
+                <param name='enforceInteger' type="boolean" truevalue="yes" falsevalue=""  label='Enforce integer for count column'/>
+            </when>
+            <when value='h5'/>
+            <when value='homer'/>
+            <when value='ginteractions'/>
+
+        </conditional>
+    </xml>
     <token name="@REFERENCES@">
 
 .. class:: infomark