diff replace_delimiter/replace_delimiter.xml @ 0:295395b4b28f draft default tip

Uploaded
author saket-choudhary
date Tue, 07 Oct 2014 19:43:01 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/replace_delimiter/replace_delimiter.xml	Tue Oct 07 19:43:01 2014 -0400
@@ -0,0 +1,65 @@
+<tool id="convertdelimiter" name="Convert">
+  <description>delimiters</description>
+  <command interpreter="python">replace_delimiter.py $input $convert_from $convert_to $out_file1</command>
+  <inputs>
+    <param name="convert_from" type="select" label="Convert all">
+      <option value="s">Whitespaces</option>
+      <option value="T">Tabs</option>
+      <option value="Dt">Dots</option>
+      <option value="C">Commas</option>
+      <option value="D">Dashes</option>
+      <option value="U">Underscores</option>
+      <option value="P">Pipes</option>
+      <option value="Co">Colons</option>
+      <option value="Sc">Semicolons</option>
+    </param>
+    <param format="txt" name="input" type="data" label="in Dataset"/>
+    <param name="convert_to" type="select" label="to ">
+      <option value="s">Whitespaces</option>
+      <option value="T">Tabs</option>
+      <option value="Dt">Dots</option>
+      <option value="C">Commas</option>
+      <option value="D">Dashes</option>
+      <option value="U">Underscores</option>
+      <option value="P">Pipes</option>
+      <option value="Co">Colons</option>
+      <option value="Sc">Semicolons</option>
+    </param>
+  </inputs>
+  <outputs>
+    <data format="tabular" name="out_file1" />
+  </outputs>
+  <tests>
+    <test>
+      <param name="convert_from" value="P"/>
+      <param name="input" value="replace_delimiter_input.tsv" ftype="tabular"/>
+      <param name="convert_to" value="C"/>
+      <output name="out_file1" file="replace_delimiter_output.csv"/>
+    </test>
+  </tests>
+  <help>
+
+**What it does**
+
+Converts all delimiters of a specified type into a specified delimiter(Dots, Commas, Dashes, Underscores, Pipes, Colons, Semicolons).
+Tool and code borrowed from convert_delimiter tool(distributed with Galaxy).
+-----
+
+**Example**
+
+- Input file:
+
+    chrX||151283558|151283724|NM_000808_exon_8_0_chrX_151283559_r|0|-
+    chrX|151370273|151370486|NM_000808_exon_9_0_chrX_151370274_r|0|-
+    chrX|151559494|151559583|NM_018558_exon_1_0_chrX_151559495_f|0|+
+    chrX|151564643|151564711|NM_018558_exon_2_0_chrX_151564644_f||||0|+
+
+- Converting all pipe delimiters of the above file to Commas will get::
+
+    chrX,151283558,151283724,NM_000808_exon_8_0_chrX_151283559_r,0,-
+    chrX,151370273,151370486,NM_000808_exon_9_0_chrX_151370274_r,0,-
+    chrX,151559494,151559583,NM_018558_exon_1_0_chrX_151559495_f,0,+
+    chrX,151564643,151564711,NM_018558_exon_2_0_chrX_151564644_f,0,+
+
+</help>
+</tool>