changeset 4:126abc4b03f1 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit db84cc85222518217286b42262935edd3a49c98e"
author iuc
date Fri, 14 Aug 2020 06:15:21 -0400
parents 9180983da5c2
children 8c5cecbfc3aa
files chicDifferentialTest.xml test-data/cHi-C/chicAggregateStatistic/batch_mode.tar test-data/cHi-C/chicDifferentialTest/batch_mode_chi2.tar test-data/cHi-C/chicDifferentialTest/batch_mode_fisher_outfile.tar test-data/cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png test-data/cHi-C/chicPlotViewpoint/batchMode/plots.tar test-data/cHi-C/chicPlotViewpoint/batchMode/two/Eya1_FL-E13-5_MB-E10-5_chr1_chr1_14300280.png test-data/cHi-C/chicPlotViewpoint/batchMode/two/Sox17_FL-E13-5_MB-E10-5_chr1_chr1_4487435.png test-data/cHi-C/chicPlotViewpoint/batchMode/two/Tfap2d_FL-E13-5_MB-E10-5_chr1_chr1_19093103.png test-data/cHi-C/chicSignificantInteractions/significantFilesFolder.tar test-data/cHi-C/chicSignificantInteractions/targetFolder.tar test-data/cHi-C/chicViewpoint/output_1.tar test-data/cHi-C/chicViewpoint/viewpoints.tar
diffstat 13 files changed, 83 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/chicDifferentialTest.xml	Tue Mar 24 14:03:15 2020 -0400
+++ b/chicDifferentialTest.xml	Fri Aug 14 06:15:21 2020 -0400
@@ -1,4 +1,4 @@
-<tool id="hicexplorer_chicdifferentialtest" name="@BINARY@" version="@WRAPPER_VERSION@.0">
+<tool id="hicexplorer_chicdifferentialtest" name="@BINARY@" version="@WRAPPER_VERSION@.1">
     <description>computes differential interactions of viewpoints</description>
     <macros>
         <token name="@BINARY@">chicDifferentialTest</token>
@@ -11,11 +11,16 @@
         mkdir interactionFiles &&
         mkdir differentialFolder &&
 
-        #for $file in $interactionFiles:
-            #set identifier = @ESCAPE_IDENTIFIER_FILE@
-            ln -s '$file' 'interactionFiles/$identifier' &&
-        #end for
-
+        #if $tar_input_conditional.tar_input_selector == 'tar_input':
+            ln -s '$tar_input_conditional.interactionFiles' viewpoints.tar && 
+            tar -C interactionFiles -xvf viewpoints.tar &&
+        #else:
+            #for $file in $tar_input_conditional.interactionFiles:
+                #set identifier = @ESCAPE_IDENTIFIER_FILE@
+                                    
+                ln -s '$file' 'interactionFiles/$identifier' &&
+            #end for
+        #end if
         #if $batchmode_conditional.batchmode_selector == 'optionSinglemode':
             #set $interactonfileslist = ' '.join([ '\'interactionFiles/%s\'' % @ESCAPE_IDENTIFIER_FILE@ for $file in $interactionFiles ])
         #end if
@@ -32,9 +37,27 @@
             --alpha $alpha
             --outputFolder differentialFolder
             --threads @THREADS@
+
+            #if $tar:
+                && cd differentialFolder
+                && tar -cvf ../differentialFolder.tar *
+                && cd ..
+                && rm -rf differentialFolder
+            #end  if
     ]]></command>
     <inputs>
+        <conditional name="tar_input_conditional">
+            <param name="tar_input_selector" type="select" label="Compute files individually or in batch mode">
+                <option value="tar_input">tar file</option>
+                <option value="interval_input" selected="True">Interval files</option>
+            </param>
+            <when value="tar_input">
+        <param name='interactionFiles' type="data" format="tar" label="Interaction files" multiple="false"/>
+            </when>
+            <when value="interval_input">
         <param name='interactionFiles' type="data" format="interval" label="Interaction files" multiple="true"/>
+            </when>
+        </conditional>
 
         <conditional name="batchmode_conditional">
             <param name="batchmode_selector" type="select" label="Compute files individually or in batch mode">
@@ -52,6 +75,9 @@
                 <option value="fisher" selected="True">Fisher exact</option>
                 <option value="chi2">Chi2 contingency</option>
         </param>
+        <param name='tar' type='boolean' checked="false" truevalue='True' label="tar output to one file"
+                help="The output is tarred to one file and not written to a collection. Set this option if the number of files is large."/>
+   
     </inputs>
     <outputs>
         <collection name="differentialFolderCollection" type="list" label="Differential test files">
@@ -60,10 +86,16 @@
         <data name="rejectedFileNames" from_work_dir="rejected_H0.txt" format="txt" label="${tool.name} rejected H0">
             <filter>batchmode_conditional.batchmode_selector == 'optionBatchmode'</filter>
         </data>
