comparison align.seqs.xml @ 2:1efe383c2c3c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 3418f23b9768f5aafb86488f5ec1cb97530d4fb3
author iuc
date Tue, 20 Mar 2018 22:00:00 -0400
parents f70e050ddb40
children 5d134e0b31fd
comparison
equal deleted inserted replaced
1:2692b3107533 2:1efe383c2c3c
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <expand macro="stdio"/> 7 <expand macro="stdio"/>
8 <expand macro="version_command"/> 8 <expand macro="version_command"/>
9 <command><![CDATA[ 9 <command><![CDATA[
10 @SHELL_OPTIONS@ 10 @SHELL_OPTIONS@
11 11
12 ## enable mothur to find blast 12 ## enable mothur to find blast
13 loc=`which mothur` && ln -s "\${loc%/mothur}"/* . && 13 ln -s `dirname \$(which mothur)`/* . &&
14 14
15 ## create symlinks to input datasets 15 ## create symlinks to input datasets
16 ln -s "$candidate" candidate.dat && 16 ln -s '$fasta' fasta.dat &&
17 ln -s "$alignment.template" alignment.template.dat && 17 ln -s '$alignment.reference' alignment.reference.dat &&
18 18
19 echo 'align.seqs( 19 echo 'align.seqs(
20 fasta=candidate.dat, 20 fasta=fasta.dat,
21 reference=alignment.template.dat, 21 reference=alignment.reference.dat,
22 align=$align, 22 align=$align,
23 #if $search.method == "kmer": 23 #if $search.method == "kmer":
24 ksize=$search.ksize, 24 ksize=$search.ksize,
25 #else: 25 #else:
26 search=$search.method, 26 search=$search.method,
27 #end if 27 #end if
28 #if $scoring.adjust == "yes": 28 #if $scoring.adjust == "yes":
29 match=$scoring.match, 29 match=$scoring.match,
30 mismatch=$scoring.mismatch, 30 mismatch=$scoring.mismatch,
31 gapopen=$scoring.gapopen, 31 gapopen=$scoring.gapopen,
32 gapextend=$scoring.gapextend, 32 gapextend=$scoring.gapextend,
33 #end if 33 #end if
34 #if $reverse.flip == "yes": 34 #if $reverse.flip == "yes":
35 flip=true, 35 flip=true,
36 threshold=$reverse.threshold, 36 threshold=$reverse.threshold,
37 #end if 37 #end if
38 processors='\${GALAXY_SLOTS:-8}' 38 processors='\${GALAXY_SLOTS:-8}'
39 )' 39 )'
40 | sed 's/ //g' ## mothur trips over whitespace 40 | sed 's/ //g' ## mothur trips over whitespace
41 | ./mothur 41 | ./mothur
42 | tee mothur.out.log 42 | tee mothur.out.log
43 ]]></command> 43 ]]></command>
44 <inputs> 44 <inputs>
45 <param name="candidate" type="data" format="fasta" label="fasta - Candiate Sequences"/> 45 <param argument="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/>
46 <conditional name="alignment"> 46 <conditional name="alignment">
47 <param name="source" type="select" label="Select Reference Template from" help=""> 47 <param name="source" type="select" label="Select Reference Template from" help="">
48 <option value="ref">Cached Reference</option> 48 <option value="ref">Cached Reference</option>
49 <option value="history">Your History</option> 49 <option value="history">Your History</option>
50 </param> 50 </param>
51 <when value="ref"> 51 <when value="ref">
52 <param name="template" type="select" label="reference - Select an alignment database " help=""> 52 <param argument="reference" type="select" label="reference - Select an alignment database " help="">
53 <options from_data_table="mothur_aligndb"/> 53 <options from_data_table="mothur_aligndb"/>
54 </param> 54 </param>
55 </when> 55 </when>
56 <when value="history"> 56 <when value="history">
57 <param name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/> 57 <param argument="reference" type="data" format="fasta" label="reference - Reference to align with" help=""/>
58 </when> 58 </when>
59 </conditional> 59 </conditional>
60 <conditional name="search"> 60 <conditional name="search">
61 <param name="method" type="select" label="Select a search method" help=""> 61 <param name="method" type="select" label="Select a search method" help="">
62 <option value="kmer" selected="true">kmer (default)</option> 62 <option value="kmer" selected="true">kmer (default)</option>
63 <option value="suffix">suffix tree</option> 63 <option value="suffix">suffix tree</option>
64 <option value="blast">blast</option> 64 <option value="blast">blast</option>
65 </param> 65 </param>
66 <when value="kmer"> 66 <when value="kmer">
67 <param name="ksize" type="integer" value="8" min="5" max="12" label="ksize - kmer length between 5 and 12"/> 67 <param argument="ksize" type="integer" value="8" min="5" max="12" label="ksize - kmer length between 5 and 12"/>
68 </when> 68 </when>
69 <when value="suffix"/> 69 <when value="suffix"/>
70 <when value="blast"/> 70 <when value="blast"/>
71 </conditional> 71 </conditional>
72 <param name="align" type="select" label="align - Select a pairwise alignment method" help=""> 72 <param argument="align" type="select" label="align - Select a pairwise alignment method">
73 <option value="needleman" selected="true">needleman (default)</option> 73 <option value="needleman" selected="true">needleman (default)</option>
74 <option value="gotoh">gotoh</option> 74 <option value="gotoh">gotoh</option>
75 <option value="blast">blast</option> 75 <option value="blast">blast</option>
76 </param> 76 </param>
77 <conditional name="scoring"> 77 <conditional name="scoring">
78 <param name="adjust" type="select" label="Alignment scoring values" help=""> 78 <param name="adjust" type="select" label="Alignment scoring values">
79 <option value="no">use defaults</option> 79 <option value="no">use defaults</option>
80 <option value="yes">adjust values</option> 80 <option value="yes">adjust values</option>
81 </param> 81 </param>
82 <when value="yes"> 82 <when value="yes">
83 <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/> 83 <param argument="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/>
84 <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/> 84 <param argument="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/>
85 <param name="gapopen" type="integer" value="-5" label="gapopen - Pairwise alignment penalty for opening a gap"/> 85 <param argument="gapopen" type="integer" value="-5" label="gapopen - Pairwise alignment penalty for opening a gap"/>
86 <param name="gapextend" type="integer" value="-2" label="gapextend - Pairwise alignment penalty for extending a gap"/> 86 <param argument="gapextend" type="integer" value="-2" label="gapextend - Pairwise alignment penalty for extending a gap"/>
87 </when> 87 </when>
88 <when value="no"/> 88 <when value="no"/>
89 </conditional> 89 </conditional>
90 <conditional name="reverse"> 90 <conditional name="reverse">
91 <param name="flip" type="select" label="flip - Try to align against the reverse complement" help=""> 91 <param argument="flip" type="select" label="flip - Try to align against the reverse complement" help="">
92 <option value="no">No</option> 92 <option value="no">No</option>
93 <option value="yes">Yes values</option> 93 <option value="yes">Yes values</option>
94 </param> 94 </param>
95 <when value="yes"> 95 <when value="yes">
96 <param name="threshold" type="float" value="0.5" min="0.0" max="1.0" label="threshold - Cutoff (0. - 1.) at which an alignment is deemed 'bad' and the reverse complement may be tried." help="The default for the threshold parameter is 0.50, meaning at least 50% of the bases must remain or the sequence is reported as potentially reversed"/> 96 <param argument="threshold" type="float" value="0.5" min="0.0" max="1.0"
97 label="threshold - Cutoff (0. - 1.) at which an alignment is deemed 'bad' and the reverse complement may be tried."
98 help="The default for the threshold parameter is 0.50, meaning at least 50% of the bases must remain or the sequence is reported as potentially reversed"/>
97 </when> 99 </when>
98 <when value="no"/> 100 <when value="no"/>
99 </conditional> 101 </conditional>
102 <expand macro="param-savelog"/>
100 </inputs> 103 </inputs>
101 <outputs> 104 <outputs>
102 <expand macro="logfile-output"/> 105 <expand macro="logfile-output"/>
103 <data name="out_file" format="mothur.align" from_work_dir="candidate.align" label="${tool.name} on ${on_string}: align"/> 106 <data name="out_align" format="mothur.align" from_work_dir="fasta.align" label="${tool.name} on ${on_string}: align"/>
104 <data name="report" format="mothur.align.report" from_work_dir="candidate.align.report" label="${tool.name} on ${on_string}: align.report"/> 107 <data name="report" format="mothur.align.report" from_work_dir="fasta.align.report" label="${tool.name} on ${on_string}: align.report"/>
105 <data name="flip_accnos" format="mothur.accnos" from_work_dir="candidate.flip.accnos" label="${tool.name} on ${on_string}: flip.accnos"> 108 <data name="flip_accnos" format="mothur.accnos" from_work_dir="fasta.flip.accnos" label="${tool.name} on ${on_string}: flip.accnos">
106 <filter>reverse['flip'] == 'yes'</filter> 109 <filter>reverse['flip'] == 'yes'</filter>
107 </data> 110 </data>
108 </outputs> 111 </outputs>
109 <tests> 112 <tests>
110 <test> 113 <test>
111 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> 114 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/>
112 <param name="source" value="history"/> 115 <param name="source" value="history"/>
113 <param name="template" value="HMP_MOCK.v35.align"/> 116 <param name="reference" value="HMP_MOCK.v35.align"/>
114 <output name="out_file" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align"/> 117 <output name="out_align" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align">
118 <assert_contents>
119 <expand macro="test-align-format"/>
120 </assert_contents>
121 </output>
115 <output name="report" file="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report" ftype="mothur.align.report"/> 122 <output name="report" file="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report" ftype="mothur.align.report"/>
123 <param name="savelog" value="true"/>
116 <expand macro="logfile-test"/> 124 <expand macro="logfile-test"/>
117 </test> 125 </test>
118 <test> 126 <test>
119 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> 127 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/>
120 <param name="source" value="history"/> 128 <param name="source" value="history"/>
121 <param name="template" value="HMP_MOCK.v35.align"/> 129 <param name="reference" value="HMP_MOCK.v35.align"/>
122 <param name="method" value="kmer"/> 130 <param name="method" value="kmer"/>
123 <param name="adjust" value="yes"/> 131 <param name="adjust" value="yes"/>
124 <param name="match" value="2"/> 132 <param name="match" value="2"/>
125 <param name="mismatch" value="-15"/> 133 <param name="mismatch" value="-15"/>
126 <param name="gapopen" value="-6"/> 134 <param name="gapopen" value="-6"/>
127 <param name="gapextend" value="-3"/> 135 <param name="gapextend" value="-3"/>
128 <output name="out_file" md5="3ce542a29ed1e3fb71c3c711ae9e5c3c" ftype="mothur.align"/> 136 <output name="out_align" ftype="mothur.align">
129 <output name="report" md5="6d7b4f0a51e81d7984a4f77758b8cfaf" ftype="mothur.align.report"/> 137 <assert_contents>
138 <expand macro="test-align-format"/>
139 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
140 </assert_contents>
141 </output>
142 <output name="report" ftype="mothur.align.report">
143 <assert_contents>
144 <expand macro="test-alignreport-format"/>
145 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
146 </assert_contents>
147 </output>
148 <param name="savelog" value="true"/>
130 <expand macro="logfile-test"/> 149 <expand macro="logfile-test"/>
131 </test> 150 </test>
132 <test> 151 <test>
133 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> 152 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/>
134 <param name="source" value="history"/> 153 <param name="source" value="history"/>
135 <param name="template" value="HMP_MOCK.v35.align"/> 154 <param name="reference" value="HMP_MOCK.v35.align"/>
136 <param name="method" value="suffix"/> 155 <param name="method" value="suffix"/>
137 <param name="align" value="gotoh"/> 156 <param name="align" value="gotoh"/>
138 <param name="adjust" value="yes"/> 157 <param name="adjust" value="yes"/>
139 <param name="match" value="2"/> 158 <param name="match" value="2"/>
140 <param name="mismatch" value="-15"/> 159 <param name="mismatch" value="-15"/>
141 <param name="gapopen" value="-6"/> 160 <param name="gapopen" value="-6"/>
142 <param name="gapextend" value="-3"/> 161 <param name="gapextend" value="-3"/>
143 <output name="out_file" md5="6aea1563e1d2e65e331968961da715d3" ftype="mothur.align"/> 162 <output name="out_align" ftype="mothur.align">
144 <output name="report" md5="714474e4ac446f5a112f9c44b11a6fae" ftype="mothur.align.report"/> 163 <assert_contents>
164 <expand macro="test-align-format"/>
165 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
166 </assert_contents>
167 </output>
168 <output name="report" ftype="mothur.align.report">
169 <assert_contents>
170 <expand macro="test-alignreport-format"/>
171 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
172 </assert_contents>
173 </output>
174 <param name="savelog" value="true"/>
145 <expand macro="logfile-test"/> 175 <expand macro="logfile-test"/>
146 </test> 176 </test>
147 <test><!-- test blast --> 177 <test><!-- test blast -->
148 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> 178 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/>
149 <param name="source" value="history"/> 179 <param name="source" value="history"/>
150 <param name="template" value="HMP_MOCK.v35.align"/> 180 <param name="reference" value="HMP_MOCK.v35.align"/>
151 <param name="method" value="blast"/> 181 <param name="method" value="blast"/>
152 <param name="align" value="blast"/> 182 <param name="align" value="blast"/>
153 <param name="flip" value="yes"/> 183 <param name="flip" value="yes"/>
154 <param name="threshold" value="0.5"/> 184 <param name="threshold" value="0.5"/>
155 <output name="out_file" md5="3b89c0afbec5f46e9c0c2974a234bc6e" ftype="mothur.align"/> 185 <output name="out_align" ftype="mothur.align">
156 <output name="report" md5="9ec830c9a278e20d8499ba55fef6f501" ftype="mothur.align.report"/> 186 <assert_contents>
187 <expand macro="test-align-format"/>
188 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
189 </assert_contents>
190 </output>
191 <output name="report" ftype="mothur.align.report">
192 <assert_contents>
193 <expand macro="test-alignreport-format"/>
194 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/>
195 </assert_contents>
196 </output>
197 <param name="savelog" value="true"/>
157 <expand macro="logfile-test"/> 198 <expand macro="logfile-test"/>
158 </test> 199 </test>
159 <test><!-- test accno file recovery with flip set to true --> 200 <test><!-- test accno file recovery with flip set to true -->
160 <param name="candidate" value="amazon.fasta"/> 201 <param name="fasta" value="amazon.fasta"/>
161 <param name="source" value="history"/> 202 <param name="source" value="history"/>
162 <param name="template" value="HMP_MOCK.v35.align"/> 203 <param name="reference" value="HMP_MOCK.v35.align"/>
163 <param name="flip" value="yes"/> 204 <param name="flip" value="yes"/>
164 <param name="threshold" value="0.5"/> 205 <param name="threshold" value="0.5"/>
165 <output name="out_file" md5="73b3b1d0c1176ed9731eedbda70b5957" ftype="mothur.align"/> 206 <output name="out_align" ftype="mothur.align">
166 <output name="report" md5="e502a984ffb97026f1d84c9aee616003" ftype="mothur.align.report"/> 207 <assert_contents>
167 <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos"/> 208 <expand macro="test-align-format"/>
209 <has_text text="U68621"/>
210 </assert_contents>
211 </output>
212 <output name="report" ftype="mothur.align.report">
213 <assert_contents>
214 <expand macro="test-alignreport-format"/>
215 <has_text text="U68621"/>
216 </assert_contents>
217 </output>
218 <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos">
219 <assert_contents>
220 <has_text text="U68621"/>
221 <has_text text="reverse complement"/>
222 </assert_contents>
223 </output>
224 <param name="savelog" value="true"/>
168 <expand macro="logfile-test"/> 225 <expand macro="logfile-test"/>
169 </test> 226 </test>
170 </tests> 227 </tests>
171 <help> 228 <help><![CDATA[
172 <![CDATA[
173 229
174 @MOTHUR_OVERVIEW@ 230 @MOTHUR_OVERVIEW@
175 231
176 **Command Documentation** 232 **Command Documentation**
177 233
178 The align.seqs_ command aligns a user-supplied fasta-formatted candidate sequence file to a user-supplied fasta-formatted template_alignment_. 234 The align.seqs_ command aligns a user-supplied fasta-formatted fasta sequence file to a user-supplied fasta-formatted template_alignment_.
179 235
180 The general approach is to 236 The general approach is to
181 i) find the closest template for each candidate using kmer searching, blastn, or suffix tree searching; 237 i) find the closest template for each fasta using kmer searching, blastn, or suffix tree searching;
182 ii) to make a pairwise alignment between the candidate and de-gapped template sequences using the Needleman-Wunsch, Gotoh, or blastn algorithms; and 238 ii) to make a pairwise alignment between the fasta and de-gapped template sequences using the Needleman-Wunsch, Gotoh,or blastn algorithms; and
183 iii) to re-insert gaps to the candidate and template pairwise alignments using the NAST algorithm so that the candidate sequence alignment is compatible with the original template alignment. 239 iii) to re-insert gaps to the fasta and template pairwise alignments using the NAST algorithm so that the fasta sequence alignment is compatible with the original template alignment.
184 240
185 In general the alignment is very fast - we are able to align over 186,000 full-length sequences to the SILVA alignment in less than 3 hrs with a quality as good as the SINA aligner. Furthermore, this rate can be accelerated using multiple processors. While the aligner doesn't explicitly take into account the secondary structure of the 16S rRNA gene, if the template database is based on the secondary structure, then the resulting alignment will at least be implicitly based on the secondary structure. 241 In general the alignment is very fast - we are able to align over 186,000 full-length sequences to the SILVA alignment
242 in less than 3 hrs with a quality as good as the SINA aligner. Furthermore, this rate can be accelerated using multiple
243 processors. While the aligner doesn't explicitly take into account the secondary structure of the 16S rRNA gene, if the
244 template database is based on the secondary structure, then the resulting alignment will at least be implicitly based
245 on the secondary structure.
186 246
187 .. _template_alignment: https://www.mothur.org/wiki/Alignment_database 247 .. _template_alignment: https://www.mothur.org/wiki/Alignment_database
188 .. _align.seqs: https://www.mothur.org/wiki/Align.seqs 248 .. _align.seqs: https://www.mothur.org/wiki/Align.seqs
189 249
190 ]]> 250 ]]></help>
191 </help>
192 <expand macro="citations"/> 251 <expand macro="citations"/>
193 </tool> 252 </tool>