view qiime2__feature_table__group.xml @ 4:d8d9cde18805 draft

planemo upload for repository https://github.com/qiime2/galaxy-tools/tree/main/tools/suite_qiime2__feature_table commit c7e80dcda727ce63b42aa8a946e9330310929797
author q2d2
date Mon, 03 Jun 2024 23:25:57 +0000
parents 8bf7f0d38fe7
children 4acd06f54adc
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<!--
Copyright (c) 2024, QIIME 2 development team.

Distributed under the terms of the Modified BSD License. (SPDX: BSD-3-Clause)
-->
<!--
This tool was automatically generated by:
    q2galaxy (version: 2024.5.0)
for:
    qiime2 (version: 2024.5.0)
-->
<tool name="qiime2 feature-table group" id="qiime2__feature_table__group" version="2024.5.0+q2galaxy.2024.5.0" profile="22.05" license="BSD-3-Clause">
    <description>Group samples or features by a metadata column</description>
    <requirements>
        <container type="docker">quay.io/qiime2/amplicon:2024.5</container>
    </requirements>
    <version_command>q2galaxy version feature_table</version_command>
    <command detect_errors="exit_code">q2galaxy run feature_table group '$inputs'</command>
    <configfiles>
        <inputs name="inputs" data_style="staging_path_and_source_path"/>
    </configfiles>
    <inputs>
        <param name="table" type="data" format="qza" label="table: FeatureTable[Frequency]" help="[required]  The table to group samples or features on.">
            <options options_filter_attribute="metadata.semantic_type">
                <filter type="add_value" value="FeatureTable[Frequency]"/>
            </options>
            <validator type="expression" message="Incompatible type">hasattr(value.metadata, "semantic_type") and value.metadata.semantic_type in ['FeatureTable[Frequency]']</validator>
        </param>
        <param name="axis" type="select" label="axis: Str % Choices('feature', 'sample')" display="radio">
            <option value="__q2galaxy__::literal::None">Selection required</option>
            <option value="feature">feature</option>
            <option value="sample">sample</option>
            <validator type="expression" message="Please verify this parameter.">value != '__q2galaxy__::literal::None'</validator>
        </param>
        <conditional name="metadata">
            <param name="type" type="select" label="metadata: MetadataColumn[Categorical]" help="[required]  A column defining the groups. Each unique value will become a new ID for the table on the given `axis`.">
                <option value="tsv" selected="true">Metadata from TSV</option>
                <option value="qza">Metadata from Artifact</option>
            </param>
            <when value="tsv">
                <param name="source" type="data" format="tabular,qiime2.tabular" label="Metadata Source"/>
                <param name="column" type="data_column" label="Column Name" data_ref="source" use_header_names="true">
                    <validator type="expression" message="The first column cannot be selected (they are IDs).">value != "1"</validator>
                </param>
            </when>
            <when value="qza">
                <param name="source" type="data" format="qza" label="Metadata Source"/>
                <param name="column" type="text" label="Column Name">
                    <validator type="empty_field"/>
                </param>
            </when>
        </conditional>
        <param name="mode" type="select" label="mode: Str % Choices('mean-ceiling', 'median-ceiling', 'sum')" display="radio">
            <option value="__q2galaxy__::literal::None">Selection required</option>
            <option value="mean-ceiling">mean-ceiling</option>
            <option value="median-ceiling">median-ceiling</option>
            <option value="sum">sum</option>
            <validator type="expression" message="Please verify this parameter.">value != '__q2galaxy__::literal::None'</validator>
        </param>
    </inputs>
    <outputs>
        <data name="grouped_table" format="qza" label="${tool.name} on ${on_string}: grouped_table.qza" from_work_dir="grouped_table.qza"/>
    </outputs>
    <tests>
        <test>
            <param name="table" value="group.test0.feature-table.qza" ftype="qza"/>
            <param name="axis" value="sample"/>
            <conditional name="metadata">
                <param name="type" value="tsv"/>
                <param name="source" value="group.test0.sample-metadata.tsv" ftype="qiime2.tabular"/>
                <param name="column" value="3"/>
            </conditional>
            <param name="mode" value="median-ceiling"/>
            <output name="grouped_table" ftype="qza">
                <assert_contents>
                    <has_archive_member path="[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}\/metadata.yaml">
                        <has_line_matching expression="type: FeatureTable\[Frequency\]"/>
                    </has_archive_member>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
QIIME 2: feature-table group
============================
Group samples or features by a metadata column


Outputs:
--------
:grouped_table.qza: A table that has been grouped along the given `axis`. IDs on that axis are replaced by values in the `metadata` column.

|  

Description:
------------
Group samples or features in a feature table using metadata to define the mapping of IDs to a group.

Examples:
---------

group_samples
*************
| Combine samples from the same body-site into single sample. Feature frequencies will be the median across the samples being combined, rounded up to the nearest whole number.
Using the ``qiime2 feature-table group`` tool:
 #. Set *"table"* to ``#: feature-table.qza``
 #. Set *"axis"* to ``sample``
 #. For *"metadata"*:

    #. Leave as ``Metadata from TSV``
    #. Set *"Metadata Source"* to ``sample-metadata.tsv``
    #. Set *"Column Name"* to ``body-site``

 #. Set *"mode"* to ``median-ceiling``
 #. Press the ``Execute`` button.

Once completed, for the new entry in your history, use the ``Edit`` button to set the name as follows:
 (Renaming is optional, but it will make any subsequent steps easier to complete.)

 .. list-table::
    :align: left
    :header-rows: 1

    * - History Name
      - *"Name"* to set (be sure to press ``Save``)
    * - ``#: qiime2 feature-table group [...] : grouped_table.qza``
      - ``body-site-table.qza``


|  

</help>
    <citations>
        <citation type="doi">10.1038/s41587-019-0209-9</citation>
    </citations>
</tool>