Mercurial > repos > iuc > mothur_align_seqs
diff 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 |
line wrap: on
line diff
--- a/align.seqs.xml Tue Sep 05 17:07:16 2017 -0400 +++ b/align.seqs.xml Tue Mar 20 22:00:00 2018 -0400 @@ -7,54 +7,54 @@ <expand macro="stdio"/> <expand macro="version_command"/> <command><![CDATA[ - @SHELL_OPTIONS@ +@SHELL_OPTIONS@ - ## enable mothur to find blast - loc=`which mothur` && ln -s "\${loc%/mothur}"/* . && +## enable mothur to find blast +ln -s `dirname \$(which mothur)`/* . && - ## create symlinks to input datasets - ln -s "$candidate" candidate.dat && - ln -s "$alignment.template" alignment.template.dat && +## create symlinks to input datasets +ln -s '$fasta' fasta.dat && +ln -s '$alignment.reference' alignment.reference.dat && - echo 'align.seqs( - fasta=candidate.dat, - reference=alignment.template.dat, - align=$align, - #if $search.method == "kmer": - ksize=$search.ksize, - #else: - search=$search.method, - #end if - #if $scoring.adjust == "yes": - match=$scoring.match, - mismatch=$scoring.mismatch, - gapopen=$scoring.gapopen, - gapextend=$scoring.gapextend, - #end if - #if $reverse.flip == "yes": - flip=true, - threshold=$reverse.threshold, - #end if - processors='\${GALAXY_SLOTS:-8}' - )' - | sed 's/ //g' ## mothur trips over whitespace - | ./mothur - | tee mothur.out.log +echo 'align.seqs( + fasta=fasta.dat, + reference=alignment.reference.dat, + align=$align, + #if $search.method == "kmer": + ksize=$search.ksize, + #else: + search=$search.method, + #end if + #if $scoring.adjust == "yes": + match=$scoring.match, + mismatch=$scoring.mismatch, + gapopen=$scoring.gapopen, + gapextend=$scoring.gapextend, + #end if + #if $reverse.flip == "yes": + flip=true, + threshold=$reverse.threshold, + #end if + processors='\${GALAXY_SLOTS:-8}' +)' +| sed 's/ //g' ## mothur trips over whitespace +| ./mothur +| tee mothur.out.log ]]></command> <inputs> - <param name="candidate" type="data" format="fasta" label="fasta - Candiate Sequences"/> + <param argument="fasta" type="data" format="fasta" label="fasta - Candiate Sequences"/> <conditional name="alignment"> <param name="source" type="select" label="Select Reference Template from" help=""> <option value="ref">Cached Reference</option> <option value="history">Your History</option> </param> <when value="ref"> - <param name="template" type="select" label="reference - Select an alignment database " help=""> + <param argument="reference" type="select" label="reference - Select an alignment database " help=""> <options from_data_table="mothur_aligndb"/> </param> </when> <when value="history"> - <param name="template" type="data" format="fasta" label="reference - Reference to align with" help=""/> + <param argument="reference" type="data" format="fasta" label="reference - Reference to align with" help=""/> </when> </conditional> <conditional name="search"> @@ -64,75 +64,94 @@ <option value="blast">blast</option> </param> <when value="kmer"> - <param name="ksize" type="integer" value="8" min="5" max="12" label="ksize - kmer length between 5 and 12"/> + <param argument="ksize" type="integer" value="8" min="5" max="12" label="ksize - kmer length between 5 and 12"/> </when> <when value="suffix"/> <when value="blast"/> </conditional> - <param name="align" type="select" label="align - Select a pairwise alignment method" help=""> + <param argument="align" type="select" label="align - Select a pairwise alignment method"> <option value="needleman" selected="true">needleman (default)</option> <option value="gotoh">gotoh</option> <option value="blast">blast</option> </param> <conditional name="scoring"> - <param name="adjust" type="select" label="Alignment scoring values" help=""> + <param name="adjust" type="select" label="Alignment scoring values"> <option value="no">use defaults</option> <option value="yes">adjust values</option> </param> <when value="yes"> - <param name="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/> - <param name="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/> - <param name="gapopen" type="integer" value="-5" label="gapopen - Pairwise alignment penalty for opening a gap"/> - <param name="gapextend" type="integer" value="-2" label="gapextend - Pairwise alignment penalty for extending a gap"/> + <param argument="match" type="integer" value="1" label="match - Pairwise alignment reward for a match"/> + <param argument="mismatch" type="integer" value="-1" label="mismatch - Pairwise alignment penalty for a mismatch"/> + <param argument="gapopen" type="integer" value="-5" label="gapopen - Pairwise alignment penalty for opening a gap"/> + <param argument="gapextend" type="integer" value="-2" label="gapextend - Pairwise alignment penalty for extending a gap"/> </when> <when value="no"/> </conditional> <conditional name="reverse"> - <param name="flip" type="select" label="flip - Try to align against the reverse complement" help=""> + <param argument="flip" type="select" label="flip - Try to align against the reverse complement" help=""> <option value="no">No</option> <option value="yes">Yes values</option> </param> <when value="yes"> - <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"/> + <param argument="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"/> </when> <when value="no"/> </conditional> + <expand macro="param-savelog"/> </inputs> <outputs> <expand macro="logfile-output"/> - <data name="out_file" format="mothur.align" from_work_dir="candidate.align" label="${tool.name} on ${on_string}: align"/> - <data name="report" format="mothur.align.report" from_work_dir="candidate.align.report" label="${tool.name} on ${on_string}: align.report"/> - <data name="flip_accnos" format="mothur.accnos" from_work_dir="candidate.flip.accnos" label="${tool.name} on ${on_string}: flip.accnos"> + <data name="out_align" format="mothur.align" from_work_dir="fasta.align" label="${tool.name} on ${on_string}: align"/> + <data name="report" format="mothur.align.report" from_work_dir="fasta.align.report" label="${tool.name} on ${on_string}: align.report"/> + <data name="flip_accnos" format="mothur.accnos" from_work_dir="fasta.flip.accnos" label="${tool.name} on ${on_string}: flip.accnos"> <filter>reverse['flip'] == 'yes'</filter> </data> </outputs> <tests> <test> - <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> + <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> <param name="source" value="history"/> - <param name="template" value="HMP_MOCK.v35.align"/> - <output name="out_file" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align"/> + <param name="reference" value="HMP_MOCK.v35.align"/> + <output name="out_align" md5="c500a4ae34a16884171f5f9c91f1636b" ftype="mothur.align"> + <assert_contents> + <expand macro="test-align-format"/> + </assert_contents> + </output> <output name="report" file="Mock_S280_L001_R1_001_small.trim.contigs.good.align.report" ftype="mothur.align.report"/> + <param name="savelog" value="true"/> <expand macro="logfile-test"/> </test> <test> - <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> + <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> <param name="source" value="history"/> - <param name="template" value="HMP_MOCK.v35.align"/> + <param name="reference" value="HMP_MOCK.v35.align"/> <param name="method" value="kmer"/> <param name="adjust" value="yes"/> <param name="match" value="2"/> <param name="mismatch" value="-15"/> <param name="gapopen" value="-6"/> <param name="gapextend" value="-3"/> - <output name="out_file" md5="3ce542a29ed1e3fb71c3c711ae9e5c3c" ftype="mothur.align"/> - <output name="report" md5="6d7b4f0a51e81d7984a4f77758b8cfaf" ftype="mothur.align.report"/> + <output name="out_align" ftype="mothur.align"> + <assert_contents> + <expand macro="test-align-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <output name="report" ftype="mothur.align.report"> + <assert_contents> + <expand macro="test-alignreport-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <param name="savelog" value="true"/> <expand macro="logfile-test"/> </test> <test> - <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> + <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> <param name="source" value="history"/> - <param name="template" value="HMP_MOCK.v35.align"/> + <param name="reference" value="HMP_MOCK.v35.align"/> <param name="method" value="suffix"/> <param name="align" value="gotoh"/> <param name="adjust" value="yes"/> @@ -140,54 +159,94 @@ <param name="mismatch" value="-15"/> <param name="gapopen" value="-6"/> <param name="gapextend" value="-3"/> - <output name="out_file" md5="6aea1563e1d2e65e331968961da715d3" ftype="mothur.align"/> - <output name="report" md5="714474e4ac446f5a112f9c44b11a6fae" ftype="mothur.align.report"/> + <output name="out_align" ftype="mothur.align"> + <assert_contents> + <expand macro="test-align-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <output name="report" ftype="mothur.align.report"> + <assert_contents> + <expand macro="test-alignreport-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <param name="savelog" value="true"/> <expand macro="logfile-test"/> </test> <test><!-- test blast --> - <param name="candidate" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> + <param name="fasta" value="Mock_S280_L001_R1_001_small.trim.contigs.good.fasta"/> <param name="source" value="history"/> - <param name="template" value="HMP_MOCK.v35.align"/> + <param name="reference" value="HMP_MOCK.v35.align"/> <param name="method" value="blast"/> <param name="align" value="blast"/> <param name="flip" value="yes"/> <param name="threshold" value="0.5"/> - <output name="out_file" md5="3b89c0afbec5f46e9c0c2974a234bc6e" ftype="mothur.align"/> - <output name="report" md5="9ec830c9a278e20d8499ba55fef6f501" ftype="mothur.align.report"/> + <output name="out_align" ftype="mothur.align"> + <assert_contents> + <expand macro="test-align-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <output name="report" ftype="mothur.align.report"> + <assert_contents> + <expand macro="test-alignreport-format"/> + <has_text text="M00967_43_000000000-A3JHG_1_1101_19936_3208"/> + </assert_contents> + </output> + <param name="savelog" value="true"/> <expand macro="logfile-test"/> </test> <test><!-- test accno file recovery with flip set to true --> - <param name="candidate" value="amazon.fasta"/> + <param name="fasta" value="amazon.fasta"/> <param name="source" value="history"/> - <param name="template" value="HMP_MOCK.v35.align"/> + <param name="reference" value="HMP_MOCK.v35.align"/> <param name="flip" value="yes"/> <param name="threshold" value="0.5"/> - <output name="out_file" md5="73b3b1d0c1176ed9731eedbda70b5957" ftype="mothur.align"/> - <output name="report" md5="e502a984ffb97026f1d84c9aee616003" ftype="mothur.align.report"/> - <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos"/> + <output name="out_align" ftype="mothur.align"> + <assert_contents> + <expand macro="test-align-format"/> + <has_text text="U68621"/> + </assert_contents> + </output> + <output name="report" ftype="mothur.align.report"> + <assert_contents> + <expand macro="test-alignreport-format"/> + <has_text text="U68621"/> + </assert_contents> + </output> + <output name="flip_accnos" md5="afd8e7629be76baa74451b91423aaa2f" ftype="mothur.accnos"> + <assert_contents> + <has_text text="U68621"/> + <has_text text="reverse complement"/> + </assert_contents> + </output> + <param name="savelog" value="true"/> <expand macro="logfile-test"/> </test> </tests> - <help> -<![CDATA[ + <help><![CDATA[ @MOTHUR_OVERVIEW@ **Command Documentation** -The align.seqs_ command aligns a user-supplied fasta-formatted candidate sequence file to a user-supplied fasta-formatted template_alignment_. +The align.seqs_ command aligns a user-supplied fasta-formatted fasta sequence file to a user-supplied fasta-formatted template_alignment_. The general approach is to - i) find the closest template for each candidate using kmer searching, blastn, or suffix tree searching; - ii) to make a pairwise alignment between the candidate and de-gapped template sequences using the Needleman-Wunsch, Gotoh, or blastn algorithms; and - 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. + i) find the closest template for each fasta using kmer searching, blastn, or suffix tree searching; + ii) to make a pairwise alignment between the fasta and de-gapped template sequences using the Needleman-Wunsch, Gotoh,or blastn algorithms; and + 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. -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. +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. .. _template_alignment: https://www.mothur.org/wiki/Alignment_database .. _align.seqs: https://www.mothur.org/wiki/Align.seqs -]]> - </help> + ]]></help> <expand macro="citations"/> </tool>