comparison qiime2-2020.8/qiime_feature-table_rename-ids.xml @ 0:5c352d975ef7 draft

Uploaded
author florianbegusch
date Thu, 03 Sep 2020 09:33:04 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:5c352d975ef7
1 <?xml version="1.0" ?>
2 <tool id="qiime_feature-table_rename-ids" name="qiime feature-table rename-ids"
3 version="2020.8">
4 <description>Renames sample or feature ids in a table</description>
5 <requirements>
6 <requirement type="package" version="2020.8">qiime2</requirement>
7 </requirements>
8 <command><![CDATA[
9 qiime feature-table rename-ids
10
11 --i-table=$itable
12 # if $input_files_mmetadatafile:
13 # def list_dict_to_string(list_dict):
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
15 # for d in list_dict[1:]:
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
17 # end for
18 # return $file_list
19 # end def
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
21 # end if
22
23 #if '__ob__' in str($mmetadatacolumn):
24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
26 #end if
27 #if '__cb__' in str($mmetadatacolumn):
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
30 #end if
31 #if 'X' in str($mmetadatacolumn):
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
34 #end if
35 #if '__sq__' in str($mmetadatacolumn):
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
38 #end if
39 #if '__db__' in str($mmetadatacolumn):
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
42 #end if
43
44 --m-metadata-column=$mmetadatacolumn
45
46
47 #if str($paxis) != 'None':
48 --p-axis=$paxis
49 #end if
50
51 #if $pstrict:
52 --p-strict
53 #end if
54
55 --o-renamed-table=orenamedtable
56
57 #if str($examples) != 'None':
58 --examples=$examples
59 #end if
60
61 ;
62 cp orenamedtable.qza $orenamedtable
63
64 ]]></command>
65 <inputs>
66 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴] The table to be renamed [required]" name="itable" optional="False" type="data" />
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 metadata column defining the new ids. Each original id must map to a new unique id. If strict mode is used, then every id in the original table must have a new id. [required]" name="mmetadatacolumn" optional="False" type="text" />
71 <param label="--p-axis: " name="paxis" optional="True" type="select">
72 <option selected="True" value="None">Selection is Optional</option>
73 <option value="sample">sample</option>
74 <option value="feature">feature</option>
75 </param>
76 <param label="--p-strict: --p-strict: / --p-no-strict Whether the naming needs to be strict (each id in the table must have a new id). Otherwise, only the ids described in `metadata` will be renamed and the others will keep their original id names. [default: False]" name="pstrict" selected="False" type="boolean" />
77 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
78
79 </inputs>
80
81 <outputs>
82 <data format="qza" label="${tool.name} on ${on_string}: renamedtable.qza" name="orenamedtable" />
83
84 </outputs>
85
86 <help><![CDATA[
87 Renames sample or feature ids in a table
88 ###############################################################
89
90 Renames the sample or feature ids in a feature table using metadata to
91 define the new ids.
92
93 Parameters
94 ----------
95 table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
96 The table to be renamed
97 metadata : MetadataColumn[Categorical]
98 A metadata column defining the new ids. Each original id must map to a
99 new unique id. If strict mode is used, then every id in the original
100 table must have a new id.
101 axis : Str % Choices('sample', 'feature'), optional
102 Along which axis to rename the ids.
103 strict : Bool, optional
104 Whether the naming needs to be strict (each id in the table must have a
105 new id). Otherwise, only the ids described in `metadata` will be
106 renamed and the others will keep their original id names.
107
108 Returns
109 -------
110 renamed_table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
111 A table which has new ids, where the ids are replaced by values in the
112 `metadata` column.
113 ]]></help>
114 <macros>
115 <import>qiime_citation.xml</import>
116 </macros>
117 <expand macro="qiime_citation"/>
118 </tool>