+        <data name="differentialFolderTar" from_work_dir="differentialFolder.tar" format="tar" label="Differential test files tar.gz">
+            <filter>tar</filter>
+        </data>
     </outputs>
     <tests>
         <test>
-            <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt"/>
+            <conditional name="tar_input_conditional">
+                <param name="tar_input_selector" value='interval_input'/>
+                <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt"/>
+            </conditional>
 
             <conditional name="batchmode_conditional">
                 <param name="batchmode_selector" value='optionBatchmode'/>
@@ -90,7 +122,11 @@
             <output name="rejectedFileNames" file="cHi-C/chicDifferentialTest/rejectedFilesList.txt" ftype="txt" compare="sim_size" delta='40000'/>
         </test>
         <test>
-            <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt"/>
+            <conditional name="tar_input_conditional">
+                <param name="tar_input_selector" value='interval_input'/>
+                <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt"/>
+
+            </conditional>
 
             <conditional name="batchmode_conditional">
                 <param name="batchmode_selector" value='optionSinglemode'/>
@@ -104,6 +140,45 @@
                 <element name="FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.txt" file="cHi-C/chicDifferentialTest/regular_mode_fisher/FL-E13-5_MB-E10-5_chr1_chr1_14300280_14300280_Eya1_results.txt" ftype="interval" lines_diff="4"/>
             </output_collection>
         </test>
+
+
+        <test>
+            <conditional name="tar_input_conditional">
+                <param name="tar_input_selector" value='interval_input'/>
+                <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_14300280_14300280_Eya1_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_4487435_4487435_Sox17_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt,cHi-C/chicAggregateStatistic/batch_mode/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d_aggregated.txt"/>
+            </conditional>
+
+            <conditional name="batchmode_conditional">
+                <param name="batchmode_selector" value='optionBatchmode'/>
+                <param name="interactionFilesOrderFile" value='cHi-C/chicAggregateStatistic/batch_mode_file_names.txt'/>
+            </conditional>
+            <param name="statisticTest_selector" value='chi2'/>
+            <param name="alpha" value='0.5'/>
+            <param name='tar' value='True'/>
+
+            <output name="differentialFolderTar" file="cHi-C/chicDifferentialTest/batch_mode_chi2.tar" ftype='tar' compare="sim_size" delta='40000' />
+
+            <output name="rejectedFileNames" file="cHi-C/chicDifferentialTest/rejectedFilesList.txt" ftype="txt" compare="sim_size" delta='40000'/>
+        </test>
+
+        <test>
+            <conditional name="tar_input_conditional">
+                <param name="tar_input_selector" value='tar_input'/>
+                <param name="interactionFiles" value="cHi-C/chicAggregateStatistic/batch_mode.tar"/>
+            </conditional>
+
+            <conditional name="batchmode_conditional">
+                <param name="batchmode_selector" value='optionBatchmode'/>
+                <param name="interactionFilesOrderFile" value='cHi-C/chicAggregateStatistic/batch_mode_file_names.txt'/>
+            </conditional>
+            <param name="statisticTest_selector" value='chi2'/>
+            <param name="alpha" value='0.5'/>
+            <param name='tar' value='True'/>
+
+            <output name="differentialFolderTar" file="cHi-C/chicDifferentialTest/batch_mode_chi2.tar" ftype='tar' compare="sim_size" delta='40000' />
+
+            <output name="rejectedFileNames" file="cHi-C/chicDifferentialTest/rejectedFilesList.txt" ftype="txt" compare="sim_size" delta='40000'/>
+        </test>
     </tests>
     <help><![CDATA[
 
Binary file test-data/cHi-C/chicAggregateStatistic/batch_mode.tar has changed
Binary file test-data/cHi-C/chicDifferentialTest/batch_mode_chi2.tar has changed
Binary file test-data/cHi-C/chicDifferentialTest/batch_mode_fisher_outfile.tar has changed
Binary file test-data/cHi-C/chicPlotViewpoint/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.png has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/plots.tar has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/two/Eya1_FL-E13-5_MB-E10-5_chr1_chr1_14300280.png has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/two/Sox17_FL-E13-5_MB-E10-5_chr1_chr1_4487435.png has changed
Binary file test-data/cHi-C/chicPlotViewpoint/batchMode/two/Tfap2d_FL-E13-5_MB-E10-5_chr1_chr1_19093103.png has changed
Binary file test-data/cHi-C/chicSignificantInteractions/significantFilesFolder.tar has changed
Binary file test-data/cHi-C/chicSignificantInteractions/targetFolder.tar has changed
Binary file test-data/cHi-C/chicViewpoint/output_1.tar has changed
Binary file test-data/cHi-C/chicViewpoint/viewpoints.tar has changed