diff qiime2/qiime_feature-table_rename-ids.xml @ 14:a0a8d77a991c draft

Uploaded
author florianbegusch
date Thu, 03 Sep 2020 09:51:29 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qiime2/qiime_feature-table_rename-ids.xml	Thu Sep 03 09:51:29 2020 +0000
@@ -0,0 +1,118 @@
+<?xml version="1.0" ?>
+<tool id="qiime_feature-table_rename-ids" name="qiime feature-table rename-ids"
+      version="2020.8">
+  <description>Renames sample or feature ids in a table</description>
+  <requirements>
+    <requirement type="package" version="2020.8">qiime2</requirement>
+  </requirements>
+  <command><![CDATA[
+qiime feature-table rename-ids
+
+--i-table=$itable
+# 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
+
+
+#if str($paxis) != 'None':
+--p-axis=$paxis
+#end if
+
+#if $pstrict:
+ --p-strict
+#end if
+
+--o-renamed-table=orenamedtable
+
+#if str($examples) != 'None':
+--examples=$examples
+#end if
+
+;
+cp orenamedtable.qza $orenamedtable
+
+  ]]></command>
+  <inputs>
+    <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" />
+    <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 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" />
+    <param label="--p-axis: " name="paxis" optional="True" type="select">
+      <option selected="True" value="None">Selection is Optional</option>
+      <option value="sample">sample</option>
+      <option value="feature">feature</option>
+    </param>
+    <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" />
+    <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}: renamedtable.qza" name="orenamedtable" />
+    
+  </outputs>
+
+  <help><![CDATA[
+Renames sample or feature ids in a table
+###############################################################
+
+Renames the sample or feature ids in a feature table using metadata to
+define the new ids.
+
+Parameters
+----------
+table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
+    The table to be renamed
+metadata : 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.
+axis : Str % Choices('sample', 'feature'), optional
+    Along which axis to rename the ids.
+strict : Bool, optional
+    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.
+
+Returns
+-------
+renamed_table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
+    A table which has new ids, where the ids are replaced by values in the
+    `metadata` column.
+  ]]></help>
+  <macros>
+    <import>qiime_citation.xml</import>
+  </macros>
+  <expand macro="qiime_citation"/>
+</tool>
\ No newline at end of file