changeset 0:820c41bff462

Uploaded
author galaxyp
date Wed, 01 Oct 2014 20:47:55 -0400
parents
children db990c5edc14
files COPYING README.md test-data/.gitkeep tool-data/.gitkeep tools/blast_plus_remote_blastp.xml tools/repository_dependencies.xml tools/tool_dependencies.xml
diffstat 5 files changed, 719 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/COPYING	Wed Oct 01 20:47:55 2014 -0400
@@ -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	Wed Oct 01 20:47:55 2014 -0400
@@ -0,0 +1,47 @@
+GalaxyP - NCBI BLAST+ remote blastp
+===================================
+
+* Home: <https://bitbucket.org/galaxyp/blast_plus_remote_blastp>
+* 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://bitbucket.org/galaxyp/) and other information can be found at:
+
+<https://bitbucket.org/galaxyp/galaxyp>
+
+
+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://bitbucket.org/galaxyp/galaxyp/CONTRIBUTORS.md> unless you opt-out.
+
+
+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/tools/blast_plus_remote_blastp.xml	Wed Oct 01 20:47:55 2014 -0400
@@ -0,0 +1,540 @@
+<tool id="blast_plus_remote_blastp" name="NCBI BLAST+ remote blastp" version="1.0">
+    <description>Search protein database with protein query sequence(s)</description>
+    <!-- If job splitting is enabled, break up the query file into four (This only works if output is tabular) -->
+    <parallelism method="multi" split_inputs="query" split_mode="number_of_parts" split_size="4" shared_inputs="subject" merge_outputs="output1"></parallelism>
+    <version_command>blastp -version</version_command>
+    <requirements>
+        <requirement type="package" version="333">binaries_for_blast_plus</requirement>
+    </requirements>
+    <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 == "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
+  #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
+#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="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="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="selected" >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 ) ">
+                        <dsvalidator 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</option>
+            <option value="blastp-short">blastp-short</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="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>
+                </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="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">
+                <!-- Could use a select (yes, no, other) where other allows setting 'window locut hicut' -->
+                <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>
+                <!--
+                Can't use '-ungapped' on its own, error back is:
+                Composition-adjusted searched are not supported with an ungapped search, please add -comp_based_stats F or do a gapped search
+                Tried using '-ungapped -comp_based_stats F' and blastp crashed with 'Attempt to access NULL pointer.'
+                <param name="ungapped" type="boolean" label="Perform ungapped alignment only?" truevalue="-ungapped -comp_based_stats F" falsevalue="" checked="false" />
+                -->
+                </conditional>
+
+                <!-- I'd like word_size to be optional, with minimum 2 for blastp -->
+                <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.value_label} on ${db_opts.db_opts_selector} ${db_opts.database}" from_work_dir="blast_output">
+            <filter>fmt_opt['out_format'] == "tabular"</filter>
+        </data>
+        <data name="output_xml" format="blastxml" label="${blast_type.value_label} 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.value_label} 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.value_label} 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>
+
+    <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>
+
+    <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="True" />
+            <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="True" />
+            <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="True" />
+            <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
+====== ============= ===========================================
+
+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>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/repository_dependencies.xml	Wed Oct 01 20:47:55 2014 -0400
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<repositories>
+  <repository changeset_revision="f66f8ca7b7b9" name="proteomics_datatypes" owner="iracooke" toolshed="https://toolshed.g2.bx.psu.edu" />
+  <repository changeset_revision="de11e1a921c4" name="blast_datatypes" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
+</repositories>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/tool_dependencies.xml	Wed Oct 01 20:47:55 2014 -0400
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<tool_dependency>
+  <package name="binaries_for_blast_plus" version="333">
+    <repository changeset_revision="a2ec897aac2c" name="package_blast_plus_2_2_29" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
+  </package>
+</tool_dependency>