Mercurial > repos > iuc > hal_haladdtobranch
diff hal_halAddToBranch.xml @ 0:8d69e6b4aad3 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/haltools commit 6244b9d15a5ad97ae20191e2f8fbafe2050c3cac
| author | iuc |
|---|---|
| date | Fri, 06 Feb 2026 10:33:34 +0000 |
| parents | |
| children | 020607b4f91c |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hal_halAddToBranch.xml Fri Feb 06 10:33:34 2026 +0000 @@ -0,0 +1,104 @@ +<tool id="hal_haladdtobranch" name="halAddToBranch" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> + <description>adds a new internal node and leaf genome into an existing HAL </description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="stdio"/> + <command detect_errors="aggressive"><![CDATA[ + ## Copy input HAL to ensure that it is not modified. + cp '$input_hal' writable_hal.hal && + halAddToBranch + $noMarkAncestors + writable_hal.hal '$botAlignmentFile' '$topAlignmentFile' '$parentName' '$insertName' '$childName' '$leafName' '$upperBranchLength' '$leafBranchLength' && + ## echo 'ok' to check it with assert_stdout. This is needed because there is no other stdout output, + ## and the output HAL file checksum always changes even with identical inputs. + echo 'ok' + ]]></command> + <inputs> + <expand macro="input_hal"/> + <param name="insertName" type="text" value="" label="Insert name" help="Name of the new internal node to be created. Must be present in both top and bottom alignment files"> + <expand macro="sanitizer_default"/> + <expand macro="validator_trim"/> + </param> + <param name="parentName" type="text" value="" label="Parent name" help="Name of the existing genome in the main tree that will become the parent of the new insert node"> + <expand macro="sanitizer_default"/> + <expand macro="validator_trim"/> + </param> + <param name="childName" type="text" value="" label="Child name" help="Name of the existing genome that is being moved. It will be detached from the parent and re-attached to the new insert"> + <expand macro="sanitizer_default"/> + <expand macro="validator_trim"/> + </param> + <param name="leafName" type="text" value="" label="Leaf name" help="Name of the new leaf genome being added to the tree. Must be present in the bottom alignment file"> + <expand macro="sanitizer_default"/> + <expand macro="validator_trim"/> + </param> + <param name="topAlignmentFile" type="data" format="hal" label="Top alignment file" help="HAL file defining the connection between the parent and the new insert. A tree containing the insert, its parent, and its siblings"/> + <param name="botAlignmentFile" type="data" format="hal" label="Bottom alignment file" help="HAL file defining the subtree starting from the new insert node. A tree containing the insert, its children, and its new leaf genome"/> + <param name="upperBranchLength" type="float" min="0" label="Upper branch length" help="Length of branch from parent to insert"/> + <param name="leafBranchLength" type="float" min="0" label="Leaf branch length" help="Leaf branch length"/> + <expand macro="params_noMarkAncestors"/> + </inputs> + <outputs> + <data name="out_file" format="hal" label="${tool.name} on ${on_string}" from_work_dir="writable_hal.hal"/> + </outputs> + <tests> + <test expect_num_outputs="1"> + <param name="input_hal" value="halTest.hal"/> + <param name="botAlignmentFile" value="halAddToBranch_bot_input.hal"/> + <param name="topAlignmentFile" value="halAddToBranch_top_input.hal"/> + <param name="parentName" value="Genome_0"/> + <param name="insertName" value="Insert"/> + <param name="childName" value="Genome_2"/> + <param name="leafName" value="NewLeaf"/> + <param name="upperBranchLength" value="1"/> + <param name="leafBranchLength" value="1"/> + <output name="out_file" ftype="hal"> + <assert_contents> + <has_size min="80000"/> + </assert_contents> + </output> + <assert_stdout> + <has_line line="ok"/> + </assert_stdout> + </test> + <test expect_num_outputs="1"> + <param name="input_hal" value="halTest.hal"/> + <param name="botAlignmentFile" value="halAddToBranch_bot_input.hal"/> + <param name="topAlignmentFile" value="halAddToBranch_top_input.hal"/> + <param name="parentName" value="Genome_0"/> + <param name="insertName" value="Insert"/> + <param name="childName" value="Genome_2"/> + <param name="leafName" value="NewLeaf"/> + <param name="upperBranchLength" value="1"/> + <param name="leafBranchLength" value="1"/> + <param name="noMarkAncestors" value="true"/> + <output name="out_file" ftype="hal"> + <assert_contents> + <has_size min="80000"/> + </assert_contents> + </output> + <assert_stdout> + <has_line line="ok"/> + </assert_stdout> + </test> + </tests> + <help><![CDATA[ +halAddToBranch adds a new internal genome node and a new leaf genome to an input HAL alignment by splitting an existing branch. +A new internal node is inserted between a specified parent and child, and a new leaf genome is attached to that inserted node. +Bottom and top alignment files are required to correctly connect the inserted node to its descendants and ancestors. +By default, ancestor nodes are marked for update to ensure consistency of the alignment after replacement. +This behavior can be disabled when ancestor updates are not required. + +A new HAL file is created as output instead of modifying the input HAL file. + +----- + +.. class:: warningmark + +Running the tool on a HAL file in mmap format will fail because this format type is not supported by this tool. +It is recommended to convert the input to HDF5 format first using halExtract. + ]]></help> + <expand macro="citation"/> + <expand macro="creator"/> +</tool> \ No newline at end of file
