diff blast_plus_remote_blastp.xml @ 5:22a767177ac9 draft

planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit 8cb8939dadaad8e804e35128cfb7b2560eb4d9b4
author galaxyp
date Fri, 20 Jan 2017 16:00:56 -0500
parents
children e9975de58321
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/blast_plus_remote_blastp.xml	Fri Jan 20 16:00:56 2017 -0500
@@ -0,0 +1,618 @@
+<tool id="blast_plus_remote_blastp" name="NCBI BLAST+ remote blastp" version="2.6.0">
+    <description>Search protein database with protein query sequence(s)</description>
+    <!-- If job splitting is enabled, break up the query file into parts -->
+    <!--
+    <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="500" merge_outputs="output1" />
+    -->
+    <requirements>
+        <requirement type="binary">blastp</requirement>
+        <requirement type="package" version="2.6.0">blast</requirement>
+    </requirements>
+    <stdio>
+        <exit_code range="1" level="fatal" description="Bad input dataset or BLAST options" />
+        <exit_code range="2" level="fatal" description="Error in BLAST database" />
+        <exit_code range="3" level="fatal" description="Error in BLAST engine" />
+        <exit_code range="4" level="fatal" description="Out of Memory" />
+        <exit_code range="5:" level="fatal" description="Unknown Error" />
+    </stdio>
+    <version_command>blastp -version</version_command>
+    <command>
+## The command is a Cheetah template which allows some Python based syntax.
+## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
+blastp
+-query "$query"
+#if $db_opts.db_opts_selector == "db":
+  -db "${db_opts.database.fields.path}"
+#elif $db_opts.db_opts_selector == "histdb":
+  -db "${os.path.join($db_opts.histdb.extra_files_path,'blastdb')}"
+#elif $db_opts.db_opts_selector == "remote":
+  -db $db_opts.database
+  -remote
+  #set $txids = []
+  #set $ntxids = []
+  #for $i, $org in enumerate($db_opts.taxid_repeat):
+    #if $org.exclude:
+      #set $ntxids = $ntxids + ["txid" + $org.taxid.__str__]
+    #else
+      #set $txids = $txids + ["txid" + $org.taxid.__str__]
+    #end if
+  #end for
+  #if (len($txids) + len($ntxids)) > 0:
+    #set $entrez_query = ''
+    #if len($txids) > 0:
+      #set $entrez_query = $entrez_query + '(' + ' OR '.join($txids) + ')'
+    #end if
+    #if len($ntxids) > 0:
+      #set $entrez_query = $entrez_query + ' NOT (' + ' OR '.join($ntxids) + ')'
+    #end if
+    -entrez_query '$entrez_query'
+  #end if
+#else:
+  -subject "$db_opts.subject"
+#end if
+-task $blast_type
+-evalue $evalue_cutoff
+-out blast_output
+##Set the extended list here so if/when we add things, saved workflows are not affected
+#if str($fmt_opt.out_format)=="text":
+  -outfmt "$fmt_opt.outfmt" $fmt_opt.html $fmt_opt.show_gis
+  #if $fmt_opt.num_descriptions.__str__.strip() != '':
+    -num_descriptions $fmt_opt.num_descriptions
+  #end if
+  #if $fmt_opt.num_alignments.__str__.strip() != '':
+    -num_alignments $fmt_opt.num_alignments
+  #end if
+#elif str($fmt_opt.out_format)=="cols":
+  #set cols = (str($fmt_opt.std_cols)+","+str($fmt_opt.ext_cols)+","+str($fmt_opt.ids_cols)+","+str($fmt_opt.misc_cols)+","+str($fmt_opt.tax_cols)).replace("None", "").replace(",,", ",").replace(",", " ").strip()
+    -outfmt "6 $cols"
+  #if $fmt_opt.max_target_seqs.__str__.strip() != '':
+    -max_target_seqs $fmt_opt.max_target_seqs
+  #end if
+#else:
+  -outfmt "$fmt_opt.outfmt"
+  #if $fmt_opt.max_target_seqs.__str__.strip() != '':
+    -max_target_seqs $fmt_opt.max_target_seqs
+  #end if
+#end if
+#if $db_opts.db_opts_selector != "remote":
+  -num_threads 8
+#end if
+#if $adv_opts.adv_opts_selector=="advanced":
+  $adv_opts.filter_query
+  -matrix $adv_opts.scoring.matrix
+  $adv_opts.scoring.gap_costs
+
+  #if $adv_opts.word_size.__str__.strip() != '':
+    -word_size $adv_opts.word_size
+  #end if
+
+  #if $adv_opts.window_size.__str__.strip() != '':
+    -window_size $adv_opts.window_size
+  #end if
+
+  #if $adv_opts.threshold.__str__.strip() != '':
+    -threshold $adv_opts.threshold
+  #end if
+
+  #if $adv_opts.comp_based_stats.__str__.strip() != '':
+    -comp_based_stats $adv_opts.comp_based_stats
+  #end if
+
+  ##Ungapped disabled for now - see comments below
+  ##$adv_opts.ungapped
+  $adv_opts.use_sw_tback
+  $adv_opts.parse_deflines
+  ## End of advanced options:
+#end if
+    </command>
+    <inputs>
+        <param name="query" type="data" format="fasta" label="Protein query sequence(s)"/>
+        <conditional name="db_opts">
+            <param name="db_opts_selector" type="select" label="Subject database/sequences">
+              <option value="db" selected="True">Local BLAST Database</option>
+              <option value="histdb">BLAST database from your history</option>
+              <option value="file">Local FASTA file</option>
+              <option value="remote">NCBI Remote Database</option>
+            </param>
+            <when value="db">
+                <param name="database" type="select" label="Protein BLAST database">
+                    <options from_file="blastdb_p.loc">
+                      <column name="value" index="0"/>
+                      <column name="name" index="1"/>
+                      <column name="path" index="2"/>
+                    </options>
+                </param>
+                <param name="subject" type="hidden" value="" />
+            </when>
+            <when value="histdb">
+                <param name="database" type="hidden" value="" />
+                <param name="histdb" type="data" format="blastdbp" label="Protein BLAST database" />
+                <param name="subject" type="hidden" value="" />
+            </when>
+            <when value="file">
+                <param name="database" type="hidden" value="" />
+                <param name="subject" type="data" format="fasta" label="Protein FASTA file to use as database"/>
+            </when>
+            <when value="remote">
+                <param name="database" type="select" label="Protein BLAST database">
+                    <option value="nr" selected="True">Non-redundant protein sequences (nr)</option>
+                    <option value="refseq_protein">Reference proteins (refseq_protein)</option>
+                    <option value="swissprot">UniProtKB/Swiss-Prot(swissprot)</option>
+                    <option value="pat">Patented protein sequences(pat)</option>
+                    <option value="pdb">Protein Data Bank proteins(pdb)</option>
+                    <option value="env_nr">Metagenomic proteins(env_nr)</option>
+                </param>
+                <repeat name="taxid_repeat" title="Search Organism Restriction" min="0">
+                    <param name="taxid" type="integer" value="" label="NCBI Taxon ID" help="For example: Human is 9606 (see: http://www.ncbi.nlm.nih.gov/taxonomy ) ">
+                        <validator type="in_range" min="0" />
+                    </param>
+                    <param name="exclude" type="boolean" checked="false" label="Exclude this NCBI Taxon ID" help=""/>
+                </repeat>
+            </when>
+        </conditional>
+        <param name="blast_type" type="select" display="radio" label="Type of BLAST">
+            <option value="blastp">blastp - Traditional BLASTP to compare a protein query to a protein database</option>
+            <option value="blastp-fast">blastp-fast - Use longer words for seeding, faster but less accurate</option>
+            <option value="blastp-short">blastp-short - BLASTP optimized for queries shorter than 30 residues</option>
+        </param>
+        <param name="evalue_cutoff" type="float" size="15" value="0.001" label="Set expectation value cutoff" />
+        <conditional name="fmt_opt">
+            <param name="out_format" type="select" label="Output format">
+                <option value="tabular" selected="True">Tabular</option>
+                <option value="cols">Tabular (select which columns)</option>
+                <option value="blastxml">BLAST XML</option>
+                <option value="text">Text Report</option>
+            </param>
+            <when value="tabular">
+                <param name="outfmt" type="select" label="Tabular columns">
+                  <option value="6" selected="True">Tabular (standard 12 columns)</option>
+                  <option value="7">Tabular (standard 12 columns) with comments</option>
+                  <option value="6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen">Tabular (extended 24 columns)</option>
+                  <option value="6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen salltitles">Tabular (extended 25 columns)</option>
+                </param>
+                <param name="max_target_seqs" type="integer" value="500" optional="true" label="Maximum hits to show" help="Use zero for default limits">
+                    <validator type="in_range" min="0" />
+                </param>
+            </when>
+            <when value="cols">
+                <param name="std_cols" type="select" multiple="true" display="checkboxes" label="Standard columns">
+                    <option selected="true" value="qseqid">qseqid = Query Seq-id (ID of your sequence)</option>
+                    <option selected="true" value="sseqid">sseqid = Subject Seq-id (ID of the database hit)</option>
+                    <option selected="true" value="pident">pident = Percentage of identical matches</option>
+                    <option selected="true" value="length">length = Alignment length</option>
+                    <option selected="true" value="mismatch">mismatch = Number of mismatches</option>
+                    <option selected="true" value="gapopen">gapopen = Number of gap openings</option>
+                    <option selected="true" value="qstart">qstart = Start of alignment in query</option>
+                    <option selected="true" value="qend">qend = End of alignment in query</option>
+                    <option selected="true" value="sstart">sstart = Start of alignment in subject (database hit)</option>
+                    <option selected="true" value="send">send = End of alignment in subject (database hit)</option>
+                    <option selected="true" value="evalue">evalue = Expectation value (E-value)</option>
+                    <option selected="true" value="bitscore">bitscore = Bit score</option>
+                </param>
+                <param name="ext_cols" type="select" multiple="true" display="checkboxes" label="Extended columns">
+                    <option value="sallseqid">sallseqid = All subject Seq-id(s), separated by a ';'</option>
+                    <option value="score">score = Raw score</option>
+                    <option value="nident">nident = Number of identical matches</option>
+                    <option value="positive">positive = Number of positive-scoring matches</option>
+                    <option value="gaps">gaps = Total number of gaps</option>
+                    <option value="ppos">ppos = Percentage of positive-scoring matches</option>
+                    <option value="qframe">qframe = Query frame</option>
+                    <option value="sframe">sframe = Subject frame</option>
+                    <option value="qseq">qseq = Aligned part of query sequence</option>
+                    <option value="sseq">sseq = Aligned part of subject sequence</option>
+                    <option value="qlen">qlen = Query sequence length</option>
+                    <option value="slen">slen = Subject sequence length</option>
+                    <option value="salltitles">salltitles = All subject title(s), separated by a '&lt;&gt;'</option>
+                </param>
+                <param name="ids_cols" type="select" multiple="true" display="checkboxes" label="Other identifier columns">
+                    <option value="qgi">qgi = Query GI</option>
+                    <option value="qacc">qacc = Query accesion</option>
+                    <option value="qaccver">qaccver = Query accesion.version</option>
+                    <option value="sallseqid">sallseqid = All subject Seq-id(s), separated by a ';'</option>
+                    <option value="sgi">sgi = Subject GI</option>
+                    <option value="sallgi">sallgi = All subject GIs</option>
+                    <option value="sacc">sacc = Subject accession</option>
+                    <option value="saccver">saccver = Subject accession.version</option>
+                    <option value="sallacc">sallacc = All subject accessions</option>
+                    <option value="stitle">stitle = Subject Title</option>
+                </param>
+                <param name="misc_cols" type="select" multiple="true" display="checkboxes" label="Miscellaneous columns">
+                    <option value="sstrand">sstrand = Subject Strand</option>
+                    <!-- Is it really worth including 'frames' given have 'qframe' and 'sframe'? -->
+                    <option value="frames">frames = Query and subject frames separated by a '/'</option>
+                    <option value="btop">btop = Blast traceback operations (BTOP)</option>
+                    <option value="qcovs">qcovs = Query Coverage Per Subject</option>
+                    <option value="qcovhsp">qcovhsp = Query Coverage Per HSP</option>
+                </param>
+                <param name="tax_cols" type="select" multiple="true" display="checkboxes" label="Taxonomy columns">
+                    <option value="staxids">staxids = unique Subject Taxonomy ID(s), separated by a ';' (in numerical order)</option>
+                    <!-- TODO, how to handle the taxonomy data file dependency? If missing these give N/A -->
+                    <option value="sscinames">sscinames = unique Subject Scientific Name(s), separated by a ';'</option>
+                    <option value="scomnames">scomnames = unique Subject Common Name(s), separated by a ';'</option>
+                    <option value="sblastnames">sblastnames = unique Subject Blast Name(s), separated by a ';' (in alphabetical order)</option>
+                    <option value="sskingdoms">sskingdoms = unique Subject Super Kingdom(s), separated by a ';' (in alphabetical order)</option>
+                </param>
+                <param name="max_target_seqs" type="integer" value="500" optional="true" label="Maximum hits to show" help="Use zero for default limits">
+                    <validator type="in_range" min="0" />
+                </param>
+            </when>
+            <when value="blastxml">
+                <param name="outfmt" type="hidden" value="5"/>
+                <param name="max_target_seqs" type="integer" value="500" optional="true" label="Maximum hits to show" help="Use zero for default limits">
+                    <validator type="in_range" min="0" />
+                </param>
+            </when>
+            <when value="text">
+                <param name="outfmt" type="select" label="Text format">
+                    <option value="0">Pairwise text</option>
+                    <option value="1">Query-anchored text showing identitites</option>
+                    <option value="2">Query-anchored text</option>
+                    <option value="3">Flat query-anchored text showing identitites</option>
+                    <option value="4">Flat query-anchored text</option>
+                </param>
+                <param name="html" type="boolean" label="Html" truevalue="-html" falsevalue="" checked="true" />
+                <param name="show_gis" type="boolean" label="NCBI-gis" truevalue="-show_gis" falsevalue="" checked="false" 
+                       help="Show the NCBI gis in the Subject def lines"/>
+                <param name="num_descriptions" type="integer" value="500" optional="true" label="Maximum Decriptions to show" help="Show one-line descriptions for this number of database sequences.">
+                    <validator type="in_range" min="0" />
+                </param>
+                <param name="num_alignments" type="integer" value="250" optional="true" label="Maximum alignments to show" help="Show alignments for this number of database sequences.">
+                    <validator type="in_range" min="0" />
+                </param>
+            </when>
+        </conditional>
+        <conditional name="adv_opts">
+            <param name="adv_opts_selector" type="select" label="Advanced Options">
+              <option value="basic" selected="True">Hide Advanced Options</option>
+              <option value="advanced">Show Advanced Options</option>
+            </param>
+            <when value="basic" />
+            <when value="advanced">
+                <param name="filter_query" type="boolean" label="Filter out low complexity regions (with SEG)" truevalue="-seg yes" falsevalue="-seg no" checked="false" />
+                <conditional name="scoring">
+                    <param name="matrix" type="select" label="Scoring matrix">
+                        <option value="BLOSUM90">BLOSUM90</option>
+                        <option value="BLOSUM80">BLOSUM80</option>
+                        <option value="BLOSUM62" selected="True">BLOSUM62 (default)</option>
+                        <option value="BLOSUM50">BLOSUM50</option>
+                        <option value="BLOSUM45">BLOSUM45</option>
+                        <option value="PAM250">PAM250</option>
+                        <option value="PAM70">PAM70</option>
+                        <option value="PAM30">PAM30</option>
+                    </param>
+                    <when value="BLOSUM90">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 9 -gapextend 2">Existense: 9  Extension: 2</option>
+                            <option value="-gapopen 8 -gapextend 2">Existense: 8  Extension: 2</option>
+                            <option value="-gapopen 7 -gapextend 2">Existense: 7  Extension: 2</option>
+                            <option value="-gapopen 6 -gapextend 2">Existense: 6  Extension: 2</option>
+                            <option value="-gapopen 11 -gapextend 1">Existense: 11  Extension: 1</option>
+                            <option value="-gapopen 10 -gapextend 1" selected="True">Existense: 10  Extension: 1 (default)</option>
+                            <option value="-gapopen 9 -gapextend 1">Existense: 9  Extension: 1</option>
+                        </param>
+
+                    </when>
+                    <when value="BLOSUM80">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 8 -gapextend 2">Existense: 8  Extension: 2</option>
+                            <option value="-gapopen 7 -gapextend 2">Existense: 7  Extension: 2</option>
+                            <option value="-gapopen 6 -gapextend 2">Existense: 6  Extension: 2</option>
+                            <option value="-gapopen 11 -gapextend 1">Existense: 11  Extension: 1</option>
+                            <option value="-gapopen 10 -gapextend 1" selected="True">Existense: 10  Extension: 1 (default)</option>
+                            <option value="-gapopen 9 -gapextend 1">Existense: 9  Extension: 1</option>
+                        </param>
+                    </when>
+                    <when value="BLOSUM62">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 11 -gapextend 2">Existense: 11  Extension: 2</option>
+                            <option value="-gapopen 10 -gapextend 2">Existense: 10  Extension: 2</option>
+                            <option value="-gapopen 9 -gapextend 2">Existense: 9  Extension: 2</option>
+                            <option value="-gapopen 8 -gapextend 2">Existense: 8  Extension: 2</option>
+                            <option value="-gapopen 7 -gapextend 2">Existense: 7  Extension: 2</option>
+                            <option value="-gapopen 6 -gapextend 2">Existense: 6  Extension: 2</option>
+                            <option value="-gapopen 13 -gapextend 1">Existense: 13  Extension: 1</option>
+                            <option value="-gapopen 12 -gapextend 1">Existense: 12  Extension: 1</option>
+                            <option value="-gapopen 11 -gapextend 1" selected="True">Existense: 11  Extension: 1 (default)</option>
+                            <option value="-gapopen 10 -gapextend 1">Existense: 10  Extension: 1</option>
+                            <option value="-gapopen 9 -gapextend 1">Existense: 9  Extension: 1</option>
+                        </param>
+
+                    </when>
+                    <when value="BLOSUM50">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 13 -gapextend 3">Existense: 13  Extension: 3</option>
+                            <option value="-gapopen 12 -gapextend 3">Existense: 12  Extension: 3</option>
+                            <option value="-gapopen 11 -gapextend 3">Existense: 11  Extension: 3</option>
+                            <option value="-gapopen 10 -gapextend 3">Existense: 10  Extension: 3</option>
+                            <option value="-gapopen 9 -gapextend 3">Existense: 9  Extension: 3</option>
+                            <option value="-gapopen 16 -gapextend 2">Existense: 16  Extension: 2</option>
+                            <option value="-gapopen 15 -gapextend 2">Existense: 15  Extension: 2</option>
+                            <option value="-gapopen 14 -gapextend 2">Existense: 14  Extension: 2</option>
+                            <option value="-gapopen 13 -gapextend 2" selected="True">Existense: 13  Extension: 2 (default)</option>
+                            <option value="-gapopen 12 -gapextend 2">Existense: 12  Extension: 2</option>
+                            <option value="-gapopen 19 -gapextend 1">Existense: 19  Extension: 1</option>
+                            <option value="-gapopen 18 -gapextend 1">Existense: 18  Extension: 1</option>
+                            <option value="-gapopen 17 -gapextend 1">Existense: 17  Extension: 1</option>
+                            <option value="-gapopen 16 -gapextend 1">Existense: 16  Extension: 1</option>
+                            <option value="-gapopen 15 -gapextend 1">Existense: 15  Extension: 1</option>
+                        </param>
+
+                    </when>
+                    <when value="BLOSUM45">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 13 -gapextend 3">Existense: 13  Extension: 3</option>
+                            <option value="-gapopen 12 -gapextend 3">Existense: 12  Extension: 3</option>
+                            <option value="-gapopen 11 -gapextend 3">Existense: 11  Extension: 3</option>
+                            <option value="-gapopen 10 -gapextend 3">Existense: 10  Extension: 3</option>
+                            <option value="-gapopen 15 -gapextend 2" selected="True">Existense: 15  Extension: 2 (default)</option>
+                            <option value="-gapopen 14 -gapextend 2">Existense: 14  Extension: 2</option>
+                            <option value="-gapopen 13 -gapextend 2">Existense: 13  Extension: 2</option>
+                            <option value="-gapopen 12 -gapextend 2">Existense: 12  Extension: 2</option>
+                            <option value="-gapopen 19 -gapextend 1">Existense: 19  Extension: 1</option>
+                            <option value="-gapopen 18 -gapextend 1">Existense: 18  Extension: 1</option>
+                            <option value="-gapopen 17 -gapextend 1">Existense: 17  Extension: 1</option>
+                            <option value="-gapopen 16 -gapextend 1">Existense: 16  Extension: 1</option>
+                        </param>
+                    </when>
+                    <when value="PAM250">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 15 -gapextend 3">Existense: 15  Extension: 3</option>
+                            <option value="-gapopen 14 -gapextend 3">Existense: 14  Extension: 3</option>
+                            <option value="-gapopen 13 -gapextend 3">Existense: 13  Extension: 3</option>
+                            <option value="-gapopen 12 -gapextend 3">Existense: 12  Extension: 3</option>
+                            <option value="-gapopen 17 -gapextend 2">Existense: 17  Extension: 2</option>
+                            <option value="-gapopen 16 -gapextend 2">Existense: 16  Extension: 2</option>
+                            <option value="-gapopen 15 -gapextend 2">Existense: 15  Extension: 2</option>
+                            <option value="-gapopen 14 -gapextend 2" selected="True">Existense: 14  Extension: 2 (default)</option>
+                            <option value="-gapopen 13 -gapextend 2">Existense: 13  Extension: 2</option>
+                            <option value="-gapopen 21 -gapextend 1">Existense: 21  Extension: 1</option>
+                            <option value="-gapopen 20 -gapextend 1">Existense: 20  Extension: 1</option>
+                            <option value="-gapopen 19 -gapextend 1">Existense: 19  Extension: 1</option>
+                            <option value="-gapopen 18 -gapextend 1">Existense: 18  Extension: 1</option>
+                            <option value="-gapopen 17 -gapextend 1">Existense: 17  Extension: 1</option>
+                        </param>
+
+                    </when>
+                    <when value="PAM70">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 8 -gapextend 2">Existense: 8  Extension: 2</option>
+                            <option value="-gapopen 7 -gapextend 2">Existense: 7  Extension: 2</option>
+                            <option value="-gapopen 6 -gapextend 2">Existense: 6  Extension: 2</option>
+                            <option value="-gapopen 11 -gapextend 1">Existense: 11  Extension: 1</option>
+                            <option value="-gapopen 10 -gapextend 1" selected="True">Existense: 10  Extension: 1 (default)</option>
+                            <option value="-gapopen 9 -gapextend 1">Existense: 9  Extension: 1</option>
+                        </param>
+
+                    </when>
+                    <when value="PAM30">
+                        <param name="gap_costs" type="select" label="Gap Costs">
+                            <option value="">Use Defaults</option>
+                            <option value="-gapopen 7 -gapextend 2">Existense: 7  Extension: 2</option>
+                            <option value="-gapopen 6 -gapextend 2">Existense: 6  Extension: 2</option>
+                            <option value="-gapopen 5 -gapextend 2">Existense: 5  Extension: 2</option>
+                            <option value="-gapopen 10 -gapextend 1">Existense: 10  Extension: 1</option>
+                            <option value="-gapopen 9 -gapextend 1" selected="True">Existense: 9  Extension: 1 (default)</option>
+                            <option value="-gapopen 8 -gapextend 1">Existense: 8  Extension: 1</option>
+                        </param>
+                    </when>
+                </conditional>
+
+                <param name="word_size" type="integer" value="" optional="true" label="Word size for wordfinder algorithm" help="Recommended: blastp 3, blastp-short 2">
+                    <validator type="in_range" min="2" />
+                </param>
+                <param name="window_size" type="integer" value="" optional="true" label="Multiple hits window size, use 0 to specify 1-hit algorithm." help="Recommended: blastp 40, blastp-short 15">
+                    <validator type="in_range" min="0" />
+                </param>
+                <param name="threshold" type="integer" value="" optional="true" label="Threshold: Minimum score to add a word to the BLAST lookup table." help="Recommended: blastp 11, blastp-short 16">
+                    <validator type="in_range" min="1" />
+                </param>
+                <param name="comp_based_stats" type="select" optional="true" label="Use composition-based statistics"
+                       help="Recommended:  blastp: 2   blastp-short: 0">
+                    <option value="">Leave Unspecified</option>
+                    <option value="0">0 or F (No composition-based statistics)</option>
+                    <option value="1">1 (Composition-based statistics as in NAR 29:2994-3005, 2001)</option>
+                    <option value="2">2, T,  or D (Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, conditioned on sequence properties)</option>
+                    <option value="3">3 (Composition-based score adjustment as in Bioinformatics 21:902-911, 2005, unconditionally)</option>
+                </param>
+
+                <param name="use_sw_tback" type="boolean" label="Compute locally optimal Smith-Waterman alignments?" truevalue="-use_sw_tback" falsevalue="" checked="false" />
+
+                <param name="parse_deflines" type="boolean" label="Should the query and subject defline(s) be parsed?" truevalue="-parse_deflines" falsevalue="" checked="false" help="This affects the formatting of the query/subject ID strings"/>
+            </when>
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="output_tabular" format="tabular" label="${blast_type} on ${db_opts.db_opts_selector} ${db_opts.database}" from_work_dir="blast_output">
+            <filter>fmt_opt['out_format'] in ("tabular","cols")</filter>
+        </data>
+        <data name="output_xml" format="blastxml" label="${blast_type} on ${db_opts.db_opts_selector} ${db_opts.database}" from_work_dir="blast_output">
+            <filter>fmt_opt['out_format'] == "blastxml"</filter>
+        </data>
+        <data name="output_txt" format="txt" label="${blast_type} on ${db_opts.db_opts_selector} ${db_opts.database}" from_work_dir="blast_output">
+            <filter>fmt_opt['out_format'] == "text" and not fmt_opt['html']</filter>
+        </data>
+        <data name="output_html" format="html" label="${blast_type} on ${db_opts.db_opts_selector} ${db_opts.database}" from_work_dir="blast_output">
+            <filter>fmt_opt['out_format'] == "text" and fmt_opt['html']</filter>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-8" />
+            <param name="blast_type" value="blastp" />
+            <param name="out_format" value="blastxml" />
+            <param name="outfmt" value="5" />
+            <param name="adv_opts_selector" value="advanced" />
+            <param name="filter_query" value="False" />
+            <param name="matrix" value="BLOSUM62" />
+            <param name="max_target_seqs" value="" />
+            <param name="word_size" value="" />
+            <param name="parse_deflines" value="False" />
+            <output name="output_xml">
+              <assert_contents>
+                <has_text text="sp|Q9BS26|ERP44_HUMAN"/>
+              </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-8" />
+            <param name="blast_type" value="blastp" />
+            <param name="out_format" value="tabular" />
+            <param name="outfmt" value="6" />
+            <param name="adv_opts_selector" value="advanced" />
+            <param name="filter_query" value="False" />
+            <param name="matrix" value="BLOSUM62" />
+            <param name="max_target_seqs" value="" />
+            <param name="word_size" value="" />
+            <param name="parse_deflines" value="False" />
+            <output name="output_tabular">
+              <assert_contents>
+                <has_text_matching expression="sp.P08100.OPSD_HUMAN\tgi.283855846.gb.ADB45242.1.\t\d+.\d+\t\d+\t\d+\t0\t\d+\t\d+\t\d+\t\d+\t\S+\t\s*\d+" />
+                <has_text text="BAB21486.1"/>
+              </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="query" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="rhodopsin_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-8" />
+            <param name="blast_type" value="blastp" />
+            <param name="out_format" value="tabular" />
+            <param name="outfmt" value="6 std sallseqid score nident positive gaps ppos qframe sframe qseq sseq qlen slen" />
+            <param name="adv_opts_selector" value="advanced" />
+            <param name="filter_query" value="False" />
+            <param name="matrix" value="BLOSUM62" />
+            <param name="max_target_seqs" value="" />
+            <param name="word_size" value="" />
+            <param name="parse_deflines" value="False" />
+            <output name="output_tabular">
+              <assert_contents>
+                <has_text_matching expression="sp.P08100.OPSD_HUMAN\tgi.283855846.gb.ADB45242.1.\t\d+.\d+\t\d+\t\d+\t\d+\t\d+\t\d+\t\d+\t\d+\t\S+\t\s*\d+\t\S+\t\d+\t\d+\t\d+\t\d+\t\S+\t\d+\t\d+\t\S+\t\S+\t\d+\t\d+" />
+              </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="query" value="rhodopsin_proteins.fasta" ftype="fasta" />
+            <param name="db_opts_selector" value="file" />
+            <param name="subject" value="four_human_proteins.fasta" ftype="fasta" />
+            <param name="database" value="" />
+            <param name="evalue_cutoff" value="1e-8" />
+            <param name="blast_type" value="blastp" />
+            <param name="out_format" value="tabular" />
+            <param name="outfmt" value="6" />
+            <param name="adv_opts_selector" value="basic" />
+            <output name="output_tabular">
+              <assert_contents>
+                <has_text_matching expression="gi.283855846.gb.ADB45242.1.\tsp.P08100.OPSD_HUMAN\t\d+.\d+\t\d+\t\d+\t0\t\d+\t\d+\t\d+\t\d+\t\S+\t\s*\d+" />
+                <has_text text="BAB21486.1"/>
+              </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help>
+
+.. class:: warningmark
+
+**Note**. Database searches may take a substantial amount of time.
+For large input datasets it is advisable to allow overnight processing.
+
+-----
+
+**What it does**
+
+Search a *protein database* using a *protein query*,
+using the NCBI BLAST+ blastp command line tool.
+
+The search can be performed using a local database, against a sequence supplied in a fasta file,
+or the blast can be performed remotely at NCBI.
+
+The remote operation allows searches to be targeted at specific organisms.
+
+-----
+
+**Output format**
+
+Because Galaxy focuses on processing tabular data, the default output of this
+tool is tabular. The standard BLAST+ tabular output contains 12 columns:
+
+====== ========= ============================================
+Column NCBI name Description
+------ --------- --------------------------------------------
+     1 qseqid    Query Seq-id (ID of your sequence)
+     2 sseqid    Subject Seq-id (ID of the database hit)
+     3 pident    Percentage of identical matches
+     4 length    Alignment length
+     5 mismatch  Number of mismatches
+     6 gapopen   Number of gap openings
+     7 qstart    Start of alignment in query
+     8 qend      End of alignment in query
+     9 sstart    Start of alignment in subject (database hit)
+    10 send      End of alignment in subject (database hit)
+    11 evalue    Expectation value (E-value)
+    12 bitscore  Bit score
+====== ========= ============================================
+
+The BLAST+ tools can optionally output additional columns of information,
+but this takes longer to calculate. Most (but not all) of these columns are
+included by selecting the extended tabular output. The extra columns are
+included *after* the standard 12 columns. This is so that you can write
+workflow filtering steps that accept either the 12 or 24 column tabular
+BLAST output.
+
+====== ============= ===========================================
+Column NCBI name     Description
+------ ------------- -------------------------------------------
+    13 sallseqid     All subject Seq-id(s), separated by a ';'
+    14 score         Raw score
+    15 nident        Number of identical matches
+    16 positive      Number of positive-scoring matches
+    17 gaps          Total number of gaps
+    18 ppos          Percentage of positive-scoring matches
+    19 qframe        Query frame
+    20 sframe        Subject frame
+    21 qseq          Aligned part of query sequence
+    22 sseq          Aligned part of subject sequence
+    23 qlen          Query sequence length
+    24 slen          Subject sequence length
+    25 salltitles    All subject title(s), separated by a '&lt;&gt;'
+====== ============= ===========================================
+
+The third option is BLAST XML output, which is designed to be parsed by
+another program, and is understood by some Galaxy tools.
+
+You can also choose several plain text or HTML output formats which are designed to be read by a person (not by another program).
+The HTML versions use basic webpage formatting and can include links to the hits on the NCBI website.
+The pairwise output (the default on the NCBI BLAST website) shows each match as a pairwise alignment with the query.
+The two query anchored outputs show a multiple sequence alignment between the query and all the matches,
+and differ in how insertions are shown (marked as insertions or with gap characters added to the other sequences).
+
+-------
+
+**References**
+
+Altschul et al. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. 1997. Nucleic Acids Res. 25:3389-3402.
+
+Schaffer et al. Improving the accuracy of PSI-BLAST protein database searches with composition-based statistics and other refinements. 2001. Nucleic Acids Res. 29:2994-3005.
+
+    </help>
+    <citations>
+        <citation type="doi">10.1186/1471-2105-10-421</citation>
+        <citation type="doi">10.1186/s13742-015-0080-7</citation>
+    </citations>
+</tool>