comparison qiime2-2020.8/qiime_feature-table_group.xml @ 20:d93d8888f0b0 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 12:44:24 +0000
parents
children
comparison
equal deleted inserted replaced
19:6c48f8d82424 20:d93d8888f0b0
1 <?xml version="1.0" ?>
2 <tool id="qiime_feature-table_group" name="qiime feature-table group"
3 version="2020.8">
4 <description>Group samples or features by a metadata column</description>
5 <requirements>
6 <requirement type="package" version="2020.8">qiime2</requirement>
7 </requirements>
8 <command><![CDATA[
9 qiime feature-table group
10
11 --i-table=$itable
12
13 --p-axis=$paxis
14 # if $input_files_mmetadatafile:
15 # def list_dict_to_string(list_dict):
16 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
17 # for d in list_dict[1:]:
18 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
19 # end for
20 # return $file_list
21 # end def
22 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
23 # end if
24
25 #if '__ob__' in str($mmetadatacolumn):
26 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
27 #set $mmetadatacolumn = $mmetadatacolumn_temp
28 #end if
29 #if '__cb__' in str($mmetadatacolumn):
30 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
31 #set $mmetadatacolumn = $mmetadatacolumn_temp
32 #end if
33 #if 'X' in str($mmetadatacolumn):
34 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
35 #set $mmetadatacolumn = $mmetadatacolumn_temp
36 #end if
37 #if '__sq__' in str($mmetadatacolumn):
38 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
39 #set $mmetadatacolumn = $mmetadatacolumn_temp
40 #end if
41 #if '__db__' in str($mmetadatacolumn):
42 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
43 #set $mmetadatacolumn = $mmetadatacolumn_temp
44 #end if
45
46 --m-metadata-column=$mmetadatacolumn
47
48
49 --p-mode=$pmode
50
51 --o-grouped-table=ogroupedtable
52
53 #if str($examples) != 'None':
54 --examples=$examples
55 #end if
56
57 ;
58 cp ogroupedtable.qza $ogroupedtable
59
60 ]]></command>
61 <inputs>
62 <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" />
63 <param label="--p-axis: " name="paxis" optional="False" type="select">
64 <option value="sample">sample</option>
65 <option value="feature">feature</option>
66 </param>
67 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
68 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
69 </repeat>
70 <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" />
71 <param label="--p-mode: " name="pmode" optional="False" type="select">
72 <option value="sum">sum</option>
73 <option value="mean-ceiling">mean-ceiling</option>
74 <option value="median-ceiling">median-ceiling</option>
75 </param>
76 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
77
78 </inputs>
79
80 <outputs>
81 <data format="qza" label="${tool.name} on ${on_string}: groupedtable.qza" name="ogroupedtable" />
82
83 </outputs>
84
85 <help><![CDATA[
86 Group samples or features by a metadata column
87 ###############################################################
88
89 Group samples or features in a feature table using metadata to define the
90 mapping of IDs to a group.
91
92 Parameters
93 ----------
94 table : FeatureTable[Frequency]
95 The table to group samples or features on.
96 axis : Str % Choices('sample', 'feature')
97 Along which axis to group. Each ID in the given axis must exist in
98 `metadata`.
99 metadata : MetadataColumn[Categorical]
100 A column defining the groups. Each unique value will become a new ID
101 for the table on the given `axis`.
102 mode : Str % Choices('sum', 'mean-ceiling', 'median-ceiling')
103 How to combine samples or features within a group. `sum` will sum the
104 frequencies across all samples or features within a group; `mean-
105 ceiling` will take the ceiling of the mean of these frequencies;
106 `median-ceiling` will take the ceiling of the median of these
107 frequencies.
108
109 Returns
110 -------
111 grouped_table : FeatureTable[Frequency]
112 A table that has been grouped along the given `axis`. IDs on that axis
113 are replaced by values in the `metadata` column.
114 ]]></help>
115 <macros>
116 <import>qiime_citation.xml</import>
117 </macros>
118 <expand macro="qiime_citation"/>
119 </tool>