Mercurial > repos > yating-l > rename_scaffolds
annotate 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 |
rev | line source |
---|---|
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
1 <tool id="rename_scaffold" name="rename the scaffolds" version="2.0"> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
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> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
3 <stdio> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
4 <exit_code range="1:" /> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
5 </stdio> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
6 <command><![CDATA[ |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
7 #if $manipulate_selector == "rename" |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
8 python $__tool_directory__/rename.py $input $manipulate_selector $output $index |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
9 #elif $manipulate_selector == "truncate" |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
10 python $__tool_directory__/rename.py $input $manipulate_selector $output |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
11 #end if |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
12 ]]></command> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
13 <inputs> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
14 <param name="input" type="data" format="fasta"/> |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
15 <param name="manipulate_selector" type="select" label="Choose whether you want to rename the scaffolds or truncate the scaffold names"> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
16 <option value="truncate" selected="true">Truncate the scaffold names if they exceed 31 characters</option> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
17 <option value="rename">Rename the scaffold names</option> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
18 </param> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
19 </inputs> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
20 <outputs> |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
21 <data name="output" format="fasta" label="${tool.name} on ${on_string}: fixed_reference" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
22 <data name="index" format="csv" label="${tool.name} on ${on_string}: name mapping"> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
23 <filter>manipulate_selector == "rename"</filter> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
24 </data> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
25 </outputs> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
26 <tests> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
27 <test> |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
28 <!-- Test rename input Dbia3.fa --> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
29 <param name="input" value="Dbia3.fa" /> |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
30 <param name="manipulate_selector" value="rename" /> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
31 <output name="output" file="Dbia3_renamed.fa"/> |
1
0d13e4410c3d
planemo upload commit 68b7e251486853b77396932b588c20f389c366d2
yating-l
parents:
0
diff
changeset
|
32 <output name="index" file="Dbia3_index.csv"/> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
33 </test> |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
34 <test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
35 <!-- Test truncate input Dbia3.fa --> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
36 <param name="input" value="Dbia3.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
37 <param name="manipulate_selector" value="truncate" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
38 <output name="output" file="Dbia3.fa"/> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
39 </test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
40 <test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
41 <!-- Test rename input with non-ASCII charaters --> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
42 <param name="input" value="sequence_with_noascii.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
43 <param name="manipulate_selector" value="rename" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
44 <output name="output" file="renamed_sequence_with_noascii.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
45 <output name="index" file="noascii_index.csv"/> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
46 </test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
47 <test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
48 <!-- Test truncate input with non-ASCII charaters --> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
49 <param name="input" value="sequence_with_noascii.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
50 <param name="manipulate_selector" value="truncate" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
51 <output name="output" file="truncated_sequence_with_noascii.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
52 </test> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
53 <test expect_failure="true"> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
54 <!-- Test truncate input with non-ASCII charaters. Expect fail: name conflict! --> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
55 <param name="input" value="sequence_with_noascii_name_conflict.fa" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
56 <param name="manipulate_selector" value="truncate" /> |
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
57 </test> |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
58 </tests> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
59 <help><![CDATA[ |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
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. |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
61 |
3
9529a207d704
planemo upload commit fb7ce0e9f333b753a39ff171a8fbf39c3b3a069c
yating-l
parents:
2
diff
changeset
|
62 Or truncate the scaffold names that are more than 31 characters and replace each non-ASCII character with '_' |
0
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
63 ]]></help> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
64 <citations> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
65 </citations> |
65c9ce351343
planemo upload commit af6c4dc7f6d6795f2b2db7299eb14ae1d5622ac1
yating-l
parents:
diff
changeset
|
66 </tool> |