Mercurial > repos > iuc > hal_maf2hal
comparison hal_maf2hal.xml @ 0:2900728b299a 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:37:03 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:2900728b299a |
|---|---|
| 1 <tool id="hal_maf2hal" name="maf2hal" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | |
| 2 <description>imports MAF into HAL database</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <expand macro="stdio"/> | |
| 8 <command detect_errors="aggressive"> | |
| 9 <![CDATA[ | |
| 10 #if $mode.append == 'true': | |
| 11 ## If an input HAL file is provided to append to, ensure that it is not modified. | |
| 12 cp '$mode.input_hal' writable_hal.hal && | |
| 13 #end if | |
| 14 ## Uncompress input | |
| 15 #if $input_maf.ext.endswith('.gz'): | |
| 16 gunzip -c '$input_maf' > uncompressed_input.maf && | |
| 17 #else if $input_maf.ext.endswith('.bz2'): | |
| 18 bunzip2 -c '$input_maf' > uncompressed_input.maf && | |
| 19 #else | |
| 20 cp '$input_maf' uncompressed_input.maf && | |
| 21 #end if | |
| 22 maf2hal | |
| 23 #if $refGenome: | |
| 24 --refGenome '$refGenome' | |
| 25 #end if | |
| 26 #if $targetGenomes: | |
| 27 --targetGenomes '$targetGenomes' | |
| 28 #end if | |
| 29 #if $mode.append == 'true': | |
| 30 --append | |
| 31 #else if $mode.backend.format == 'mmap': | |
| 32 --format 'mmap' | |
| 33 --mmapFileSize $mode.backend.mmapFileSize | |
| 34 #end if | |
| 35 uncompressed_input.maf writable_hal.hal | |
| 36 ]]></command> | |
| 37 <inputs> | |
| 38 <param name="input_maf" type="data" format="maf,maf.gz,maf.bz2" label="MAF file"/> | |
| 39 <param argument="--refGenome" type="text" value="" optional="true" label="Reference genome" help="Name of the reference genome in the MAF file (first found if empty)"> | |
| 40 <expand macro="sanitizer_default"/> | |
| 41 <expand macro="validator_trim"/> | |
| 42 </param> | |
| 43 <expand macro="params_targetGenomes_optional"/> | |
| 44 <conditional name="mode"> | |
| 45 <param name="append" type="select" label="Output options"> | |
| 46 <option value="false" selected="true">Create a new HAL file (default)</option> | |
| 47 <option value="true">Append MAF as subtree to an existing HAL file (--append)</option> | |
| 48 </param> | |
| 49 <when value="false"> | |
| 50 <expand macro="hal_backend_format"/> | |
| 51 </when> | |
| 52 <when value="true"> | |
| 53 <expand macro="input_hal"/> | |
| 54 </when> | |
| 55 </conditional> | |
| 56 </inputs> | |
| 57 <outputs> | |
| 58 <data name="output_file" format="hal" label="${tool.name} on ${on_string}: HAL file" from_work_dir="writable_hal.hal"/> | |
| 59 </outputs> | |
| 60 <tests> | |
| 61 <test expect_num_outputs="1"> | |
| 62 <param name="input_maf" value="maf2halTest.maf"/> | |
| 63 <output name="output_file" ftype="hal"> | |
| 64 <assert_contents> | |
| 65 <has_size min="50000"/> | |
| 66 </assert_contents> | |
| 67 </output> | |
| 68 <assert_stdout> | |
| 69 <has_text text="Total Number of blocks in maf: 6"/> | |
| 70 </assert_stdout> | |
| 71 </test> | |
| 72 <test expect_num_outputs="1"> | |
| 73 <param name="input_maf" value="maf2halTest.maf.gz"/> | |
| 74 <output name="output_file" ftype="hal"> | |
| 75 <assert_contents> | |
| 76 <has_size min="50000"/> | |
| 77 </assert_contents> | |
| 78 </output> | |
| 79 <assert_stdout> | |
| 80 <has_text text="Total Number of blocks in maf: 6"/> | |
| 81 </assert_stdout> | |
| 82 </test> | |
| 83 <test expect_num_outputs="1"> | |
| 84 <param name="input_maf" value="maf2halTest.maf.bz2"/> | |
| 85 <output name="output_file" ftype="hal"> | |
| 86 <assert_contents> | |
| 87 <has_size min="50000"/> | |
| 88 </assert_contents> | |
| 89 </output> | |
| 90 <assert_stdout> | |
| 91 <has_text text="Total Number of blocks in maf: 6"/> | |
| 92 </assert_stdout> | |
| 93 </test> | |
| 94 <test expect_num_outputs="1"> | |
| 95 <param name="input_maf" value="maf2halTestAppend.maf"/> | |
| 96 <conditional name="mode"> | |
| 97 <param name="append" value="true"/> | |
| 98 <param name="input_hal" value="maf2halTestAppend.hal"/> | |
| 99 </conditional> | |
| 100 <output name="output_file" ftype="hal"> | |
| 101 <assert_contents> | |
| 102 <has_size min="70000"/> | |
| 103 </assert_contents> | |
| 104 </output> | |
| 105 <assert_stdout> | |
| 106 <has_text text="Total Number of blocks in maf: 1"/> | |
| 107 </assert_stdout> | |
| 108 </test> | |
| 109 <!-- | |
| 110 Disabled until mmap HAL format is allowed | |
| 111 <test expect_num_outputs="1"> | |
| 112 <param name="input_maf" value="maf2halTest.maf"/> | |
| 113 <conditional name="mode"> | |
| 114 <param name="append" value="false"/> | |
| 115 <conditional name="inputFormat"> | |
| 116 <param name="type" value="mmap"/> | |
| 117 <param name="mmapFileSize" value="1"/> | |
| 118 </conditional> | |
| 119 </conditional> | |
| 120 <assert_stdout> | |
| 121 <has_text text="Total Number of blocks in maf: 6"/> | |
| 122 </assert_stdout> | |
| 123 </test> | |
| 124 --> | |
| 125 </tests> | |
| 126 <help><![CDATA[ | |
| 127 maf2hal takes a MAF alignment as input and produces a HAL database as output. | |
| 128 It can build a new HAL file or attach the MAF as a subtree if the reference genome already exists as a leaf. | |
| 129 You can specify the reference genome and limit import to selected target genomes. | |
| 130 | |
| 131 ----- | |
| 132 | |
| 133 .. class:: warningmark | |
| 134 | |
| 135 Creating or importing a HAL file in mmap format can result in a corrupted HAL file. Run halValidate on the output HAL file before further analysis. | |
| 136 | |
| 137 .. class:: warningmark | |
| 138 | |
| 139 At the moment, creating a HAL file in mmap format is disabled. The creation in HDF5 format is enforced. | |
| 140 ]]></help> | |
| 141 <expand macro="citation"/> | |
| 142 <expand macro="creator"/> | |
| 143 </tool> |
