Mercurial > repos > iuc > mothur_align_seqs
comparison align.seqs.xml @ 3:4d29fc73525d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/mothur commit 4648c7574a78601e03ae6a318cbcd5b492a8a9f4
| author | iuc |
|---|---|
| date | Wed, 14 Feb 2018 09:59:38 -0500 |
| parents | 16083fc07186 |
| children | 3a0b15089ff6 |
comparison
equal
deleted
inserted
replaced
| 2:ca24ebe1e355 | 3:4d29fc73525d |
|---|---|
| 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> |
| 100 </inputs> | 102 </inputs> |
| 101 <outputs> | 103 <outputs> |
| 102 <expand macro="logfile-output"/> | 104 <expand macro="logfile-output"/> |
| 103 <data name="out_file" format="mothur.align" from_work_dir="candidate.align" label="${tool.name} on ${on_string}: align"/> | 105 <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"/> | 106 <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"> | 107 <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> | 108 <filter>reverse['flip'] == 'yes'</filter> |
| 107 </data> | 109 </data> |
| 108 </outputs> | 110 </outputs> |
| 109 <tests> | 111 <tests> |
| 110 <test> | 112 <test> |
| 111 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> | 113 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> |
| 112 <param name="source" value="history"/> | 114 <param name="source" value="history"/> |
| 113 <param name="template" value="HMP_MOCK.v35.align"/> | 115 <param name="reference" value="HMP_MOCK.v35.align"/> |
| 114 <output name="out_file" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align"/> | 116 <output name="out_align" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align"> |
| 117 <assert_contents> | |
| 118 <expand macro="test-align-format"/> | |
| 119 </assert_contents> | |
| 120 </output> | |
| 115 <output name="report" file="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report" ftype="mothur.align.report"/> | 121 <output name="report" file="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report" ftype="mothur.align.report"/> |
| 116 <expand macro="logfile-test"/> | 122 <expand macro="logfile-test"/> |
| 117 </test> | 123 </test> |
| 118 <test> | 124 <test> |
| 119 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> | 125 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> |
| 120 <param name="source" value="history"/> | 126 <param name="source" value="history"/> |
| 121 <param name="template" value="HMP_MOCK.v35.align"/> | 127 <param name="reference" value="HMP_MOCK.v35.align"/> |
| 122 <param name="method" value="kmer"/> | 128 <param name="method" value="kmer"/> |
| 123 <param name="adjust" value="yes"/> | 129 <param name="adjust" value="yes"/> |
| 124 <param name="match" value="2"/> | 130 <param name="match" value="2"/> |
| 125 <param name="mismatch" value="-15"/> | 131 <param name="mismatch" value="-15"/> |
| 126 <param name="gapopen" value="-6"/> | 132 <param name="gapopen" value="-6"/> |
| 127 <param name="gapextend" value="-3"/> | 133 <param name="gapextend" value="-3"/> |
| 128 <output name="out_file" md5="3ce542a29ed1e3fb71c3c711ae9e5c3c" ftype="mothur.align"/> | 134 <output name="out_align" ftype="mothur.align"> |
| 129 <output name="report" md5="6d7b4f0a51e81d7984a4f77758b8cfaf" ftype="mothur.align.report"/> | 135 <assert_contents> |
| 136 <expand macro="test-align-format"/> | |
| 137 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 138 </assert_contents> | |
| 139 </output> | |
| 140 <output name="report" ftype="mothur.align.report"> | |
| 141 <assert_contents> | |
| 142 <expand macro="test-alignreport-format"/> | |
| 143 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 144 </assert_contents> | |
| 145 </output> | |
| 130 <expand macro="logfile-test"/> | 146 <expand macro="logfile-test"/> |
| 131 </test> | 147 </test> |
| 132 <test> | 148 <test> |
| 133 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> | 149 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> |
| 134 <param name="source" value="history"/> | 150 <param name="source" value="history"/> |
| 135 <param name="template" value="HMP_MOCK.v35.align"/> | 151 <param name="reference" value="HMP_MOCK.v35.align"/> |
| 136 <param name="method" value="suffix"/> | 152 <param name="method" value="suffix"/> |
| 137 <param name="align" value="gotoh"/> | 153 <param name="align" value="gotoh"/> |
| 138 <param name="adjust" value="yes"/> | 154 <param name="adjust" value="yes"/> |
| 139 <param name="match" value="2"/> | 155 <param name="match" value="2"/> |
| 140 <param name="mismatch" value="-15"/> | 156 <param name="mismatch" value="-15"/> |
| 141 <param name="gapopen" value="-6"/> | 157 <param name="gapopen" value="-6"/> |
| 142 <param name="gapextend" value="-3"/> | 158 <param name="gapextend" value="-3"/> |
| 143 <output name="out_file" md5="6aea1563e1d2e65e331968961da715d3" ftype="mothur.align"/> | 159 <output name="out_align" ftype="mothur.align"> |
| 144 <output name="report" md5="714474e4ac446f5a112f9c44b11a6fae" ftype="mothur.align.report"/> | 160 <assert_contents> |
| 161 <expand macro="test-align-format"/> | |
| 162 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 163 </assert_contents> | |
| 164 </output> | |
| 165 <output name="report" ftype="mothur.align.report"> | |
| 166 <assert_contents> | |
| 167 <expand macro="test-alignreport-format"/> | |
| 168 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 169 </assert_contents> | |
| 170 </output> | |
| 145 <expand macro="logfile-test"/> | 171 <expand macro="logfile-test"/> |
| 146 </test> | 172 </test> |
| 147 <test><!-- test blast --> | 173 <test><!-- test blast --> |
| 148 <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> | 174 <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> |
| 149 <param name="source" value="history"/> | 175 <param name="source" value="history"/> |
| 150 <param name="template" value="HMP_MOCK.v35.align"/> | 176 <param name="reference" value="HMP_MOCK.v35.align"/> |
| 151 <param name="method" value="blast"/> | 177 <param name="method" value="blast"/> |
| 152 <param name="align" value="blast"/> | 178 <param name="align" value="blast"/> |
| 153 <param name="flip" value="yes"/> | 179 <param name="flip" value="yes"/> |
| 154 <param name="threshold" value="0.5"/> | 180 <param name="threshold" value="0.5"/> |
| 155 <output name="out_file" md5="3b89c0afbec5f46e9c0c2974a234bc6e" ftype="mothur.align"/> | 181 <output name="out_align" ftype="mothur.align"> |
| 156 <output name="report" md5="9ec830c9a278e20d8499ba55fef6f501" ftype="mothur.align.report"/> | 182 <assert_contents> |
| 183 <expand macro="test-align-format"/> | |
| 184 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 185 </assert_contents> | |
| 186 </output> | |
| 187 <output name="report" ftype="mothur.align.report"> | |
| 188 <assert_contents> | |
| 189 <expand macro="test-alignreport-format"/> | |
| 190 <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> | |
| 191 </assert_contents> | |
| 192 </output> | |
| 157 <expand macro="logfile-test"/> | 193 <expand macro="logfile-test"/> |
| 158 </test> | 194 </test> |
| 159 <test><!-- test accno file recovery with flip set to true --> | 195 <test><!-- test accno file recovery with flip set to true --> |
| 160 <param name="candidate" value="amazon.fasta"/> | 196 <param name="fasta" value="amazon.fasta"/> |
| 161 <param name="source" value="history"/> | 197 <param name="source" value="history"/> |
| 162 <param name="template" value="HMP_MOCK.v35.align"/> | 198 <param name="reference" value="HMP_MOCK.v35.align"/> |
| 163 <param name="flip" value="yes"/> | 199 <param name="flip" value="yes"/> |
| 164 <param name="threshold" value="0.5"/> | 200 <param name="threshold" value="0.5"/> |
| 165 <output name="out_file" md5="73b3b1d0c1176ed9731eedbda70b5957" ftype="mothur.align"/> | 201 <output name="out_align" ftype="mothur.align"> |
| 166 <output name="report" md5="e502a984ffb97026f1d84c9aee616003" ftype="mothur.align.report"/> | 202 <assert_contents> |
| 167 <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos"/> | 203 <expand macro="test-align-format"/> |
| 204 <has_text text="U68621"/> | |
| 205 </assert_contents> | |
| 206 </output> | |
| 207 <output name="report" ftype="mothur.align.report"> | |
| 208 <assert_contents> | |
| 209 <expand macro="test-alignreport-format"/> | |
| 210 <has_text text="U68621"/> | |
| 211 </assert_contents> | |
| 212 </output> | |
| 213 <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos"> | |
| 214 <assert_contents> | |
| 215 <has_text text="U68621"/> | |
| 216 <has_text text="reverse complement"/> | |
| 217 </assert_contents> | |
| 218 </output> | |
| 168 <expand macro="logfile-test"/> | 219 <expand macro="logfile-test"/> |
| 169 </test> | 220 </test> |
| 170 </tests> | 221 </tests> |
| 171 <help> | 222 <help><![CDATA[ |
| 172 <![CDATA[ | |
| 173 | 223 |
| 174 @MOTHUR_OVERVIEW@ | 224 @MOTHUR_OVERVIEW@ |
| 175 | 225 |
| 176 **Command Documentation** | 226 **Command Documentation** |
| 177 | 227 |
| 178 The align.seqs_ command aligns a user-supplied fasta-formatted candidate sequence file to a user-supplied fasta-formatted template_alignment_. | 228 The align.seqs_ command aligns a user-supplied fasta-formatted fasta sequence file to a user-supplied fasta-formatted template_alignment_. |
| 179 | 229 |
| 180 The general approach is to | 230 The general approach is to |
| 181 i) find the closest template for each candidate using kmer searching, blastn, or suffix tree searching; | 231 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 | 232 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. | 233 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 | 234 |
| 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. | 235 In general the alignment is very fast - we are able to align over 186,000 full-length sequences to the SILVA alignment |
| 236 in less than 3 hrs with a quality as good as the SINA aligner. Furthermore, this rate can be accelerated using multiple | |
| 237 processors. While the aligner doesn't explicitly take into account the secondary structure of the 16S rRNA gene, if the | |
| 238 template database is based on the secondary structure, then the resulting alignment will at least be implicitly based | |
| 239 on the secondary structure. | |
| 186 | 240 |
| 187 .. _template_alignment: https://www.mothur.org/wiki/Alignment_database | 241 .. _template_alignment: https://www.mothur.org/wiki/Alignment_database |
| 188 .. _align.seqs: https://www.mothur.org/wiki/Align.seqs | 242 .. _align.seqs: https://www.mothur.org/wiki/Align.seqs |
| 189 | 243 |
| 190 ]]> | 244 ]]></help> |
| 191 </help> | |
| 192 <expand macro="citations"/> | 245 <expand macro="citations"/> |
| 193 </tool> | 246 </tool> |
