changeset 0:e3ee9f1693c3 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:42 -0500
parents
children 758e4a062992
files COPYING README.md blast_plus_remote_blastp.xml test-data/four_human_proteins.fasta test-data/rhodopsin_proteins.fasta tool-data/.gitkeep tool-data/blastdb_p.loc.sample tool_data_table_conf.xml.sample
diffstat 7 files changed, 928 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,121 @@
+Creative Commons Legal Code
+
+CC0 1.0 Universal
+
+    CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
+    LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
+    ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
+    INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
+    REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
+    PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
+    THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
+    HEREUNDER.
+
+Statement of Purpose
+
+The laws of most jurisdictions throughout the world automatically confer
+exclusive Copyright and Related Rights (defined below) upon the creator
+and subsequent owner(s) (each and all, an "owner") of an original work of
+authorship and/or a database (each, a "Work").
+
+Certain owners wish to permanently relinquish those rights to a Work for
+the purpose of contributing to a commons of creative, cultural and
+scientific works ("Commons") that the public can reliably and without fear
+of later claims of infringement build upon, modify, incorporate in other
+works, reuse and redistribute as freely as possible in any form whatsoever
+and for any purposes, including without limitation commercial purposes.
+These owners may contribute to the Commons to promote the ideal of a free
+culture and the further production of creative, cultural and scientific
+works, or to gain reputation or greater distribution for their Work in
+part through the use and efforts of others.
+
+For these and/or other purposes and motivations, and without any
+expectation of additional consideration or compensation, the person
+associating CC0 with a Work (the "Affirmer"), to the extent that he or she
+is an owner of Copyright and Related Rights in the Work, voluntarily
+elects to apply CC0 to the Work and publicly distribute the Work under its
+terms, with knowledge of his or her Copyright and Related Rights in the
+Work and the meaning and intended legal effect of CC0 on those rights.
+
+1. Copyright and Related Rights. A Work made available under CC0 may be
+protected by copyright and related or neighboring rights ("Copyright and
+Related Rights"). Copyright and Related Rights include, but are not
+limited to, the following:
+
+  i. the right to reproduce, adapt, distribute, perform, display,
+     communicate, and translate a Work;
+ ii. moral rights retained by the original author(s) and/or performer(s);
+iii. publicity and privacy rights pertaining to a person's image or
+     likeness depicted in a Work;
+ iv. rights protecting against unfair competition in regards to a Work,
+     subject to the limitations in paragraph 4(a), below;
+  v. rights protecting the extraction, dissemination, use and reuse of data
+     in a Work;
+ vi. database rights (such as those arising under Directive 96/9/EC of the
+     European Parliament and of the Council of 11 March 1996 on the legal
+     protection of databases, and under any national implementation
+     thereof, including any amended or successor version of such
+     directive); and
+vii. other similar, equivalent or corresponding rights throughout the
+     world based on applicable law or treaty, and any national
+     implementations thereof.
+
+2. Waiver. To the greatest extent permitted by, but not in contravention
+of, applicable law, Affirmer hereby overtly, fully, permanently,
+irrevocably and unconditionally waives, abandons, and surrenders all of
+Affirmer's Copyright and Related Rights and associated claims and causes
+of action, whether now known or unknown (including existing as well as
+future claims and causes of action), in the Work (i) in all territories
+worldwide, (ii) for the maximum duration provided by applicable law or
+treaty (including future time extensions), (iii) in any current or future
+medium and for any number of copies, and (iv) for any purpose whatsoever,
+including without limitation commercial, advertising or promotional
+purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
+member of the public at large and to the detriment of Affirmer's heirs and
+successors, fully intending that such Waiver shall not be subject to
+revocation, rescission, cancellation, termination, or any other legal or
+equitable action to disrupt the quiet enjoyment of the Work by the public
+as contemplated by Affirmer's express Statement of Purpose.
+
+3. Public License Fallback. Should any part of the Waiver for any reason
+be judged legally invalid or ineffective under applicable law, then the
+Waiver shall be preserved to the maximum extent permitted taking into
+account Affirmer's express Statement of Purpose. In addition, to the
+extent the Waiver is so judged Affirmer hereby grants to each affected
+person a royalty-free, non transferable, non sublicensable, non exclusive,
+irrevocable and unconditional license to exercise Affirmer's Copyright and
+Related Rights in the Work (i) in all territories worldwide, (ii) for the
+maximum duration provided by applicable law or treaty (including future
+time extensions), (iii) in any current or future medium and for any number
+of copies, and (iv) for any purpose whatsoever, including without
+limitation commercial, advertising or promotional purposes (the
+"License"). The License shall be deemed effective as of the date CC0 was
+applied by Affirmer to the Work. Should any part of the License for any
+reason be judged legally invalid or ineffective under applicable law, such
+partial invalidity or ineffectiveness shall not invalidate the remainder
+of the License, and in such case Affirmer hereby affirms that he or she
+will not (i) exercise any of his or her remaining Copyright and Related
+Rights in the Work or (ii) assert any associated claims and causes of
+action with respect to the Work, in either case contrary to Affirmer's
+express Statement of Purpose.
+
+4. Limitations and Disclaimers.
+
+ a. No trademark or patent rights held by Affirmer are waived, abandoned,
+    surrendered, licensed or otherwise affected by this document.
+ b. Affirmer offers the Work as-is and makes no representations or
+    warranties of any kind concerning the Work, express, implied,
+    statutory or otherwise, including without limitation warranties of
+    title, merchantability, fitness for a particular purpose, non
+    infringement, or the absence of latent or other defects, accuracy, or
+    the present or absence of errors, whether or not discoverable, all to
+    the greatest extent permissible under applicable law.
+ c. Affirmer disclaims responsibility for clearing rights of other persons
+    that may apply to the Work or any use thereof, including without
+    limitation any person's Copyright and Related Rights in the Work.
+    Further, Affirmer disclaims responsibility for obtaining any necessary
+    consents, permissions or other rights required for any use of the
+    Work.
+ d. Affirmer understands and acknowledges that Creative Commons is not a
+    party to this document and has no duty or obligation with respect to
+    this CC0 or use of the Work.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,47 @@
+GalaxyP - NCBI BLAST+ remote blastp
+===================================
+
+* Home: <https://github.com/galaxyproteomics/tools-galaxyp/>
+* Galaxy Tool Shed: <http://toolshed.g2.bx.psu.edu/view/galaxyp/blast_plus_remote_blastp>
+* Tool ID: `blast_plus_remote_blastp`
+
+
+Description
+-----------
+
+NCBI BLAST+ blastp with additional optional arguments.
+
+
+GalaxyP Community
+-----------------
+
+Current governing community policies for [GalaxyP](https://github.com/galaxyproteomics/) and other information can be found at:
+
+<https://github.com/galaxyproteomics>
+
+
+License
+-------
+
+Copyright (c) 2014 Regents of the University of Minnesota and Authors listed below.
+
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty.
+
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see <https://creativecommons.org/publicdomain/zero/1.0/>.
+
+You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
+
+
+Contributing
+------------
+
+Contributions to this repository are reviewed through pull requests. If you would like your work acknowledged, please also add yourself to the Authors section. If your pull request is accepted, you will also be acknowledged in <https://github.com/galaxyproteomics/tools-galaxyp/>
+
+
+Authors
+-------
+
+Authors and contributors:
+
+* John Chilton <jmchilton@gmail.com>
+* Minnesota Supercomputing Institute, Univeristy of Minnesota
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/blast_plus_remote_blastp.xml	Fri Jan 20 16:00:42 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>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/four_human_proteins.fasta	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,48 @@
+>sp|Q9BS26|ERP44_HUMAN Endoplasmic reticulum resident protein 44 OS=Homo sapiens GN=ERP44 PE=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PINFLTLYVTVQHKKLRTPLNYILLNLA
+VADLFMVLGGFTSTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGENHAIMGVAFT
+WVMALACAAPPLAGWSRYIPEGLQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIIIFFCYGQLVFTVKEAAAQQQES
+ATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQGSNFGPIFMTIPAFFAKSAAIYNPVIYIMMNKQFRNCMLTT
+ICCGKNPLGDDEASATVSKTETSQVAPA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rhodopsin_proteins.fasta	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,43 @@
+>gi|57163783|ref|NP_001009242.1| rhodopsin [Felis catus]
+MNGTEGPNFYVPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRT
+PLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVC
+KPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVV
+HFTIPMIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWVPYASVAFYIFTHQG
+SNFGPIFMTLPAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTGSKTETSQVAPA
+
+>gi|3024260|sp|P56514.1|OPSD_BUFBU RecName: Full=Rhodopsin
+MNGTEGPNFYIPMSNKTGVVRSPFEYPQYYLAEPWQYSILCAYMFLLILLGFPINFMTLYVTIQHKKLRT
+PLNYILLNLAFANHFMVLCGFTVTMYSSMNGYFILGATGCYVEGFFATLGGEIALWSLVVLAIERYVVVC
+KPMSNFRFSENHAVMGVAFTWIMALSCAVPPLLGWSRYIPEGMQCSCGVDYYTLKPEVNNESFVIYMFVV
+HFTIPLIIIFFCYGRLVCTVKEAAAQQQESATTQKAEKEVTRMVIIMVVFFLICWVPYASVAFFIFSNQG
+SEFGPIFMTVPAFFAKSSSIYNPVIYIMLNKQFRNCMITTLCCGKNPFGEDDASSAATSKTEASSVSSSQ
+VSPA
+
+>gi|283855846|gb|ADB45242.1| rhodopsin [Cynopterus brachyotis]
+VPFSNKTGVVRSPFEHPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLA
+VADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGE
+NHAIMGLALTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIF
+FCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGSNFGPIFMTL
+PAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS
+
+>gi|283855823|gb|ADB45229.1| rhodopsin [Myotis pilosus]
+VPFSNKTGVVRSPFEYPQYYLAEPWQFSMLAAYMFLLIVLGFPINFLTLYVTVQHKKLRTPLNYILLNLA
+VANLFMVFGGFTTTLYTSMHGYFVFGATGCNLEGFFATLGGEIALWSLVVLAIERYVVVCKPMSNFRFGE
+NHAIMGLAFTWVMALACAAPPLAGWSRYIPEGMQCSCGIDYYTLKPEVNNESFVIYMFVVHFTIPMIVIF
+FCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVVAFLICWLPYASVAFYIFTHQGSNFGPVFMTI
+PAFFAKSSSIYNPVIYIMMNKQFRNCMLTTLCCGKNPLGDDEASTTAS
+
+>gi|223523|prf||0811197A rhodopsin [Bos taurus]
+MNGTEGPNFYVPFSNKTGVVRSPFEAPQYYLAEPWQFSMLAAYMFLLIMLGFPINFLTLYVTVQHKKLRT
+PLNYILLNLAVADLFMVFGGFTTTLYTSLHGYFVFGPTGCNLEGFFATLGGEIALWSLVVLAIERYVVVC
+KPMSNFRFGENHAIMGVAFTWVMALACAAPPLVGWSRYIPEGMQCSCGIDYTPHEETNNESFVIYMFVVH
+FIIPLIVIFFCYGQLVFTVKEAAAQQQESATTQKAEKEVTRMVIIMVIAFLICWLPYAGVAFYIFTHQGS
+DFGPIFMTIPAFFAKTSAVYNPVIYIMMNKQFRNCMVTTLCCGKNPLGDDEASTTVSKTETSQVAPA
+
+>gi|12583665|dbj|BAB21486.1| fresh water form rod opsin [Conger myriaster]
+MNGTEGPNFYIPMSNATGVVRSPFEYPQYYLAEPWAFSALSAYMFFLIIAGFPINFLTLYVTIEHKKLRT
+PLNYILLNLAVADLFMVFGGFTTTMYTSMHGYFVFGPTGCNIEGFFATLGGEIALWCLVVLAIERWMVVC
+KPVTNFRFGESHAIMGVMVTWTMALACALPPLFGWSRYIPEGLQCSCGIDYYTRAPGINNESFVIYMFTC
+HFSIPLAVISFCYGRLVCTVKEAAAQQQESETTQRAEREVTRMVVIMVISFLVCWVPYASVAWYIFTHQG
+STFGPIFMTIPSFFAKSSALYNPMIYICMNKQFRHCMITTLCCGKNPFEEEDGASATSSKTEASSVSSSS
+VSPA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/blastdb_p.loc.sample	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,45 @@
+#NOTE: This file comes from the tool galaxyp/blast_plus_remote_blastp
+# This is a sample file distributed with Galaxy that is used to define a
+# list of protein BLAST databases, using three columns tab separated:
+#
+# <unique_id>{tab}<database_caption>{tab}<base_name_path>
+#
+# The captions typically contain spaces and might end with the build date.
+# It is important that the actual database name does not have a space in
+# it, and that there are only two tabs on each line.
+#
+# You can download the NCBI provided protein databases like NR from here:
+# ftp://ftp.ncbi.nlm.nih.gov/blast/db/
+#
+# For simplicity, many Galaxy servers are configured to offer just a live
+# version of each NCBI BLAST database (updated with the NCBI provided
+# Perl scripts or similar). In this case, we recommend using the case
+# sensistive base-name of the NCBI BLAST databases as the unique id.
+# Consistent naming is important for sharing workflows between Galaxy
+# servers.
+#
+# For example, consider the NCBI "non-redundant" protein BLAST database
+# where you have downloaded and decompressed the files under /data/blastdb/
+# meaning at the command line BLAST+ would be run with something like
+# which would look at the files /data/blastdb/nr.p*:
+#
+# $ blastp -db /data/blastdb/nr -query ...
+#
+# In this case use nr (lower case to match the NCBI file naming) as the
+# unique id in the first column of blastdb_p.loc, giving an entry like
+# this:
+#
+# nr{tab}NCBI non-redundant (nr){tab}/data/blastdb/nr
+#
+# Alternatively, rather than a "live" mirror of the NCBI databases which
+# are updated automatically, for full reproducibility the Galaxy Team
+# recommend saving date-stamped copies of the databases. In this case
+# your blastdb_p.loc file should include an entry per line for each
+# version you have stored. For example:
+#
+# nr_05Jun2010{tab}NCBI NR (non redundant) 05 Jun 2010{tab}/data/blastdb/05Jun2010/nr
+# nr_15Aug2010{tab}NCBI NR (non redundant) 15 Aug 2010{tab}/data/blastdb/15Aug2010/nr
+# ...etc...
+#
+# See also blastdb.loc which is for any nucleotide BLAST database, and
+# blastdb_d.loc which is for any protein domains databases (like CDD).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample	Fri Jan 20 16:00:42 2017 -0500
@@ -0,0 +1,6 @@
+<tables>
+    <table name="blastdb_p" comment_char="#" allow_duplicate_entries="False">
+        <columns>value, name, path</columns>
+        <file path="tool-data/blastdb_p.loc" />
+    </table>
+</tables>