/
rename.seqs.xml
112 lines (105 loc) · 4.53 KB
/
rename.seqs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<tool profile="16.07" id="mothur_rename_seqs" name="Rename.seqs" version="@WRAPPER_VERSION@.0">
<description>Rename sequences by concatenating the group name</description>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="biotools"/>
<expand macro="requirements"/>
<expand macro="stdio"/>
<expand macro="version_command"/>
<command><![CDATA[
@SHELL_OPTIONS@
## create symlinks to input datasets
ln -s '$fasta' fasta.dat &&
ln -s '$group' group.dat &&
ln -s '$name' name.dat &&
ln -s '$qfile' qfile.dat &&
ln -s '$contigsreport' contigsreport.dat &&
echo 'rename.seqs(
fasta=fasta.dat,
group=group.dat,
#if $name:
name=name.dat,
#end if
#if $qfile:
qfile=qfile.dat,
#end if
#if $contigsreport:
contigsreport=contigsreport.dat,
#end if
placement=$placement
)'
| sed 's/ //g' ## mothur trips over whitespace
| mothur
| tee mothur.out.log
]]></command>
<inputs>
<param argument="fasta" type="data" format="fasta,mothur.align" label="Fasta file"/>
<param argument="group" type="data" format="mothur.groups" label="Group file"/>
<param argument="name" type="data" format="mothur.names" optional="true" label="Names file"/>
<param argument="qfile" type="data" format="qual454" optional="true" label="quality file"/>
<param argument="contigsreport" type="data" format="tabular" optional="true" label="Contigsreport file"/>
<param argument="placement" type="select" label="Placement of group name">
<option value="back" selected="true">back</option>
<option value="front">front</option>
</param>
<expand macro="param-savelog"/>
</inputs>
<outputs>
<expand macro="logfile-output"/>
<data name="group_renamed" format="mothur.groups" from_work_dir="group.renamed.dat" label="${tool.name} on ${on_string}: group_renamed"/>
<data name="fasta_renamed" format_source="fasta" from_work_dir="fasta.renamed.dat" label="${tool.name} on ${on_string}: fasta_renamed"/>
<data name="map" format="tabular" from_work_dir="fasta.renamed_map" label="${tool.name} on ${on_string}: renaming map"/>
<data name="name_renamed" format="mothur.names" from_work_dir="name.renamed.dat" label="${tool.name} on ${on_string}: name_renamed">
<filter>name</filter>
</data>
<data name="qfile_renamed" format="qual454" from_work_dir="qfile.renamed.dat" label="${tool.name} on ${on_string}: qfile_renamed">
<filter>qfile</filter>
</data>
<data name="contigsreport_renamed" format="tabular" from_work_dir="contigsreport.renamed.dat" label="${tool.name} on ${on_string}: contigsreport_renamed">
<filter>contigsreport</filter>
</data>
</outputs>
<tests>
<test><!-- test with required params -->
<param name="fasta" value="amazon.fasta" ftype="fasta"/>
<param name="group" value="amazon.groups"/>
<param name="name" value="amazon1.names"/>
<output name="fasta_renamed" ftype="fasta">
<assert_contents>
<expand macro="test-fasta-format"/>
<has_text text="42_forest"/>
<has_text text="42_pasture"/>
</assert_contents>
</output>
<output name="map" ftype="tabular">
<assert_contents>
<has_n_columns n="2"/>
<has_line_matching expression="^42_forest\tU68631$"/>
</assert_contents>
</output>
<output name="group_renamed" ftype="mothur.groups">
<assert_contents>
<has_n_columns n="2"/>
<has_line_matching expression="^42_forest\tforest$"/>
</assert_contents>
</output>
<output name="name_renamed" ftype="mothur.names">
<assert_contents>
<has_n_columns n="2"/>
<has_line_matching expression="^42_forest\t42_forest$"/>
</assert_contents>
</output>
<param name="savelog" value="true"/>
<expand macro="logfile-test"/>
</test>
</tests>
<help><![CDATA[
@MOTHUR_OVERVIEW@
**Command Documentation**
The rename.seqs_ command takes fasta-formatted sequence file and group file, and renames
the sequences by appending the group name to the sequence number.
.. _rename.seqs: https://www.mothur.org/wiki/Rename.seqs
]]></help>
<expand macro="citations"/>
</tool>