diff tabular_label_convert/tabular_label_convert.xml @ 0:1f93906c2945 draft default tip

Uploaded
author kellrott
date Sun, 18 Nov 2012 01:42:40 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tabular_label_convert/tabular_label_convert.xml	Sun Nov 18 01:42:40 2012 -0500
@@ -0,0 +1,65 @@
+<tool id="tabular_label_convert" name="Tabular Label Convert" version="1.0.0">
+  <description>Tabular Label Convert</description>
+  <command interpreter="python">tabular_label_convert.py -m ${dim} -c ${merge_mode} $intab $aliasMap -o $outfile</command>
+  <inputs>
+	  <param name="intab" type="data" format="tabular" label="Tabular Input"/>
+	  <param name="aliasMap" type="data" format="tabular" label="AliasMap"/>
+	  <param name="dim" type="select" label="Merge Across">
+	  	<option value="row">Rows</option>
+	  	<option value="col">Columns</option>
+	  </param>
+	  <param name="merge_mode" type="select" label="Merge Mode">
+	  	<option value="mean">Mean</option>
+	  	<option value="median">Median</option>
+	  	<option value="min">Min</option>
+	  	<option value="max">Max</option>
+	  </param>
+  </inputs>
+  <outputs>
+      <data name="outfile" format="tabular"/>
+  </outputs>
+  <help>
+This tool takes a tabular format file of numerical values and converts the labels of the 
+rows or columns using an alias map. If two or more labels map to the same alias, then the mean/median/min/max
+value is selected to represent the new alias.
+
+Input tabular format
+    A tab seperated matrix for floats, with the row and column serving as labels.
+
+
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|probe      |  sample_1            |  sample_2             |   sample_3            |  sample_4             |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|207189_s_at|     -0.210051        | -0.492633             | -0.133921             |  -0.462803            |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|207190_at  |    -0.427553         |  -0.021174            |-0.398800              | -0.518978             |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|216013_at  |     -0.764110        | -0.911805             | -1.450937             |  -1.201317            |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+
+Alias map format
+    A two column tab seperated files, the first column is the source label with the second column the destination alias.
+
++-------------+-----+
+|216013_at    |ZXDB |
++-------------+-----+
+|207189_s_at  |ZZEF1|
++-------------+-----+
+|207190_at    |ZZEF1|
++-------------+-----+
+
+Results
+    With the doing row relabel with 'mean' combination the matrix becomes:
+
+
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|probe      |  sample_1            |  sample_2             |   sample_3            |  sample_4             |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|ZZEF1      |     -0.3188020       | -0.2569035            | -0.2663605            | -0.4908905            |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+|ZXDB       |     -0.764110        | -0.911805             | -1.450937             |  -1.201317            |
++-----------+----------------------+-----------------------+-----------------------+-----------------------+
+
+
+  </help>
+</tool>