diff chicViewpoint.xml @ 8:f881c94fb3b3 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 07802a6bd441d9da888cfb8283f8c2135704f7c9
author iuc
date Wed, 18 Oct 2023 10:44:35 +0000
parents dbfd2cfc0f66
children
line wrap: on
line diff
--- a/chicViewpoint.xml	Tue Jan 10 19:01:02 2023 +0000
+++ b/chicViewpoint.xml	Wed Oct 18 10:44:35 2023 +0000
@@ -8,7 +8,6 @@
     <command detect_errors="exit_code"><![CDATA[
         #import re
 
-        mkdir interactionFiles &&
         #for $m in $matrix_h5_cooler_multiple:
             #set identifier = @ESCAPE_IDENTIFIER_M@
             ln -s '$m' '$identifier' &&
@@ -21,46 +20,24 @@
             --referencePoints '$referencePoints'
             --averageContactBin $averageContactBin
             --fixateRange $fixateRange
-            --decimalPlaces $decimalPlaces
             --threads @THREADS@
             --backgroundModelFile '$backgroundModelFile'
-            --outputFolder interactionFiles
-            $writeFileNamesToFile
-        
-        #if $tar:
-            && cd interactionFiles
-            && tar -cvf ../viewpoints.tar .
-            && cd ..
-            && rm -rf interactionFiles
-        #end if
+            --outFileName interactionFiles.hdf5
 
     ]]>    </command>
     <inputs>
         <expand macro="matrix_h5_cooler_multiple_macro" />
 
-        <param argument="--referencePoints" type="data" format='interval' label="Reference points" help="Bed file contains all reference points which should be used to create viewpoints." />
-        <param name="rangeUpstream" type="integer" value="500000" label="Upstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' />
-        <param name="rangeDownstream" type="integer" value="500000" label="Downstream range" help='Defines the region upstream of a reference point which should be considered in the analysis.' />
+        <param argument="--referencePoints" type="data" format="interval" label="Reference points" help="Bed file contains all reference points which should be used to create viewpoints." />
+        <param name="rangeUpstream" type="integer" value="500000" label="Upstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
+        <param name="rangeDownstream" type="integer" value="500000" label="Downstream range" help="Defines the region upstream of a reference point which should be considered in the analysis." />
 
-        <param argument="--backgroundModelFile" type="data" format='tabular' label="Background model" help="The background file computed by chicViewpointBackgroundModel" />
-        <param argument="--averageContactBin" type="integer" value="5" label="Average contacts window size" help='Average the contacts of n bins via a sliding window approach.' />
-        <param argument="--fixateRange" type="integer" value="500000" label="Clip background distance" help='Fixate score of background model starting at distance x. E.g. all values greater 500kb are set to the value of the 500kb bin.' />
-        <param argument="--decimalPlaces" type="integer" value="12" label="Decimal places for output" help='Decimal places for all floating value in the output.' />
-
-        <param name='writeFileNamesToFile' type='boolean' truevalue='--writeFileNamesToFile interactionFiles.txt' falsevalue="" checked="false" label="Save interaction file names (batch processing)" help="Set this parameter if you want to use the batch processing mode for the further analysis." />
-        <param name='tar' type='boolean' checked="false" 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." />
-
+        <param argument="--backgroundModelFile" type="data" format="tabular" label="Background model" help="The background file computed by chicViewpointBackgroundModel" />
+        <param argument="--averageContactBin" type="integer" value="5" label="Average contacts window size" help="Average the contacts of n bins via a sliding window approach." />
+        <param argument="--fixateRange" type="integer" value="500000" label="Clip background distance" help="Fixate score of background model starting at distance x. E.g. all values greater 500kb are set to the value of the 500kb bin." />
     </inputs>
     <outputs>
-        <collection name="interactionFilesCollection" type="list" label="Interaction files">
-            <discover_datasets pattern="__name__" format="interval" directory="interactionFiles" />
-        </collection>
-        <data name="interactionFileNames" from_work_dir="interactionFiles.txt" format="txt" label="${tool.name} interaction file names">
-            <filter>writeFileNamesToFile</filter>
-        </data>
-        <data name="interactionFilesTar" from_work_dir="viewpoints.tar" format="tar" label="${tool.name} interaction file names tar">
-            <filter>tar</filter>
-        </data>
+        <data name="interactionFileNames" from_work_dir="interactionFiles.hdf5" format="h5" label="${tool.name} interaction file" />
     </outputs>
     <tests>
         <test>
@@ -70,98 +47,15 @@
             <param name="fixateRange" value="500000" />
             <param name="rangeUpstream" value="200000" />
             <param name="rangeDownstream" value="200000" />
