diff hal_hal2paf.xml @ 0:9951a0cc9a11 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/haltools commit 6244b9d15a5ad97ae20191e2f8fbafe2050c3cac
author iuc
date Fri, 06 Feb 2026 10:38:12 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hal_hal2paf.xml	Fri Feb 06 10:38:12 2026 +0000
@@ -0,0 +1,79 @@
+<tool id="hal_hal2paf" name="hal2paf" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>exports pairwise alignment to PAF</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements"/> 
+    <expand macro="stdio"/>
+    <command detect_errors="aggressive"><![CDATA[
+        hal2paf
+            #if $rootGenome:
+                --rootGenome '$rootGenome'
+            #end if
+            $onlySequenceNames
+            '$input_hal' > temp.paf
+            #if $compression.type == 'gz':
+                && gzip -c temp.paf > '$out_file'
+            #else:
+                && mv temp.paf '$out_file'
+            #end if
+    ]]></command>
+    <inputs>
+        <expand macro="input_hal"/>
+        <expand macro="params_rootGenome_optional"/>
+        <expand macro="params_onlySequenceNames"/>     
+        <conditional name="compression">
+            <param name="type" type="select" label="Compress output file">
+                <option value="" selected="true">Don't compress output file (default)</option>
+                <option value="gz">Compress output file to .gz</option>
+            </param>
+            <when value=""/>
+            <when value="gz"/>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="out_file" format="paf" label="${tool.name} on ${on_string}: PAF">
+            <change_format>
+                <when input="compression.type" value="gz" format="paf.gz"/>
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <output name="out_file" ftype="paf">
+                <assert_contents>
+                    <has_line line="Genome_1.Genome_1_seq&#009;5472&#009;0&#009;1465&#009;+&#009;Genome_0.Genome_0_seq&#009;1758&#009;0&#009;1465&#009;1465&#009;1465&#009;255&#009;cg:Z:1465M"/>   
+                    <has_line line="Genome_2.Genome_2_seq&#009;4270&#009;2051&#009;2344&#009;+&#009;Genome_0.Genome_0_seq&#009;1758&#009;293&#009;586&#009;293&#009;293&#009;255&#009;cg:Z:293M"/>    
+                    <has_line line="Genome_3.Genome_3_seq&#009;6139&#009;3809&#009;4688&#009;+&#009;Genome_0.Genome_0_seq&#009;1758&#009;586&#009;1465&#009;879&#009;879&#009;255&#009;cg:Z:879M"/>    
+                    <has_n_lines n="25"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <conditional name="compression">
+                <param name="type" value="gz"/>
+            </conditional>
+            <output name="out_file" ftype="paf.gz" file="hal2paf_output.paf.gz"/>
+        </test>
+        <test expect_num_outputs="1">
+            <param name="input_hal" value="halTest.hal"/>
+            <param name="rootGenome" value="Genome_0"/>
+            <param name="onlySequenceNames" value="true"/>
+            <output name="out_file" ftype="paf">
+                <assert_contents>
+                    <has_line line="Genome_1_seq&#009;5472&#009;0&#009;1465&#009;+&#009;Genome_0_seq&#009;1758&#009;0&#009;1465&#009;1465&#009;1465&#009;255&#009;cg:Z:1465M"/>   
+                    <has_line line="Genome_2_seq&#009;4270&#009;2051&#009;2344&#009;+&#009;Genome_0_seq&#009;1758&#009;293&#009;586&#009;293&#009;293&#009;255&#009;cg:Z:293M"/>    
+                    <has_line line="Genome_3_seq&#009;6139&#009;3809&#009;4688&#009;+&#009;Genome_0_seq&#009;1758&#009;586&#009;1465&#009;879&#009;879&#009;255&#009;cg:Z:879M"/>    
+                    <has_n_lines n="25"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+hal2paf exports each branch of an input HAL file as a pairwise alignment in PAF format. 
+    ]]></help>
+    <expand macro="citation"/>
+    <expand macro="creator"/>
+</tool>
\ No newline at end of file