comparison cactus_export.xml @ 0:a82a0acf4eb6 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/cactus commit 827619d22d2931d8fb34ed6844cfa91433e1ac2c
author iuc
date Tue, 06 Feb 2024 00:30:57 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:a82a0acf4eb6
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
10 ## check if the reference level was specified
11 #if $export_select.format in ['maf_selector', 'vg_selector']:
12 #if $export_select.ref_level == '':
13 echo "You must provide a reference level" &&
14 exit 1 ;
15 #end if
16 #end if
17
18 ln -s '$hal_file' alignment.hal
19
20 ## make a MAF
21 #if $export_select.format == 'maf_selector':
22 &&
23 hal2maf
24 --refGenome $export_select.ref_level
25 alignment.hal
26 alignment.maf
27 #end if
28
29 ## make an assemblyHub
30 #if $export_select.format == 'ah_selector':
31 &&
32 hal2assemblyHub.py
33 --maxCores \${GALAXY_SLOTS:-4}
34 --maxMemory \${GALAXY_MEMORY_MB:-8196}M
35 ./jobStore
36 alignment.hal
37 assemblyhub
38 &&
39 tar -cv assemblyhub > assemblyhub.tar
40 #end if
41
42 ## make a VG
43 #if $export_select.format == 'vg_selector':
44 &&
45 hal2vg alignment.hal
46 --progress
47 > alignment.pg
48 #end if
49
50 ]]></command>
51 <inputs>
52 <param name="hal_file" type="data" format="h5" label="HAL file" help="Multiple-genome alignment generated by Cactus"/>
53 <conditional name="export_select">
54 <param name="format" type="select" label="Output format" help="The type of output you want to export. Run this tool once for each output format.">
55 <option value="maf_selector" selected="true">MAF file</option>
56 <option value="ah_selector">Assembly Hub</option>
57 <option value="vg_selector">VG file</option>
58 </param>
59 <when value="maf_selector">
60 <param name="ref_level" type="text" value="" label="Reference genome" help="Specify one of the Input Genomes as the reference level. This must match the label used in 'Genome Label'."/>
61 </when>
62 <when value="ah_selector">
63 </when>
64 <when value="vg_selector">
65 <param name="ref_level" type="text" value="" label="Reference genome" help="Specify one of the Input Genomes as the reference level. This must match the label used in 'Genome Label'."/>
66 </when>
67 </conditional>
68 </inputs>
69 <outputs>
70 <data name="out_maf" format="maf" from_work_dir="alignment.maf" label="${tool.name} on ${on_string} (MAF file)">
71 <filter>export_select['format'] == 'maf_selector'</filter>
72 </data>
73 <data name="out_vg" format="vg" from_work_dir="alignment.pg" label="${tool.name} on ${on_string} (VG file)">
74 <filter>export_select['format'] == 'vg_selector'</filter>
75 </data>
76 <data name="out_ah" format="tar" from_work_dir="assemblyhub.tar" label="${tool.name} on ${on_string} (Assembly Hub)">
77 <filter>export_select['format'] == 'ah_selector'</filter>
78 </data>
79 </outputs>
80 <tests>
81 <!-- this fails because no reference level is set -->
82 <test expect_failure="true">
83 <conditional name="export_select">
84 <param name="format" value="maf_selector"/>
85 </conditional>
86 <param name="hal_file" ftype="h5" location="https://zenodo.org/record/8336793/files/evolverMammals.hal"/>
87 </test>
88 <!-- within-species mode -->
89 <test expect_num_outputs="1">
90 <conditional name="export_select">
91 <param name="ref_level" value="simMouse_chr6"/>
92 <param name="format" value="maf_selector"/>
93 </conditional>
94 <param name="hal_file" ftype="h5" location="https://zenodo.org/record/8336793/files/within.hal"/>
95 <output name="out_maf" location="https://zenodo.org/record/8336793/files/set_reference.maf"/>
96 </test>
97 <!-- between-species -->
98 <test expect_num_outputs="1">
99 <conditional name="export_select">
100 <param name="ref_level" value="simMouse_chr6"/>
101 <param name="format" value="maf_selector"/>
102 </conditional>
103 <param name="hal_file" ftype="h5" location="https://zenodo.org/record/8336793/files/evolverMammals_noroot.hal"/>
104 <output name="out_maf" location="https://zenodo.org/record/8336793/files/evolverMammals_noroot.maf"/>
105 </test>
106 <!-- assembly hub format -->
107 <test expect_num_outputs="1">
108 <conditional name="export_select">
109 <param name="format" value="ah_selector"/>
110 </conditional>
111 <param name="hal_file" ftype="h5" location="https://zenodo.org/record/8336793/files/within.hal"/>
112 <output name="out_ah">
113 <assert_contents>
114 <has_archive_member path="assemblyhub/hub.txt"/>
115 </assert_contents>
116 </output>
117 </test>
118 <!-- vg format -->
119 <test expect_num_outputs="1">
120 <conditional name="export_select">
121 <param name="format" value="vg_selector"/>
122 <param name="ref_level" value="simMouse_chr6"/>
123 </conditional>
124 <param name="hal_file" ftype="h5" location="https://zenodo.org/record/8336793/files/within.hal"/>
125 <output name="out_vg">
126 <assert_contents>
127 <has_size value="860452" delta="200000"/>
128 </assert_contents>
129 </output>
130 </test>
131 <!-- gfa format (gfa2): not implemented -->
132 </tests>
133 <help><![CDATA[
134 **What it does**
135
136 Converts the HAL output from `Cactus whole-genome multiple sequence
137 aligner <root?tool_id=cactus_cactus>`__ into other formats.
138
139 **Input**
140
141 A `HAL
142 file <https://github.com/ComparativeGenomicsToolkit/cactus#using-the-output>`__
143 from `Cactus <root?tool_id=cactus_cactus>`__.
144
145 **Output**
146
147 Currently, you can export a pangenome in VG format, for use with
148 `vg <https://github.com/vgteam/vg>`__, or Multiple Alignment Format
149 (MAF). Note that these files are **reference-based**, so it will contain
150 alignments to a single reference from your list of inputs (i.e. not a
151 graph). You have to provide this with the ‘reference genome’ option.
152
153 You can also export an Assembly Hub for use with the UCSC Genome Browser.
154 ]]></help>
155 <expand macro="citations"/>
156 </tool>