diff hicPlotMatrix.xml @ 13:40b33e101621 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:45:27 -0500
parents 653c6fead9f9
children fe13295d0329
line wrap: on
line diff
--- a/hicPlotMatrix.xml	Mon Dec 16 10:34:05 2019 -0500
+++ b/hicPlotMatrix.xml	Mon Dec 16 15:45:27 2019 -0500
@@ -8,15 +8,16 @@
     <command detect_errors="exit_code"><![CDATA[
 
         #if str($pca_conditional.pca_type) == 'bigwig':
-            ln -s $pca_conditional.pca_bigwig pca.bw &&
+            ln -s '$pca_conditional.pca_bigwig' pca.bw &&
             #set $pca = '--bigwig pca.bw'
         #elif str($pca_conditional.pca_type) == '':
             #set $pca = ''
         #end if
-
+        ln -s $matrix_h5_cooler matrix.$matrix_h5_cooler.ext &&
         @BINARY@
 
-            --matrix '$matrix_h5_cooler'
+            
+            --matrix 'matrix.$matrix_h5_cooler.ext'
 
             #if $title and $title is not None:
                 --title '$title'
@@ -32,7 +33,7 @@
             $clearMaskedBins
 
             ## special: --chromosomeOrder is optional, but if given needs at least one argument
-            #set chroms = '" "'.join([ str($var.chromosome) for $var in $chromosomeOrder ])
+            #set chroms = ' '.join([ '\'' + str($var.chromosome) + '\'' for $var in $chromosomeOrder ])
             #if chroms:
                 --chromosomeOrder "$chroms"
             #end if
@@ -58,9 +59,22 @@
             #if $vMax:
                 --vMax $vMax
             #end if
-
+            
+            #if str($pca_conditional.pca_type) == 'bigwig':
+                --vMinBigwig $pca_conditional.vMinBigwig
+                --vMaxBigwig $pca_conditional.vMaxBigwig
+                $pca_conditional.flipBigwigSign
+                --scaleFactorBigwig $pca_conditional.scaleFactorBigwig
+                $pca_conditional.bigwigAdditionalVerticalAxis
+            #end if 
             $pca
+            #if $dpi:
+                --dpi $dpi
+            #end if 
 
+            #if $loops:
+                --loops '$loops'
+            #end if
         && mv plot.$image_file_format plot
 ]]>
     </command>
@@ -103,65 +117,77 @@
             <when value='bigwig'>
                 <param name='pca_bigwig'  type="data" format="bigwig"
                             label="Eigenvector file"/>
+                <param argument="--vMinBigwig" type="float" optional="true" label="vMinBigwig" help="Minimum value of the plotted bigwig score."/>
+                <param argument="--vMaxBigwig" type="float" optional="true" label="vMaxBigwig" help="Maximum value of the plotted bigwig score."/>
+                <param name='flipBigwigSign' type='boolean' optional="true" truevalue='--flipBigwigSign' falsevalue='' label='Flip the sign of the bigwig values' />
+                <param argument="--scaleFactorBigwig" type="float" optional="true" label="Scale factor for bigwig" help="Scale the bigwig values by a factor."/>
+                <param name='bigwigAdditionalVerticalAxis' type='boolean' optional="true" truevalue='--bigwigAdditionalVerticalAxis' falsevalue='' label='Plot an additional vertical axis.' />
+
+
             </when>
         </conditional>
+        <param name='loops' type="data" format="interval" optional='True' label="Add detected loops"/>
         <param name="image_file_format" type="select" label="Image output format">
             <option value="png" selected="True">png</option>
             <option value="svg">svg</option>
+            <option value="pdf">pdf</option>
+
         </param>
+        <param name='dpi' type='integer' label='DPI for image' help='Change the default resolution of the plot.' optional='true'/>
     </inputs>
     <outputs>
         <data format="png" name="outFileName" from_work_dir="plot" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Plot">
             <change_format>
                 <when input="image_file_format" value="svg" format="svg" />
+                <when input="image_file_format" value="pdf" format="pdf" />
             </change_format>
         </data>
     </outputs>
     <tests>
         <test>
-            <param name="matrix_h5_cooler" value="Li_et_al_2015.h5"/>
+            <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
             <conditional name="pca_conditional">
                 <param name="pca_type" value=''/>
             </conditional>
-            <param name="region" value="chrX:3000000-3500000"/>
-            <param name="region2" value="chrX:3100000-3600000"/>
+            <param name="region" value="chr2L:3000000-3500000"/>
+            <param name="region2" value="chr2L:3100000-3600000"/>
             <param name="log1p" value="True"/>
             <param name="clearMaskedBins" value="True"/>
             <param name="image_file_format" value="png" />
-            <output name="outFileName" file="master_matrix_plot.png" ftype="png" compare="sim_size"/>
+            <param name="dpi" value="10" />
+
+            <output name="outFileName" file="hicPlotMatrix/plot1.png" ftype="png" compare="sim_size"/>
         </test>
         <test>
-            <param name="matrix_h5_cooler" value="Li_et_al_2015.cool"/>
+            <param name="matrix_h5_cooler" value="small_test_matrix.cool"/>
+            <param name="region" value="chr2L:3000000-3500000"/>
+
             <conditional name="pca_conditional">
                 <param name="pca_type" value=''/>
             </conditional>
-            <param name="region" value="X:3000000-3500000"/>
-            <param name="image_file_format" value="png" />
-            <output name="outFileName" file="Li_chrX30-35_cool.png" ftype="png" compare="sim_size"/>
+            <param name="image_file_format" value="pdf" />
+            <param name="dpi" value="10" />
+
+            <output name="outFileName" file="hicPlotMatrix/plot2.pdf" ftype="pdf" compare="sim_size"/>
         </test>
         <test>
-            <param name="matrix_h5_cooler" value="pearson_small_50kb.cool"/>
-            <param name="perChromosome" value="True"/>
+            <param name="matrix_h5_cooler" value="small_test_matrix.cool"/>
             <conditional name="pca_conditional">
                 <param name="pca_type" value='bigwig'/>
-                <param name="pca_bigwig" value="pca1.bw"/>
+                <param name="pca_bigwig" value="hicPCA/pca1_test1.bw"/>
+                <param name='vMinBigwig' value='10'/>
+                <param name='vMaxBigwig' value='20'/>
+                <param name='scaleFactorBigwig' value='2000'/>
+                <param name='flipBigwigSign' value='True'/>
             </conditional>
             <param name='colormap' value='hot'/>
-            <param name="image_file_format" value="svg" />
-            <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/>
-        </test>
-        <test>
-            <param name="matrix_h5_cooler" value="pearson_small_50kb.h5"/>
-            <param name="perChromosome" value="True"/>
-            <conditional name="pca_conditional">
-                <param name="pca_type" value='bigwig'/>
-                <param name="pca_bigwig" value="pca1.bw"/>
-            </conditional>
-            <param name='colormap' value='hot'/>
+            <param name="region" value="chr2L:3000000-3500000"/>
+            <param name="dpi" value="10" />
 
             <param name="image_file_format" value="svg" />
-            <output name="outFileName" file="small_matrix_50kb_pearson_pca1_plot.svg" ftype="svg" compare="sim_size" delta='35000'/>
+            <output name="outFileName" file="hicPlotMatrix/plot3_pca.svg" ftype="svg" compare="sim_size" delta="35000"/>
         </test>
+        
     </tests>
     <help><![CDATA[
 Contact matrix plot