view obiannotate.xml @ 4:d50dc96e3ce9 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/obitools commit dabf62d438facc62f3e606ff4419092fdcdfaa44
author iuc
date Wed, 20 Mar 2024 13:16:14 +0000
parents f82cefbbcea5
children
line wrap: on
line source

<tool id="obi_annotate" name="obiannotate" version="@TOOL_VERSION@" profile="@PROFILE@">
    <description>Adds/Edits sequence record annotations</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[
        @GUNZIP_INPUT@

        obiannotate
        --without-progress-bar
        ${seqrank}

        #if $rename_tag.old_name and $rename_tag.new_name
            -R '$rename_tag.old_name':'$rename_tag.new_name'
        #end if

        #if $deletetag_key
            --delete-tag='$deletetag_key'
        #end if

        #if $set_tag.key and $set_tag.pythonexpression
            -S '$set_tag.key':'$set_tag.pythonexpression'
        #end if

        #if $taglist
            --tag-list='$taglist'
        #end if

        #if $setid_pythonexpression
            --set-identifier='$setid_pythonexpression'
        #end if

        #if $pythonexpression
            --run='$pythonexpression'
        #end if

        #if $setsequence_pythonexpression
            --set-sequence='$setsequence_pythonexpression'
        #end if

        #if $setdefinition_pythonexpression
            --set-definition='$setdefinition_pythonexpression'
        #end if

        #if $key_selector.key
            --keep='$key_selector.key'
        #end if
        #if $key_selector.key2
            --keep='$key_selector.key2'
        #end if
        #if $key_selector.key3
            --keep='$key_selector.key3'
        #end if
        #if $key_selector.key4
            --keep='$key_selector.key4'
        #end if
        #if $key_selector.key5
            --keep='$key_selector.key5'
        #end if

        ${length}
        ${clearbool}
        ${uniqid}

        #if $rankname
            --with-taxon-at-rank='$rankname'
        #end if

        #if $mclfile
            --mcl='$mclfile'
        #end if
        @INPUT_FORMAT@
        @OUT_FORMAT@
        input
        @GZIP_OUTPUT@
        > '$output'
        
        @GENERATE_GALAXY_JSON@
    ]]></command>

    <inputs>
        <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file" />
        <param name="seqrank" type="boolean" label="Add a new attribute seq_rank" truevalue="--seq-rank" falsevalue="" help="Use this option if you want to add a new attribute named seq_rank to the sequence record indicating its entry number in the sequence file" />
        <section name="rename_tag" title="Rename attribute" expanded="False">
            <param name="old_name" type="text" label="old name" optional="true"/>
            <param name="new_name" type="text" label="new name" optional="true"/>
        </section>
        <param name="deletetag_key" type="text" label="Delete attribute" optional="true" help="Use this option if you want to delete attribute named ATTRIBUTE_NAME.When this attribute is missing, the sequence record is skipped and the next one is examined"/>

        <section name="set_tag" title="Create a new attribute" expanded="False">
            <param name="key" type="text" label="key" optional="true"/>
            <param name="pythonexpression" type="text" label="python expression" optional="true"/>
        </section>

        <param name="taglist" type="data" optional="true" format="txt,tabular" label="Use a tag list" help="file containing identifiers of sequences to select" />

        <param name="setid_pythonexpression" type="text" label="Set sequence record identifier with a value" help="Use this option if you want to set sequence record identifier with a value computed from PYTHON_EXPRESSION" />

        <param name="pythonexpression" type="text" label="Run a PYTHON_EXPRESSION on each selected sequence" optional="true" help="Use this option if you want to run a PYTHON_EXPRESSION on each selected sequence"/>

        <param name="setsequence_pythonexpression" type="text" label="Change the sequence itself with a value" help="Use this option if you want to change the sequence itself with a value computed from PYTHON_EXPRESSION"/>

        <param name="setdefinition_pythonexpression" type="text" label="Set sequence definition with a value computed" help="Use this option if you want to set sequence definition with a value computed from PYTHON_EXPRESSION"/>

        <param name="clearbool" type="boolean" label="Clear all attributes associated to the sequence records" truevalue="--clear" falsevalue="" help="Use this option if you want to clear all attributes associated to the sequence records" />

        <section name="key_selector" title="Keep only attribute with key" expanded="False">
            <param name="key" type="text" label="key" optional="true" />
            <param name="key2" type="text" label="if you want to specify a second key" optional="true" />
            <param name="key3" type="text" label="if you want to specify a third key" optional="true" />
            <param name="key4" type="text" label="if you want to specify a fourth key" optional="true" />
            <param name="key5" type="text" label="if you want to specify a fifth key" optional="true" />
        </section>

        <param name="length" type="boolean" label="Use the length option?" truevalue="--length" falsevalue="" help="Use this option if you want to add attribute with seq_length as a key and sequence length as a value" />

        <param name="rankname" type="text" label="Add taxonomic annotation" help="Use this option if you want to add taxonomic annotation at taxonomic rank RANK_NAME"/>

        <param name="mclfile" optional="true" type="data" format="txt,tabular" label="mcl file" help="use this option if you want to add a new attribute containing the number of the cluster the sequence record was assigned to, as indicated in file MCLFILE" />

        <param name="uniqid" type="boolean" label="Force sequence record ids to be unique"  truevalue="--uniq-id" falsevalue="" help="Use this option if you want to force sequence record ids to be unique" />
        <expand macro="input_format_options_macro"/>
        <expand macro="out_format_macro"/>
    </inputs>
    <outputs>
        <data name="output" format="auto"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input" value="output_obiuniq.fasta" ftype="fasta"/>
            <section name="key_selector">
                <param name="key" value="count"/>
                <param name="key2" value="merged_sample"/>
            </section>
            <param name="uniqid" value="true"/>
            <param name="clearbool" value="true"/>
            <param name="length" value="true"/>
            <param name="seqrank" value="true"/>

            <output name="output" file="output_obiannotate.fasta" ftype="fasta"/>
        </test>
        <test expect_num_outputs="1">
            <param name="input" value="output_obiuniq.fasta.gz" ftype="fasta.gz"/>
            <section name="key_selector">
                <param name="key" value="count"/>
                <param name="key2" value="merged_sample"/>
            </section>
            <param name="uniqid" value="true"/>
            <param name="clearbool" value="true"/>
            <param name="length" value="true"/>
            <param name="seqrank" value="true"/>
            <output name="output" file="output_obiannotate.fasta.gz" ftype="fasta.gz" decompress="true"/>
        </test>
        <!-- TODO fastq input test -->
    </tests>

    <help><![CDATA[

.. class:: infomark

**What it does**

`obiannotate` is the command that allows adding/modifying/removing annotation attributes attached to sequence records.

Once such attributes are added, they can be used by the other OBITools commands for filtering purposes or for statistics computing.

@OBITOOLS_LINK@

]]>

    </help>
    <expand macro="citation" />
</tool>