view samtools_reheader.xml @ 4:d7b4851d1971 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_reheader commit cd62639660bef041ba14ecff337fb98e84e75d8a
author iuc
date Mon, 20 Nov 2023 22:16:24 +0000
parents bb8cfc6f6e0c
children
line wrap: on
line source

<tool id="samtools_reheader" name="Samtools reheader" version="2.0.3" profile="@PROFILE@">
    <description>copy SAM/BAM header between datasets</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
        samtools reheader
            '${input_header}'
            '${input_file}'
            ${no_pg}
            > '${output}'
    ]]></command>
    <inputs>
        <param name="input_header" type="data" format="sam,bam" label="Select source dataset" help="Header from this dataset will be used to replace header in the target dataset. May be either SAM or BAM dataset."/>
        <param name="input_file" type="data" format="bam" label="Select target dataset" help="Header from the source dataset will be inserted here. Should be a BAM dataset."/>
        <param argument="--no-PG" name="no_pg" type="boolean" truevalue="--no-PG" falsevalue=""
        label="Keep the new header unmodified?"
        help="By default, samtools reheader will add itself to the chain of tools used to manipulate the target dataset, which will cause one or more @PG records to be inserted into the new header. If you want the output dataset to end up with the header of the source dataset exactly, you should activate this option." />
    </inputs>
    <outputs>
        <data format="bam" name="output" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <test>
            <param name="input_header" ftype="bam" value="reheader_input_header.bam"/>
            <param name="input_file" ftype="bam" value="reheader_input_file.bam"/>
            <output name="output" ftype="bam" file="reheader_out.bam" lines_diff="1"/><!-- samtools adds reheader line -->
        </test>
        <test>
            <param name="input_header" ftype="bam" value="reheader_input_header.bam"/>
            <param name="input_file" ftype="bam" value="reheader_input_file.bam"/>
            <param name="no_pg" value="true"/>
            <output name="output" ftype="bam" file="reheader_out.bam" />
        </test>
    </tests>
    <help>
**What it does**

Generates a new BAM dataset with the contents of *target* dataset, but the header of *source* dataset using the ``samtools reheader`` command.
    </help>
    <expand macro="citations"/>
</tool>