view hal_halRemoveGenome.xml @ 1:b1c9a12e9c5e draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/haltools commit f46096b336bf460424143fc9d633b5e7c20bf1cf
author iuc
date Thu, 05 Mar 2026 11:29:50 +0000
parents 28f7a9d287b4
children
line wrap: on
line source

<tool id="hal_halremovegenome" name="halRemoveGenome" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>removes a leaf genome in a HAL file</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 && 
        halRemoveGenome
            $noMarkAncestors
            writable_hal.hal '$deleteNode' &&
        ## 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="deleteNode" type="text" value="" label="Node name" help="Leaf genome to remove from tree">
            <expand macro="sanitizer_default"/>
            <expand macro="validator_trim"/>
        </param>
        <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="deleteNode" value="Genome_1"/>
            <output name="out_file" ftype="hal">
                <assert_contents>
                    <has_size min="50000"/>
                </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="deleteNode" value="Genome_1"/>
            <param name="noMarkAncestors" value="true"/>
            <output name="out_file" ftype="hal">
                <assert_contents>
                    <has_size min="50000"/>
                </assert_contents>
            </output>
            <assert_stdout>
                <has_line line="ok"/>
            </assert_stdout>
        </test>
    </tests>
    <help><![CDATA[
halRemoveGenome removes a specified leaf genome from the input HAL file and updates the tree structure accordingly. 
By default, ancestor nodes are marked for update to ensure consistency of the alignment after removal. 
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>