view count.groups.xml @ 2:e9f0381ec8e8 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
author iuc
date Tue, 20 Mar 2018 22:21:04 -0400
parents 6f454356bfc7
children dc3826bfc1ed
line wrap: on
line source

<tool profile="16.07" id="mothur_count_groups" name="Count.groups" version="@WRAPPER_VERSION@.0">
    <description>counts the number of sequences represented by a specific group or set of groups</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@SHELL_OPTIONS@

## create symlinks to input datasets
ln -s '$group' group.dat &&
#if $groupnames.source == "accnos":
    ln -s '$groupnames.accnos' groupnames.accnos.dat &&
#end if

echo 'count.groups(
    #if $group.is_of_type("mothur.shared"):
        shared=group.dat
    #elif $group.is_of_type("mothur.count_table"):
        count=group.dat
    #else:
        group=group.dat
    #end if
    #if $groupnames.source == "groups":
        #if $groupnames.groups:
            ,groups=${ str($groupnames.groups).replace(",","-") }
        #end if
    #elif $groupnames.source == "accnos":
        #if $groupnames.accnos:
            ,accnos=groupnames.accnos.dat
        #end if
    #end if
)'
| sed 's/ //g'  ## mothur trips over whitespace
| mothur
| tee mothur.out.log &&

## parse relevant tool output from logfile to file
cat mothur.*.logfile
| head -n-7
| sed '1,30d'
> '$grp_count'
    ]]></command>
    <inputs>
        <param name="group" type="data" format="mothur.groups,mothur.shared,mothur.count_table" label="group, shared, or count_table - Group file for sequence count"/>
        <conditional name="groupnames">
            <param name="source" type="select" label="Filter group names">
                <option value="none">Report on All Groups</option>
                <option value="groups">A List of Group Names</option>
                <option value="accnos">A History Group Name Accnos Dataset</option>
            </param>
            <when value="none"/>
            <when value="groups">
                <param name="groups" type="select" label="groups - Pick groups to include" multiple="true">
                    <help>All groups displayed if none are selected.</help>
                    <options>
                        <filter type="data_meta" ref="group" key="groups"/>
                    </options>
                </param>
            </when>
            <when value="accnos">
                <param name="accnos" type="data" format="mothur.accnos" optional="true" label="accnos - Group Names from your history"/>
            </when>
        </conditional>
        <expand macro="param-savelog"/>
    </inputs>
    <outputs>
        <expand macro="logfile-output"/>
        <data name="grp_count" format="tabular" label="${tool.name} on ${on_string}: group.count"/>
        <data name="summary" format="tabular" from_work_dir="group*.summary" label="${tool.name} on ${on_string}: summary"/>
    </outputs>
    <tests>
        <test>
            <param name="group" value="amazon.an.shared" ftype="mothur.shared"/>
            <output name="summary" md5="58508af98ed02e00a707f0f7812c2359"/>
            <output name="grp_count" md5="34ea2b8be163cf6c9c68d624d92fc73d"/>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
        <test>
            <param name="group" value="amazon.an.shared" ftype="mothur.shared"/>
            <param name="source" value="groups"/>
            <param name="groups" value="forest,pasture"/>
            <output name="summary" md5="58508af98ed02e00a707f0f7812c2359"/>
            <output name="grp_count" md5="34ea2b8be163cf6c9c68d624d92fc73d"/>
            <param name="savelog" value="true"/>
            <expand macro="logfile-test"/>
        </test>
    </tests>
    <help><![CDATA[

@MOTHUR_OVERVIEW@

**Command Documentation**

The count.groups_ command counts sequences from a specific group or set of groups from a group_ or shared_ file.

.. _shared: https://www.mothur.org/wiki/Shared_file
.. _group: https://www.mothur.org/wiki/Group_file
.. _count.groups: https://www.mothur.org/wiki/Count.groups

    ]]></help>
    <expand macro="citations"/>
</tool>