comparison rename_scaffold.xml @ 5:7c8b327f298c draft

planemo upload commit f565a59d3e28d34d1caf326fcee83d04a939c359
author yating-l
date Tue, 31 Jul 2018 13:50:21 -0400
parents e35a3509c160
children 2d143f0ac727
comparison
equal deleted inserted replaced
4:e35a3509c160 5:7c8b327f298c
1 <tool id="rename_scaffold" name="rename the scaffolds" version="2.1"> 1 <tool id="rename_scaffold" name="rename the scaffolds" version="2.2">
2 <description>a Galaxy tool to rename or truncate the scaffold names in the reference genome so that they won't exceed 31 characters</description> 2 <description>a Galaxy tool to rename or truncate the scaffold names in the reference genome so that they won't exceed 31 characters</description>
3 <stdio> 3 <stdio>
4 <exit_code range="1:" /> 4 <exit_code range="1:" />
5 </stdio> 5 </stdio>
6 <command><![CDATA[ 6 <command><![CDATA[
7 #if $manipulate_selector == "rename" 7 python $__tool_directory__/rename.py $input $manipulate_selector $output $index
8 python $__tool_directory__/rename.py $input $manipulate_selector $output $index
9 #elif $manipulate_selector == "truncate"
10 python $__tool_directory__/rename.py $input $manipulate_selector $output
11 #end if
12 ]]></command> 8 ]]></command>
13 <inputs> 9 <inputs>
14 <param name="input" type="data" format="fasta"/> 10 <param name="input" type="data" format="fasta"/>
15 <param name="manipulate_selector" type="select" label="Choose whether you want to rename the scaffolds or truncate the scaffold names"> 11 <param name="manipulate_selector" type="select" label="Choose whether you want to rename the scaffolds or truncate the scaffold names">
16 <option value="truncate" selected="true">Truncate the scaffold names if they exceed 31 characters</option> 12 <option value="truncate" selected="true">Truncate the scaffold names if they exceed 31 characters</option>
17 <option value="rename">Rename the scaffold names</option> 13 <option value="rename">Rename the scaffold names</option>
18 </param> 14 </param>
19 </inputs> 15 </inputs>
20 <outputs> 16 <outputs>
21 <data name="output" format="fasta" label="${tool.name} on ${on_string}: fixed_reference" /> 17 <data name="output" format="fasta" label="${tool.name} on ${on_string}: fixed_reference" />
22 <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping"> 18 <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping" />
23 <filter>manipulate_selector == "rename"</filter>
24 </data>
25 </outputs> 19 </outputs>
26 <tests> 20 <tests>
27 <test> 21 <test>
28 <!-- Test rename input Dbia3.fa --> 22 <!-- Test rename input Dbia3.fa -->
29 <param name="input" value="Dbia3.fa" /> 23 <param name="input" value="Dbia3.fa" />
30 <param name="manipulate_selector" value="rename" /> 24 <param name="manipulate_selector" value="rename" />
31 <output name="output" file="Dbia3_renamed.fa"/> 25 <output name="output" file="Dbia3_renamed.fa"/>
32 <output name="index" file="Dbia3_index.csv"/> 26 <output name="index" file="renamed_Dbia3_name_mapping.csv"/>
33 </test> 27 </test>
34 <test> 28 <test>
35 <!-- Test truncate input Dbia3.fa --> 29 <!-- Test truncate input Dbia3.fa -->
36 <param name="input" value="Dbia3.fa" /> 30 <param name="input" value="Dbia3.fa" />
37 <param name="manipulate_selector" value="truncate" /> 31 <param name="manipulate_selector" value="truncate" />
38 <output name="output" file="Dbia3.fa"/> 32 <output name="output" file="Dbia3.fa"/>
33 <output name="index" file="truncated_Dbia3_name_mapping.csv"/>
39 </test> 34 </test>
40 <test> 35 <test>
41 <!-- Test rename input with non-ASCII charaters --> 36 <!-- Test rename input with non-ASCII charaters -->
42 <param name="input" value="sequence_with_noascii.fa" /> 37 <param name="input" value="sequence_with_noascii.fa" />
43 <param name="manipulate_selector" value="rename" /> 38 <param name="manipulate_selector" value="rename" />
44 <output name="output" file="renamed_sequence_with_noascii.fa" /> 39 <output name="output" file="renamed_sequence_with_noascii.fa" />
45 <output name="index" file="noascii_index.csv"/> 40 <output name="index" file="renamed_noascii_name_mapping.csv"/>
46 </test> 41 </test>
47 <test> 42 <test>
48 <!-- Test truncate input with non-ASCII charaters --> 43 <!-- Test truncate input with non-ASCII charaters -->
49 <param name="input" value="sequence_with_noascii.fa" /> 44 <param name="input" value="sequence_with_noascii.fa" />
50 <param name="manipulate_selector" value="truncate" /> 45 <param name="manipulate_selector" value="truncate" />
51 <output name="output" file="truncated_sequence_with_noascii.fa" /> 46 <output name="output" file="truncated_sequence_with_noascii.fa" />
47 <output name="index" file="truncated_noascii_name_mapping.csv"/>
52 </test> 48 </test>
53 <test expect_failure="true"> 49 <test expect_failure="true">
54 <!-- Test truncate input with non-ASCII charaters. Expect fail: name conflict! --> 50 <!-- Test truncate input with non-ASCII charaters. Expect fail: name conflict! -->
55 <param name="input" value="sequence_with_noascii_name_conflict.fa" /> 51 <param name="input" value="sequence_with_noascii_name_conflict.fa" />
56 <param name="manipulate_selector" value="truncate" /> 52 <param name="manipulate_selector" value="truncate" />
58 <test> 54 <test>
59 <!-- Test input with tab --> 55 <!-- Test input with tab -->
60 <param name="input" value="sequence_with_tab.fa" /> 56 <param name="input" value="sequence_with_tab.fa" />
61 <param name="manipulate_selector" value="truncate" /> 57 <param name="manipulate_selector" value="truncate" />
62 <output name="output" file="fixed_reference_with_tab.fasta" /> 58 <output name="output" file="fixed_reference_with_tab.fasta" />
59 <output name="index" file="truncated_noascii_with_tab_name_mapping.csv"/>
63 </test> 60 </test>
64 </tests> 61 </tests>
65 <help><![CDATA[ 62 <help><![CDATA[
66 This tool is to rename scaffolds in the reference genome so that the sequence names are less than 31 characters. Rename all scaffolds to scaffold_1, scaffold_2, ..., scaffold_N and also output a name mapping file. 63 This tool is to rename scaffolds in the reference genome so that the sequence names are less than 31 characters. Rename all scaffolds to scaffold_1, scaffold_2, ..., scaffold_N and also output a name mapping file.
67 64
68 Or truncate the scaffold names that are more than 31 characters and replace each invalid character (non-ASCII, '\\t', '\\n', '\\x0b', '\\x0c', '\\r') with '_' 65 Or truncate the scaffold names that are more than 31 characters and replace each invalid character (non-ASCII, '\\t', '\\n', '\\x0b', '\\x0c', '\\r') with '_' and also output a name mapping file.
69 ]]></help> 66 ]]></help>
70 <citations> 67 <citations>
71 </citations> 68 </citations>
72 </tool> 69 </tool>