Mercurial > repos > iuc > hal_hal2maf
comparison hal_hal2maf.xml @ 0:a3ff8225d554 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:29 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:a3ff8225d554 |
|---|---|
| 1 <tool id="hal_hal2maf" name="hal2maf" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description>converts HAL to MAF</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="stdio"/> | |
| 8 <command detect_errors="aggressive"><![CDATA[ | |
| 9 #if $file.append == 'true': | |
| 10 ## If an input MAF file is provided to append to, ensure that it is not modified. | |
| 11 cp '$input_maf' writable_maf.maf && | |
| 12 #end if | |
| 13 hal2maf | |
| 14 #if $file.append == 'true': | |
| 15 --append | |
| 16 #end if | |
| 17 #if $genome.reference == 'custom': | |
| 18 --refGenome '$genome.refGenome' | |
| 19 $genome.noAncestors | |
| 20 #end if | |
| 21 #if $filter.option == '--targetGenomes': | |
| 22 --targetGenomes '$filter.targetGenomes' | |
| 23 #else if $filter.option == '--rootGenome': | |
| 24 --rootGenome '$filter.rootGenome' | |
| 25 #end if | |
| 26 #if $convert.mode == 'sequence': | |
| 27 --refSequence '$convert.sequence' | |
| 28 --start $convert.start | |
| 29 --length $convert.length | |
| 30 #else if $convert.mode == 'target': | |
| 31 --refTargets '$convert.refTargets' | |
| 32 #else if $convert.mode == 'global': | |
| 33 --global | |
| 34 #end if | |
| 35 --maxRefGap $maxRefGap | |
| 36 --maxBlockLen $maxBlockLen | |
| 37 $noDupes | |
| 38 $onlySequenceNames | |
| 39 $unique | |
| 40 $printTree | |
| 41 $onlyOrthologs | |
| 42 $keepEmptyRefBlocks | |
| 43 '$input_hal' writable_maf.maf | |
| 44 #if $compression.type == 'gz': | |
| 45 && gzip -c writable_maf.maf > '$output_file' | |
| 46 #else if $compression.type == 'bz2': | |
| 47 && bzip2 -c writable_maf.maf > '$output_file' | |
| 48 #else: | |
| 49 && mv writable_maf.maf '$output_file' | |
| 50 #end if | |
| 51 ]]></command> | |
| 52 <inputs> | |
| 53 <expand macro="input_hal"/> | |
| 54 <expand macro="params_conditional_refGenome"/> | |
| 55 <conditional name="filter"> | |
| 56 <param name="option" type="select" label="Genomes to include in the output"> | |
| 57 <option value="" selected="true">All genomes (default)</option> | |
| 58 <option value="--targetGenomes">Specific target genomes (--targetGenomes)</option> | |
| 59 <option value="--rootGenome">Only genomes in the subtree to a root (--rootGenome)</option> | |
| 60 </param> | |
| 61 <when value=""/> | |
| 62 <when value="--targetGenomes"> | |
| 63 <expand macro="params_targetGenomes"/> | |
| 64 </when> | |
| 65 <when value="--rootGenome"> | |
| 66 <expand macro="params_rootGenome"/> | |
| 67 </when> | |
| 68 </conditional> | |
| 69 <conditional name="convert"> | |
| 70 <param name="mode" type="select" label="Convert options"> | |
| 71 <option value="" selected="true">All sequences (default)</option> | |
| 72 <option value="sequence">A reference sequence (--refSequence)</option> | |
| 73 <option value="target">Using reference intervals from a BED file (--refTargets)</option> | |
| 74 <option value="global">All columns in alignment, ignoring reference-based filters (--global)</option> | |
| 75 </param> | |
| 76 <when value=""/> | |
| 77 <when value="sequence"> | |
| 78 <expand macro="params_sequence"/> | |
| 79 <expand macro="params_start"/> | |
| 80 <expand macro="params_length"/> | |
| 81 </when> | |
| 82 <when value="target"> | |
| 83 <param name="refTargets" type="data" format="bed" label="BED file" help="BED file with reference genome intervals to convert. Only alignment columns overlapping these intervals are included"/> | |
| 84 </when> | |
| 85 <when value="global"/> | |
| 86 </conditional> | |
| 87 <conditional name="file"> | |
| 88 <param name="append" type="select" label="Append new alignment to an existing MAF file"> | |
| 89 <option value="false" selected="true">No, create a new MAF file (default)</option> | |
| 90 <option value="true">Yes, append to an existing MAF file (--append)</option> | |
| 91 </param> | |
| 92 <when value="true"> | |
| 93 <param name="input_maf" type="data" format="maf" label="MAF file"/> | |
| 94 </when> | |
| 95 <when value="false"/> | |
| 96 </conditional> | |
| 97 <param argument="--maxRefGap" type="integer" min="0" value="0" label="Maximum gap length" help="Maximum gap length in reference genome"/> | |
| 98 <param argument="--maxBlockLen" type="integer" min="0" value="1000" label="Maximum block length" help="Maximum length of MAF block in output"/> | |
| 99 <param argument="--noDupes" type="boolean" truevalue="--noDupes" falsevalue="" checked="false" label="Ignore paralogy edges" help="Ignore paralogy edges"/> | |
| 100 <expand macro="params_onlySequenceNames"/> | |
| 101 <param argument="--unique" type="boolean" truevalue="--unique" falsevalue="" checked="false" label="Unique" help="Only write column whose left-most reference coordinate is in the specified range. This is used to ensure that the same column isn't sampled twice (due to duplications) by MAFs generated on distinct ranges"/> | |
| 102 <param argument="--printTree" type="boolean" truevalue="--printTree" falsevalue="" checked="false" label="Print Tree" help="Print a gene tree for every block"/> | |
| 103 <param argument="--onlyOrthologs" type="boolean" truevalue="--onlyOrthologs" falsevalue="" checked="false" label="Only Orthologs" help="Make only orthologs to the reference appear in the MAF blocks"/> | |
| 104 <param argument="--keepEmptyRefBlocks" type="boolean" truevalue="--global" falsevalue="" checked="false" label="Keep empty reference blocks" help="Keep blocks that contain no reference sequence"/> | |
| 105 <expand macro="params_conditional_compression"/> | |
| 106 </inputs> | |
| 107 <outputs> | |
| 108 <data name="output_file" format="maf" label="${tool.name} on ${on_string}: MAF file"> | |
| 109 <change_format> | |
| 110 <when input="compression.type" value="gz" format="maf.gz"/> | |
| 111 <when input="compression.type" value="bz2" format="maf.bz2"/> | |
| 112 </change_format> | |
| 113 </data> | |
| 114 </outputs> | |
| 115 <tests> | |
| 116 <test expect_num_outputs="1"> | |
| 117 <param name="input_hal" value="halTest.hal"/> | |
| 118 <conditional name="filter"> | |
| 119 <param name="option" value=""/> | |
| 120 </conditional> | |
| 121 <output name="output_file" ftype="maf"> | |
| 122 <assert_contents> | |
| 123 <has_line line="##maf version=1 scoring=N/A"/> | |
| 124 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 125 <has_line line="a"/> | |
| 126 <has_text text="s	Genome_0.Genome_0_seq	293	293	+	1758"/> | |
| 127 <has_text text="s	Genome_1.Genome_1_seq	4571	117	+	5472"/> | |
| 128 <has_n_lines n="90"/> | |
| 129 </assert_contents> | |
| 130 </output> | |
| 131 </test> | |
| 132 <test expect_num_outputs="1"> | |
| 133 <param name="input_hal" value="halTest.hal"/> | |
| 134 <conditional name="filter"> | |
| 135 <param name="option" value=""/> | |
| 136 </conditional> | |
| 137 <conditional name="compression"> | |
| 138 <param name="type" value="gz"/> | |
| 139 </conditional> | |
| 140 <output name="output_file" ftype="maf.gz" file="hal2maf_output.maf.gz"/> | |
| 141 </test> | |
| 142 <test expect_num_outputs="1"> | |
| 143 <param name="input_hal" value="halTest.hal"/> | |
| 144 <conditional name="filter"> | |
| 145 <param name="option" value=""/> | |
| 146 </conditional> | |
| 147 <conditional name="compression"> | |
| 148 <param name="type" value="bz2"/> | |
| 149 </conditional> | |
| 150 <output name="output_file" ftype="maf.bz2" file="hal2maf_output.maf.bz2"/> | |
| 151 </test> | |
| 152 <test expect_num_outputs="1"> | |
| 153 <param name="input_hal" value="halTest.hal"/> | |
| 154 <conditional name="filter"> | |
| 155 <param name="option" value="--rootGenome"/> | |
| 156 <param name="rootGenome" value="Genome_1"/> | |
| 157 </conditional> | |
| 158 <param name="printTree" value="true"/> | |
| 159 <param name="onlySequenceNames" value="true"/> | |
| 160 <output name="output_file" ftype="maf"> | |
| 161 <assert_contents> | |
| 162 <has_line line="##maf version=1 scoring=N/A"/> | |
| 163 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 164 <has_text text="a tree="/> | |
| 165 <has_text text="Genome_1_seq,Genome_1_seq,Genome_2,Genome_3,Genome_3)Genome_0_seq;"/> | |
| 166 <has_text text="Genome_0_seq	293	293	+	1758"/> | |
| 167 <has_text text="s	Genome_1_seq	4864	117	+	5472"/> | |
| 168 <has_n_lines n="52"/> | |
| 169 </assert_contents> | |
| 170 </output> | |
| 171 </test> | |
| 172 <test expect_num_outputs="1"> | |
| 173 <param name="input_hal" value="halTest.hal"/> | |
| 174 <param name="maxBlockLen" value="200"/> | |
| 175 <param name="noDupes" value="true"/> | |
| 176 <output name="output_file" ftype="maf"> | |
| 177 <assert_contents> | |
| 178 <has_line line="##maf version=1 scoring=N/A"/> | |
| 179 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 180 <has_line line="a"/> | |
| 181 <has_text text="s	Genome_3.Genome_3_seq	4102	200	+	6139"/> | |
| 182 <has_text text="s	Genome_1.Genome_1_seq	3130	93	+	5472"/> | |
| 183 <has_text text="s	Genome_0.Genome_0_seq	1748	10	+	1758	CGCGTCGGCG"/> | |
| 184 <has_n_lines n="69"/> | |
| 185 </assert_contents> | |
| 186 </output> | |
| 187 </test> | |
| 188 <test expect_num_outputs="1"> | |
| 189 <param name="input_hal" value="halTest.hal"/> | |
| 190 <conditional name="genome"> | |
| 191 <param name="reference" value="custom"/> | |
| 192 <param name="refGenome" value="Genome_1"/> | |
| 193 <param name="noAncestors" value="true"/> | |
| 194 </conditional> | |
| 195 <param name="onlyOrthologs" value="true"/> | |
| 196 <output name="output_file" ftype="maf"> | |
| 197 <assert_contents> | |
| 198 <has_line line="##maf version=1 scoring=N/A"/> | |
| 199 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 200 <has_line line="a"/> | |
| 201 <has_text text="s	Genome_1.Genome_1_seq	5135	337	+	5472"/> | |
| 202 <has_text text="s	Genome_2.Genome_2_seq	2498	139	+	4270"/> | |
| 203 <has_text text="s	Genome_3.Genome_3_seq	4571	117	+	6139"/> | |
| 204 <has_n_lines n="230"/> | |
| 205 </assert_contents> | |
| 206 </output> | |
| 207 </test> | |
| 208 <test expect_num_outputs="1"> | |
| 209 <param name="input_hal" value="halTest.hal"/> | |
| 210 <conditional name="genome"> | |
| 211 <param name="reference" value="custom"/> | |
| 212 <param name="refGenome" value="Genome_1"/> | |
| 213 </conditional> | |
| 214 <param name="unique" value="true"/> | |
| 215 <output name="output_file" ftype="maf"> | |
| 216 <assert_contents> | |
| 217 <has_line line="##maf version=1 scoring=N/A"/> | |
| 218 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 219 <has_line line="a"/> | |
| 220 <has_text text="s	Genome_3.Genome_3_seq	1033	139	+	6139"/> | |
| 221 <has_text text="s	Genome_0.Genome_0_seq	1348	117	+	1758"/> | |
| 222 <has_text text="s	Genome_1.Genome_1_seq	5274	198	+	5472	NNNNNNNNNNNNNNNN"/> | |
| 223 <has_n_lines n="96"/> | |
| 224 </assert_contents> | |
| 225 </output> | |
| 226 </test> | |
| 227 <test expect_num_outputs="1"> | |
| 228 <param name="input_hal" value="halTest.hal"/> | |
| 229 <conditional name="genome"> | |
| 230 <param name="reference" value="custom"/> | |
| 231 <param name="refGenome" value="Genome_1"/> | |
| 232 </conditional> | |
| 233 <param name="maxRefGap" value="2000"/> | |
| 234 <output name="output_file" ftype="maf"> | |
| 235 <assert_contents> | |
| 236 <has_line line="##maf version=1 scoring=N/A"/> | |
| 237 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 238 <has_line line="a"/> | |
| 239 <has_text text="s	Genome_2.Genome_2_seq	2344	154	+	4270"/> | |
| 240 <has_text text="s	Genome_1.Genome_1_seq	1465	293	+	5472	----------------"/> | |
| 241 <has_text text="s	Genome_1.Genome_1_seq	3516	293	+	5472	NNNNNNNNNNNNNNNN"/> | |
| 242 <has_n_lines n="101"/> | |
| 243 </assert_contents> | |
| 244 </output> | |
| 245 </test> | |
| 246 <test expect_num_outputs="1"> | |
| 247 <param name="input_hal" value="halTest.hal"/> | |
| 248 <conditional name="convert"> | |
| 249 <param name="mode" value="sequence"/> | |
| 250 <param name="sequence" value="Genome_0_seq"/> | |
| 251 <param name="start" value="4"/> | |
| 252 <param name="length" value="10"/> | |
| 253 </conditional> | |
| 254 <output name="output_file" ftype="maf"> | |
| 255 <assert_contents> | |
| 256 <has_line line="##maf version=1 scoring=N/A"/> | |
| 257 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 258 <has_line line="a"/> | |
| 259 <has_line line="s	Genome_0.Genome_0_seq	4	10	+	1758	TCGGGGGGGA"/> | |
| 260 <has_line line="s	Genome_2.Genome_2_seq	4	10	+	4270	TCGGGGGGGA"/> | |
| 261 <has_line line="s	Genome_3.Genome_3_seq	4	10	+	6139	TCGGGGGGGA"/> | |
| 262 <has_n_lines n="11"/> | |
| 263 </assert_contents> | |
| 264 </output> | |
| 265 </test> | |
| 266 <test expect_num_outputs="1"> | |
| 267 <param name="input_hal" value="halTest.hal"/> | |
| 268 <conditional name="file"> | |
| 269 <param name="append" value="true"/> | |
| 270 <param name="input_maf" value="hal2maf_append.maf"/> | |
| 271 </conditional> | |
| 272 <conditional name="filter"> | |
| 273 <param name="option" value="--targetGenomes"/> | |
| 274 <param name="targetGenomes" value="Genome_2,Genome_3"/> | |
| 275 </conditional> | |
| 276 <output name="output_file" ftype="maf"> | |
| 277 <assert_contents> | |
| 278 <has_line line="##maf version=1 scoring=N/A"/> | |
| 279 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 280 <has_line line="a"/> | |
| 281 <has_text text="s	Genome_1.Genome_1_seq	0	293	+	5472"/> | |
| 282 <has_text text="s	Genome_3.Genome_3_seq	4395	176	+	6139"/> | |
| 283 <has_text text="s	Genome_1.Genome_1_seq	3223	176	+	5472"/> | |
| 284 <has_n_lines n="152"/> | |
| 285 </assert_contents> | |
| 286 </output> | |
| 287 </test> | |
| 288 <test expect_num_outputs="1"> | |
| 289 <param name="input_hal" value="halTest.hal"/> | |
| 290 <conditional name="convert"> | |
| 291 <param name="mode" value="global"/> | |
| 292 </conditional> | |
| 293 <output name="output_file" ftype="maf"> | |
| 294 <assert_contents> | |
| 295 <has_line line="##maf version=1 scoring=N/A"/> | |
| 296 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 297 <has_line line="a"/> | |
| 298 <has_text text="s	Genome_1.Genome_1_seq	3516	293	+	5472	NNNNNNNNNNNN"/> | |
| 299 <has_text text="s	Genome_2.Genome_2_seq	1465	293	+	4270	------------"/> | |
| 300 <has_text text="s	Genome_3.Genome_3_seq	4571	117	+	6139"/> | |
| 301 <has_n_lines n="113"/> | |
| 302 </assert_contents> | |
| 303 </output> | |
| 304 </test> | |
| 305 <test expect_num_outputs="1"> | |
| 306 <param name="input_hal" value="halTest.hal"/> | |
| 307 <conditional name="convert"> | |
| 308 <param name="mode" value="target"/> | |
| 309 <param name="refTargets" value="hal2maf.bed"/> | |
| 310 </conditional> | |
| 311 <output name="output_file" ftype="maf"> | |
| 312 <assert_contents> | |
| 313 <has_line line="##maf version=1 scoring=N/A"/> | |
| 314 <has_line line="# hal (Genome_1:1,Genome_2:1,Genome_3:1)Genome_0;"/> | |
| 315 <has_line line="a"/> | |
| 316 <has_text text="s	Genome_0.Genome_0_seq	0	293	+	1758"/> | |
| 317 <has_text text="s	Genome_2.Genome_2_seq	3516	293	+	4270"/> | |
| 318 <has_text text="s	Genome_3.Genome_3_seq	586	293	+	6139"/> | |
| 319 <has_n_lines n="24"/> | |
| 320 </assert_contents> | |
| 321 </output> | |
| 322 </test> | |
| 323 </tests> | |
| 324 <help><![CDATA[ | |
| 325 hal2maf converts an input HAL alignment into a MAF file as output. | |
| 326 The tool supports converting the full alignment or restricting output to a selected reference genome, reference sequence, a set of target genomes, or only genomes belonging to the subtree rooted at a root genome. | |
| 327 | |
| 328 Additional controls allow filtering for orthologs, excluding ancestral sequences, keeping empty reference blocks, limiting block size, and controlling reference gaps. | |
| 329 MAF blocks can also include gene tree annotations if requested. | |
| 330 ]]></help> | |
| 331 <expand macro="citation"/> | |
| 332 <expand macro="creator"/> | |
| 333 </tool> |
