0
|
1 <tool id="convertdelimiter" name="Convert">
|
|
2 <description>delimiters</description>
|
|
3 <command interpreter="python">replace_delimiter.py $input $convert_from $convert_to $out_file1</command>
|
|
4 <inputs>
|
|
5 <param name="convert_from" type="select" label="Convert all">
|
|
6 <option value="s">Whitespaces</option>
|
|
7 <option value="T">Tabs</option>
|
|
8 <option value="Dt">Dots</option>
|
|
9 <option value="C">Commas</option>
|
|
10 <option value="D">Dashes</option>
|
|
11 <option value="U">Underscores</option>
|
|
12 <option value="P">Pipes</option>
|
|
13 <option value="Co">Colons</option>
|
|
14 <option value="Sc">Semicolons</option>
|
|
15 </param>
|
|
16 <param format="txt" name="input" type="data" label="in Dataset"/>
|
|
17 <param name="convert_to" type="select" label="to ">
|
|
18 <option value="s">Whitespaces</option>
|
|
19 <option value="T">Tabs</option>
|
|
20 <option value="Dt">Dots</option>
|
|
21 <option value="C">Commas</option>
|
|
22 <option value="D">Dashes</option>
|
|
23 <option value="U">Underscores</option>
|
|
24 <option value="P">Pipes</option>
|
|
25 <option value="Co">Colons</option>
|
|
26 <option value="Sc">Semicolons</option>
|
|
27 </param>
|
|
28 </inputs>
|
|
29 <outputs>
|
|
30 <data format="tabular" name="out_file1" />
|
|
31 </outputs>
|
|
32 <tests>
|
|
33 <test>
|
|
34 <param name="convert_from" value="P"/>
|
|
35 <param name="input" value="replace_delimiter_input.tsv" ftype="tabular"/>
|
|
36 <param name="convert_to" value="C"/>
|
|
37 <output name="out_file1" file="replace_delimiter_output.csv"/>
|
|
38 </test>
|
|
39 </tests>
|
|
40 <help>
|
|
41
|
|
42 **What it does**
|
|
43
|
|
44 Converts all delimiters of a specified type into a specified delimiter(Dots, Commas, Dashes, Underscores, Pipes, Colons, Semicolons).
|
|
45 Tool and code borrowed from convert_delimiter tool(distributed with Galaxy).
|
|
46 -----
|
|
47
|
|
48 **Example**
|
|
49
|
|
50 - Input file:
|
|
51
|
|
52 chrX||151283558|151283724|NM_000808_exon_8_0_chrX_151283559_r|0|-
|
|
53 chrX|151370273|151370486|NM_000808_exon_9_0_chrX_151370274_r|0|-
|
|
54 chrX|151559494|151559583|NM_018558_exon_1_0_chrX_151559495_f|0|+
|
|
55 chrX|151564643|151564711|NM_018558_exon_2_0_chrX_151564644_f||||0|+
|
|
56
|
|
57 - Converting all pipe delimiters of the above file to Commas will get::
|
|
58
|
|
59 chrX,151283558,151283724,NM_000808_exon_8_0_chrX_151283559_r,0,-
|
|
60 chrX,151370273,151370486,NM_000808_exon_9_0_chrX_151370274_r,0,-
|
|
61 chrX,151559494,151559583,NM_018558_exon_1_0_chrX_151559495_f,0,+
|
|
62 chrX,151564643,151564711,NM_018558_exon_2_0_chrX_151564644_f,0,+
|
|
63
|
|
64 </help>
|
|
65 </tool>
|