Mercurial > repos > yating-l > rename_scaffolds
comparison rename_scaffold.xml @ 3:9529a207d704 draft
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
author | yating-l |
---|---|
date | Thu, 26 Jul 2018 13:02:23 -0400 |
parents | 8fdd3e06e1ec |
children | e35a3509c160 |
comparison
equal
deleted
inserted
replaced
2:8fdd3e06e1ec | 3:9529a207d704 |
---|---|
1 <tool id="rename_scaffold" name="rename the scaffolds" version="1.2"> | 1 <tool id="rename_scaffold" name="rename the scaffolds" version="2.0"> |
2 <description>a Galaxy tool to rename the scaffolds 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 python $__tool_directory__/rename.py $input $output $index | 7 #if $manipulate_selector == "rename" |
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 | |
8 ]]></command> | 12 ]]></command> |
9 <inputs> | 13 <inputs> |
10 <param name="input" type="data" format="fasta"/> | 14 <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"> | |
16 <option value="truncate" selected="true">Truncate the scaffold names if they exceed 31 characters</option> | |
17 <option value="rename">Rename the scaffold names</option> | |
18 </param> | |
11 </inputs> | 19 </inputs> |
12 <outputs> | 20 <outputs> |
13 <data name="output" format="fasta" label="${tool.name} on ${on_string}: renamed_reference" /> | 21 <data name="output" format="fasta" label="${tool.name} on ${on_string}: fixed_reference" /> |
14 <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping"/> | 22 <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping"> |
23 <filter>manipulate_selector == "rename"</filter> | |
24 </data> | |
15 </outputs> | 25 </outputs> |
16 <tests> | 26 <tests> |
17 <test> | 27 <test> |
18 <!-- Test with Dbia3.fa --> | 28 <!-- Test rename input Dbia3.fa --> |
19 <param name="input" value="Dbia3.fa" /> | 29 <param name="input" value="Dbia3.fa" /> |
30 <param name="manipulate_selector" value="rename" /> | |
20 <output name="output" file="Dbia3_renamed.fa"/> | 31 <output name="output" file="Dbia3_renamed.fa"/> |
21 <output name="index" file="Dbia3_index.csv"/> | 32 <output name="index" file="Dbia3_index.csv"/> |
22 </test> | 33 </test> |
34 <test> | |
35 <!-- Test truncate input Dbia3.fa --> | |
36 <param name="input" value="Dbia3.fa" /> | |
37 <param name="manipulate_selector" value="truncate" /> | |
38 <output name="output" file="Dbia3.fa"/> | |
39 </test> | |
40 <test> | |
41 <!-- Test rename input with non-ASCII charaters --> | |
42 <param name="input" value="sequence_with_noascii.fa" /> | |
43 <param name="manipulate_selector" value="rename" /> | |
44 <output name="output" file="renamed_sequence_with_noascii.fa" /> | |
45 <output name="index" file="noascii_index.csv"/> | |
46 </test> | |
47 <test> | |
48 <!-- Test truncate input with non-ASCII charaters --> | |
49 <param name="input" value="sequence_with_noascii.fa" /> | |
50 <param name="manipulate_selector" value="truncate" /> | |
51 <output name="output" file="truncated_sequence_with_noascii.fa" /> | |
52 </test> | |
53 <test expect_failure="true"> | |
54 <!-- Test truncate input with non-ASCII charaters. Expect fail: name conflict! --> | |
55 <param name="input" value="sequence_with_noascii_name_conflict.fa" /> | |
56 <param name="manipulate_selector" value="truncate" /> | |
57 </test> | |
23 </tests> | 58 </tests> |
24 <help><![CDATA[ | 59 <help><![CDATA[ |
25 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 | 60 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. |
26 | 61 |
62 Or truncate the scaffold names that are more than 31 characters and replace each non-ASCII character with '_' | |
27 ]]></help> | 63 ]]></help> |
28 <citations> | 64 <citations> |
29 </citations> | 65 </citations> |
30 </tool> | 66 </tool> |