comparison cactus_export.xml @ 0:c18157c68134 draft

"planemo upload for repository https://github.com/usegalaxy-au/tools-au commit 8f8363625623f2ff3f04d12d227673ac134eba24"
author galaxy-australia
date Mon, 04 Apr 2022 06:26:16 +0000
parents
children 5bf688a3ee2c
comparison
equal deleted inserted replaced
-1:000000000000 0:c18157c68134
1 <tool id="cactus_export" name="Cactus: export" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@" license="MIT">
2 <description>whole-genome multiple sequence alignment to other formats.</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="xrefs"/>
7 <expand macro="requirements"/>
8 <command detect_errors="exit_code"><![CDATA[
9 ln -s '$hal_file' alignment.hal
10
11 ## make a MAF
12
13 #if $enable_maf.maf_selector:
14 &&
15 hal2maf alignment.hal
16 #if str($enable_maf.ref_level):
17 --refGenome $enable_maf.ref_level
18 #end if
19 alignment.maf
20 #end if
21
22 ## make a VG
23
24 #if $vg_selector:
25 &&
26 hal2vg alignment.hal
27 --hdf5InMemory
28 --chop 32
29 --progress
30 > alignment.pg
31 #end if
32
33 ]]></command>
34 <inputs>
35 <param name="hal_file" type="data" format="h5" label="HAL file" help="Multiple-genome alignment generated by Cactus" />
36 <conditional name="enable_maf">
37 <param name="maf_selector" type="boolean" checked="false" label="Generate a MAF file" />
38 <when value="true">
39 <param name="ref_level" type="text" optional="True" value="" label="Optional: reference genome for MAF" help="Specify one of the Input Genomes as the reference level for the Multiple Alignment Format (MAF) file. This must match the label used in 'Genome Label'. If nothing is specified, the first Input Genome will be the reference genome in the MAF file. This option doesn't affect the HAL output." />
40 </when>
41 <when value="false">
42 </when>
43 </conditional>
44 <param name="vg_selector" type="boolean" checked="false" label="Generate a VG file" />
45 </inputs>
46 <outputs>
47 <data name="out_maf" format="maf" from_work_dir="alignment.maf" label="${tool.name} on ${on_string} (MAF file)" >
48 <filter>enable_maf['maf_selector']</filter>
49 </data>
50 <data name="out_vg" format="vg" from_work_dir="alignment.pg" label="${tool.name} on ${on_string} (VG file)" >
51 <filter>vg_selector</filter>
52 </data>
53 </outputs>
54 <tests>
55 <!-- within-species mode -->
56 <test expect_num_outputs="1">
57 <conditional name="enable_maf">
58 <param name="maf_selector" value="true" />
59 </conditional>
60 <param name="hal_file" ftype="h5" value="evolverMammals.hal" />
61 <output name="out_maf" file="hal2maf.maf" />
62 </test>
63 <!-- set reference level -->
64 <test expect_num_outputs="1">
65 <conditional name="enable_maf">
66 <param name="maf_selector" value="true" />
67 <param name="ref_level" value="simMouse_chr6" />
68 </conditional>
69 <param name="hal_file" ftype="h5" value="within.hal" />
70 <output name="out_maf" file="set_reference.maf" />
71 </test>
72 <!-- between-species, select reference level -->
73 <test expect_num_outputs="1">
74 <conditional name="enable_maf">
75 <param name="maf_selector" value="true" />
76 <param name="ref_level" value="simMouse_chr6" />
77 </conditional>
78 <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" />
79 <output name="out_maf" file="evolverMammals_noroot.maf" />
80 </test>
81 <!-- vg format -->
82 <test expect_num_outputs="1">
83 <param name="vg_selector" value="true" />
84 <param name="hal_file" ftype="h5" value="within.hal" />
85 <output name="out_vg">
86 <assert_contents>
87 <has_size value="3586577" delta="200000" />
88 </assert_contents>
89 </output>
90 </test>
91 <!-- vg and maf with reference level -->
92 <test expect_num_outputs="2">
93 <conditional name="enable_maf">
94 <param name="maf_selector" value="true" />
95 <param name="ref_level" value="simMouse_chr6" />
96 </conditional>
97 <param name="vg_selector" value="true" />
98 <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" />
99 <output name="out_maf" file="evolverMammals_both.maf" />
100 <output name="out_vg" >
101 <assert_contents>
102 <has_size value="53055101" delta="200000" />
103 </assert_contents>
104 </output>
105 </test>
106 <!-- gfa format (gfa2): not implemented -->
107 </tests>
108 <help><![CDATA[
109 **What it does**
110
111 Converts the HAL output from `Cactus whole-genome multiple sequence
112 aligner <root?tool_id=cactus_cactus>`__ into other formats.
113
114 **Input**
115
116 A `HAL
117 file <https://github.com/ComparativeGenomicsToolkit/cactus#using-the-output>`__
118 from `Cactus <root?tool_id=cactus_cactus>`__.
119
120 **Output**
121
122 Currently, you can export a pangenome in VG format, for use with
123 `vg <https://github.com/vgteam/vg>`__, and/or Multiple Alignment Format
124 (MAF). Note that MAF is **reference-based**, so it will contain
125 alignments to a single reference from your list of inputs (i.e. not a
126 graph). By default, the first input genome will be used as the
127 reference. You can override this with the ‘reference genome’ option.
128 ]]></help>
129 <expand macro="citations"/>
130 </tool>