-            <param name="writeFileNamesToFile" value="True" />
-
-            <output_collection name="interactionFilesCollection" type="list" count="6">
-                <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt" ftype="interval" lines_diff="3" />
-                <element name="FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt" ftype="interval" lines_diff="3" />
-                <element name="FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="18895000" />
-                        <has_text text="chr1" />
-                        <has_text text="Tfap2d" />
-                        <has_text text="interactions" />
-                        <has_text text="472.0" />
-                    </assert_contents>
-                </element>
-                <element name="MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt" ftype="interval" lines_diff="3" />
-                <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="14100000" />
-                        <has_text text="chr1" />
-                        <has_text text="Eya1" />
-                        <has_text text="interactions" />
-                        <has_text text="832.0" />
-                    </assert_contents>
-                </element>
-                <element name="MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="4455000" />
-                        <has_text text="chr1" />
-                        <has_text text="Sox17" />
-                        <has_text text="interactions" />
-                        <has_text text="978.0" />
-                        <has_text text="-30000" />
-                    </assert_contents>
-                </element>
-            </output_collection>
-            <output name="interactionFileNames" file="cHi-C/chicViewpoint/fileNames_two_matrices.txt" ftype="txt" lines_diff='0' />
-        </test>
-        <test>
-            <param name="matrix_h5_cooler_multiple" value="cHi-C/FL-E13-5_chr1.cool,cHi-C/MB-E10-5_chr1.cool" />
-            <param name="referencePoints" value="cHi-C/referencePoints_chicViewpoint.bed" />
-            <param name="backgroundModelFile" value="cHi-C/background.txt" />
-            <param name="fixateRange" value="500000" />
-            <param name="rangeUpstream" value="200000" />
-            <param name="rangeDownstream" value="200000" />
-            <param name="writeFileNamesToFile" value="False" />
-            <output_collection name="interactionFilesCollection" type="list" count="6">
-                <element name="FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_14300280_14300280_Eya1.txt" ftype="interval" lines_diff="3" />
-                <element name="FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt" file="cHi-C/chicViewpoint/output_3/FL-E13-5_chr1_chr1_4487435_4487435_Sox17.txt" ftype="interval" lines_diff="3" />
-                <element name="FL-E13-5_chr1_chr1_19093103_19093103_Tfap2d.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="18893000" />
-                        <has_text text="chr1" />
-                        <has_text text="Tfap2d" />
-                        <has_text text="interactions" />
-                        <has_text text="472.0" />
-                    </assert_contents>
-                </element>
-                <element name="MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt" file="cHi-C/chicViewpoint/output_3/MB-E10-5_chr1_chr1_19093103_19093103_Tfap2d.txt" ftype="interval" lines_diff="3" />
-                <element name="MB-E10-5_chr1_chr1_14300280_14300280_Eya1.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="14103000" />
-                        <has_text text="chr1" />
-                        <has_text text="Eya1" />
-                        <has_text text="interactions" />
-                        <has_text text="832.0" />
-                        <has_text text="-199000" />
-                    </assert_contents>
-                </element>
-                <element name="MB-E10-5_chr1_chr1_4487435_4487435_Sox17.txt" ftype="interval">
-                    <assert_contents>
-                        <has_text text="4455000" />
-                        <has_text text="chr1" />
-                        <has_text text="Sox17" />
-                        <has_text text="interactions" />
-                        <has_text text="978.0" />
-                        <has_text text="-30000" />
-                    </assert_contents>
-                </element>
-            </output_collection>
-            <!-- <output name="interactionFileNames" file="cHi-C/chicViewpoint/fileNames_two_matrices.txt" ftype="txt" lines_diff='0'/> -->
-        </test>
-        <test>
-            <param name="matrix_h5_cooler_multiple" value="cHi-C/FL-E13-5_chr1.cool,cHi-C/MB-E10-5_chr1.cool" />
-            <param name="referencePoints" value="cHi-C/referencePoints_chicViewpoint.bed" />
-            <param name="backgroundModelFile" value="cHi-C/background.txt" />
-            <param name="fixateRange" value="500000" />
-            <param name="rangeUpstream" value="200000" />
-            <param name="rangeDownstream" value="200000" />
-            <param name="writeFileNamesToFile" value="True" />
-            <param name='tar' value='True' />
-            <output name="interactionFilesTar" file="cHi-C/chicViewpoint/viewpoints.tar" ftype='tar' compare="sim_size" delta='40000' />
-            <output name="interactionFileNames" file="cHi-C/chicViewpoint/fileNames_two_matrices.txt" ftype="txt" lines_diff='0' />
+            <output name="interactionFileNames" ftype="h5">
+                <assert_contents>
+                    <has_h5_attribute key="averageContactBin" value="5" />
+                    <has_h5_attribute key="fixateRange" value="500000" />
+                    <!-- <has_h5_attribute key="range" value="200000,200000" /> -->
+                    <has_h5_attribute key="resolution" value="1000" />
+                    <has_h5_attribute key="type" value="interactions" />
+                </assert_contents>
+            </output>
         </test>
     </tests>
     <help><![CDATA[