annotate qiime2/qiime_feature-table_rename-ids.xml @ 29:3ba9833030c1 draft

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