annotate qiime2-2020.8/qiime_feature-table_rename-ids.xml @ 20:d93d8888f0b0 draft

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