view qiime2/qiime_feature-table_group.xml @ 29:3ba9833030c1 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 13:12:49 +0000
parents
children
line wrap: on
line source

<?xml version="1.0" ?>
<tool id="qiime_feature-table_group" name="qiime feature-table group"
      version="2020.8">
  <description>Group samples or features by a metadata column</description>
  <requirements>
    <requirement type="package" version="2020.8">qiime2</requirement>
  </requirements>
  <command><![CDATA[
qiime feature-table group

--i-table=$itable

--p-axis=$paxis
# if $input_files_mmetadatafile:
  # def list_dict_to_string(list_dict):
    # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
    # for d in list_dict[1:]:
      # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
    # end for
    # return $file_list
  # end def
--m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
# end if

#if '__ob__' in str($mmetadatacolumn):
  #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
  #set $mmetadatacolumn = $mmetadatacolumn_temp
#end if
#if '__cb__' in str($mmetadatacolumn):
  #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
  #set $mmetadatacolumn = $mmetadatacolumn_temp
#end if
#if 'X' in str($mmetadatacolumn):
  #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
  #set $mmetadatacolumn = $mmetadatacolumn_temp
#end if
#if '__sq__' in str($mmetadatacolumn):
  #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
  #set $mmetadatacolumn = $mmetadatacolumn_temp
#end if
#if '__db__' in str($mmetadatacolumn):
  #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
  #set $mmetadatacolumn = $mmetadatacolumn_temp
#end if

--m-metadata-column=$mmetadatacolumn


--p-mode=$pmode

--o-grouped-table=ogroupedtable

#if str($examples) != 'None':
--examples=$examples
#end if

;
cp ogroupedtable.qza $ogroupedtable

  ]]></command>
  <inputs>
    <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] The table to group samples or features on.   [required]" name="itable" optional="False" type="data" />
    <param label="--p-axis: " name="paxis" optional="False" type="select">
      <option value="sample">sample</option>
      <option value="feature">feature</option>
    </param>
    <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
      <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
    </repeat>
    <param label="--m-metadata-column: COLUMN  MetadataColumn[Categorical] A column defining the groups. Each unique value will become a new ID for the table on the given `axis`. [required]" name="mmetadatacolumn" optional="False" type="text" />
    <param label="--p-mode: " name="pmode" optional="False" type="select">
      <option value="sum">sum</option>
      <option value="mean-ceiling">mean-ceiling</option>
      <option value="median-ceiling">median-ceiling</option>
    </param>
    <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
    
  </inputs>

  <outputs>
    <data format="qza" label="${tool.name} on ${on_string}: groupedtable.qza" name="ogroupedtable" />
    
  </outputs>

  <help><![CDATA[
Group samples or features by a metadata column
###############################################################

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

Parameters
----------
table : FeatureTable[Frequency]
    The table to group samples or features on.
axis : Str % Choices('sample', 'feature')
    Along which axis to group. Each ID in the given axis must exist in
    `metadata`.
metadata : MetadataColumn[Categorical]
    A column defining the groups. Each unique value will become a new ID
    for the table on the given `axis`.
mode : Str % Choices('sum', 'mean-ceiling', 'median-ceiling')
    How to combine samples or features within a group. `sum` will sum the
    frequencies across all samples or features within a group; `mean-
    ceiling` will take the ceiling of the mean of these frequencies;
    `median-ceiling` will take the ceiling of the median of these
    frequencies.

Returns
-------
grouped_table : FeatureTable[Frequency]
    A table that has been grouped along the given `axis`. IDs on that axis
    are replaced by values in the `metadata` column.
  ]]></help>
  <macros>
    <import>qiime_citation.xml</import>
  </macros>
  <expand macro="qiime_citation"/>
</tool>