changeset 27:6f8ea4b9a2c4 draft

"planemo upload for repository https://github.com/peterjc/galaxy_blast/tree/master/tools/ncbi_blast_plus commit 3f9f39ad808325a11d9967980d2cb82c96d69324"
author peterjc
date Wed, 09 Sep 2020 15:32:17 +0000
parents 2889433c7ae1
children 87a7ee4cb36f
files test-data/four_human_proteins.dbinfo.txt test-data/rhodopsin_nucs.dbinfo.txt test-data/three_human_mRNA.dbinfo.txt tools/ncbi_blast_plus/README.rst tools/ncbi_blast_plus/blastxml_to_tabular.xml tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml tools/ncbi_blast_plus/ncbi_macros.xml tools/ncbi_blast_plus/ncbi_makeblastdb.xml tools/ncbi_blast_plus/ncbi_makeprofiledb.xml tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml tools/ncbi_blast_plus/repository_dependencies.xml tools/ncbi_blast_plus/tool_dependencies.xml
diffstat 22 files changed, 245 insertions(+), 187 deletions(-) [+]
line wrap: on
line diff
--- a/test-data/four_human_proteins.dbinfo.txt	Sat Jul 20 18:36:36 2019 -0400
+++ b/test-data/four_human_proteins.dbinfo.txt	Wed Sep 09 15:32:17 2020 +0000
@@ -1,7 +1,3 @@
 Database: Just 4 human proteins
 	4 sequences; 3,297 total residues
 
-Date: Oct 31, 2017  4:23 PM	Longest sequence: 1,382 residues
-
-Volumes:
-	/mnt/galaxy/repositories/galaxy_blast/test-data/four_human_proteins_taxid.fasta
--- a/test-data/rhodopsin_nucs.dbinfo.txt	Sat Jul 20 18:36:36 2019 -0400
+++ b/test-data/rhodopsin_nucs.dbinfo.txt	Wed Sep 09 15:32:17 2020 +0000
@@ -1,7 +1,3 @@
 Database: Rhodopsin nucleotides
 	6 sequences; 10,296 total bases
 
-Date: Oct 31, 2017  4:23 PM	Longest sequence: 4,301 bases
-
-Volumes:
-	/mnt/galaxy/repositories/galaxy_blast/test-data/rhodopsin_nucs.fasta
--- a/test-data/three_human_mRNA.dbinfo.txt	Sat Jul 20 18:36:36 2019 -0400
+++ b/test-data/three_human_mRNA.dbinfo.txt	Wed Sep 09 15:32:17 2020 +0000
@@ -1,7 +1,3 @@
 Database: Just 3 human mRNA sequences
 	3 sequences; 10,732 total bases
 
-Date: Oct 31, 2017  4:23 PM	Longest sequence: 4,796 bases
-
-Volumes:
-	/mnt/galaxy/repositories/galaxy_blast/test-data/three_human_mRNA.fasta
--- a/tools/ncbi_blast_plus/README.rst	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/README.rst	Wed Sep 09 15:32:17 2020 +0000
@@ -101,8 +101,10 @@
 
 You can download the NCBI provided databases as tar-balls from here:
 
-* ftp://ftp.ncbi.nlm.nih.gov/blast/db/ (nucleotide and protein databases like NR)
-* ftp://ftp.ncbi.nih.gov/pub/mmdb/cdd/little_endian/ (domain databases like CDD)
+* ftp://ftp.ncbi.nlm.nih.gov/blast/db/ (nucleotide and protein databases like
+  NT and NR)
+* ftp://ftp.ncbi.nih.gov/pub/mmdb/cdd/little_endian/ (domain databases like
+  CDD)
 
 If using the optional taxonomy columns, you will also need to download the
 NCBI taxonomy files (``taxdb.btd`` and ``taxdb.bti`` from ``taxdb.tar.gz`` on
@@ -128,59 +130,102 @@
 History
 =======
 
+The wrappers now follow the Galaxy convention of underlying tool version with
+a galaxy specific suffix which gets reset to zero with each new BLAST version:
+
+============== ===============================================================
+Version        Changes
+-------------- ---------------------------------------------------------------
+2.7.1+galaxy0  - Adopted BLAST version with integer Galaxy wrapper suffix.
+               - Dropped legacy ``repository_dependencies.xml`` and
+                 ``tool_dependencies.xml`` files. Instead assumes conda for
+                 dependency resolution and requires at least Galaxy v16.10
+                 which includes the BLAST datatypes.
+               - ``blastdbcmd`` wrapper supports multiple locally installed
+                 databases (contribution from Frederic Sapet), or a database
+                 from your Galaxy history.
+============== ===============================================================
+
+Prior releases used a self-contained version number (deliberately kept low to
+avoid any confusion with the NCBI BLAST version numbers):
+
 ======= ======================================================================
 Version Changes
 ------- ----------------------------------------------------------------------
-v0.0.11 - Final revision as part of the Galaxy main repository, and the
-          first release via the Tool Shed
-v0.0.12 - Implements genetic code option for translation searches.
-        - Changes ``<parallelism>`` to 1000 sequences at a time (to cope with
-          very large sets of queries where BLAST+ can become memory hungry)
-        - Include warning that BLAST+ with subject FASTA gives pairwise
-          e-values
-v0.0.13 - Use the new error handling options in Galaxy (the previously
-          bundled ``hide_stderr.py`` script is no longer needed).
-v0.0.14 - Support for makeblastdb and blastdbinfo with local BLAST databases
-          in the history (using work from Edward Kirton), requires v0.0.14
-          of the ``blast_datatypes`` repository from the Tool Shed.
-v0.0.15 - Stronger warning in help text against searching against subject
-          FASTA files (better looking e-values than you might be expecting).
-v0.0.16 - Added repository_dependencies.xml for automates installation of the
-          ``blast_datatypes`` repository from the Tool Shed.
-v0.0.17 - The BLAST+ search tools now default to extended tabular output
-          (all too often our users where having to re-run searches just to
-          get one of the missing columns like query or subject length)
-v0.0.18 - Defensive quoting of filenames in case of spaces (where possible,
-          BLAST+ handling of some multi-file arguments is problematic).
-v0.0.19 - Added wrappers for rpsblast and rpstblastn, and new ``blastdb_d.loc``
-          for the domain databases they use (e.g. CDD, PFAM or SMART).
-        - Correct case of exception regular expression (for error handling
-          fall-back in case the return code is not set properly).
-        - Clearer naming of output files.
-v0.0.20 - Added unit tests for BLASTN and TBLASTX.
-        - Added percentage identity option to BLASTN.
-        - Fallback on ElementTree if cElementTree missing in XML to tabular.
-        - Link to Tool Shed added to help text and this documentation.
-        - Tweak dependency on ``blast_datatypes`` to also work on Test Tool Shed.
-        - Dependency on new ``package_blast_plus_2_2_26`` in Tool Shed.
-        - Adopted standard MIT License.
-        - Development moved to GitHub, https://github.com/peterjc/galaxy_blast
-        - Updated citation information (Cock et al. 2013).
-v0.0.21 - Use macros to simplify the XML wrappers (by John Chilton).
-        - Added wrapper for dustmasker.
-        - Enabled masking for makeblastdb (Nicola Soranzo).
-        - Requires ``maskinfo-asn1`` and ``maskinfo-asn1-binary`` datatypes,
-          defined in ``blast_datatypes`` v0.0.17  on Galaxy ToolShed.
-        - Tests updated for BLAST+ 2.2.27 instead of BLAST+ 2.2.26.
-        - Now depends on ``package_blast_plus_2_2_27`` in ToolShed.
-v0.0.22 - More use of macros to simplify the wrappers.
-        - Set number of threads via ``$GALAXY_SLOTS`` environment variable.
-        - More descriptive default output names.
-        - Tests require updated BLAST DB definitions (``blast_datatypes`` v0.0.18).
-        - Pre-check for duplicate identifiers in ``makeblastdb`` wrapper.
-        - Tests updated for BLAST+ 2.2.28 instead of BLAST+ 2.2.27.
-        - Now depends on ``package_blast_plus_2_2_28`` in ToolShed.
-        - Extended tabular output includes 'salltitles' as column 25.
+v0.3.3  - Fixed ``tool_dependencies.xml`` to use BLAST+ 2.7.1 (useful only for
+          older Galaxy instances - we recommend conda for dependencies now).
+v0.3.2  - Fixed incomplete ``@CLI_OPTIONS@`` macro in the help text for the
+          ``tblastn`` and ``blastdbcmd`` wrappers.
+v0.3.1  - Clarify help text for max hits option, confusing as depending on the
+          output format it must be mapped to different command line arguments.
+        - Extend gzipped query support to all the command line tools.
+        - Workaround for gzipped support under Galaxy release 16.01 or older.
+v0.3.0  - Updated for NCBI BLAST+ 2.7.1,
+        - Depends on BioConda or legacy ToolShed ``package_blast_plus_2_7_1``.
+        - Document the BLAST+ 2.6.0 change in the standard 12 column output
+          from ``qacc,sacc,...`` to ``qaccver,saccver,...`` instead.
+        - Accept gzipped FASTA inputs for subject files, queries to ``blastn``
+          and input to ``makeblastdb`` (contribution from Anton Nekrutenko).
+v0.2.02 - Document the BLAST+ 2.5.0 change in the standard 12 column output
+          from ``qseqid,sseqid,...`` to ``qacc,sacc,...`` instead.
+        - Support for per-matrix recommended gaps settings (``-gapopen`` and
+          ``-gapextend``, contribution from Caleb Easterly and Jim Johnson).
+        - Support for ``-window_size``, ``-threshold``, ``-comp_based_stats``
+          and revising ``-word_size`` to avoid using zero to mean default
+          (contribution from Caleb Easterly).
+v0.2.01 - Use ``<command detect_errors="aggressive">`` (internal change only).
+        - Single quote command line arguments (internal change only).
+        - Show BLAST command line argument corresponding to each tool
+          parameter (contribution from Nicola Soranzo).
+        - Add ``-max_hsps`` option (contribution from Nicola Soranzo).
+        - Add ``-use_sw_tback`` option for BLASTP (Nicola Soranzo).
+v0.2.00 - Updated for NCBI BLAST+ 2.5.0, where GI numbers are less visible,
+          tabular output changes with `-parse_deflines`, and percentage
+          identifies are now given to 3dp rather than 2dp.
+        - Depends on ``package_blast_plus_2_5_0`` in ToolShed, or BioConda.
+        - ``blastxml_to_tabular`` now also gives percentage idenity to 3dp.
+        - Removed never-used binary and Python module dependency declarations
+          (internal change only).
+v0.1.08 - Allow searching against multiple locally installed databases
+          (contribution from Gildas Le Corguillé and Emma Prudent).
+        - Minor XML and Python style changes (internal change only).
+        - Set ``allow_duplicate_entries="False"`` in sample configuration file
+          ``tool_data_table_conf.xml``.
+        - Fix identifers with pipes in ``blastdbcmd`` wrapper (Devon Ryan).
+v0.1.07 - Re-enabled some ``*.loc`` file tests (these had not been supported
+          on the Tool Shed test framework, but that is not currently in use).
+        - Fixed macro problem with version field in blastxml_to_tabular.xml
+          (contribution from Bjoern Gruening and Daniel Blankenberg).
+v0.1.06 - Now depends on ``package_blast_plus_2_2_31`` in ToolShed.
+        - Tests updated for BLAST+ 2.2.31 instead of BLAST+ 2.2.30.
+v0.1.05 - Define ``parallelism`` tag via a macro (internal change only).
+        - Define wrapper versions via a macro (internal change only).
+        - Update citation information now GigaScience paper is out.
+v0.1.04 - Fixed regression using BLAST databases from the history. Currently
+          Galaxy inputs must still use ``.extra_files_path`` rather than the
+          more consise ``.extra_files`` available for output files (Issue #69)
+v0.1.03 - Reorder XML elements (internal change only).
+        - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
+v0.1.02 - Now depends on ``package_blast_plus_2_2_30`` in ToolShed.
+        - Tests updated for BLAST+ 2.2.30 instead of BLAST+ 2.2.29.
+        - New tasks ``blastp-fast``, ``blastx-fast`` and ``tblastn-fast``.
+        - New minimum query HSP coverage option, ``-qcov_hsp_perc``.
+        - Removed ``-word_size`` from RPS-BLAST and RPS-TBLASTN wrappers, this
+          is set during database construction and should not have been offered
+          as a command line option in releases prior to BLAST+ 2.2.30.
+        - BLAST database ``blastdb*.loc`` files now accessed via the XML
+          table definitions in Galaxy's ``tool_data_table_conf.xml`` file,
+          setup via ``tool-data/tool_data_table_conf.xml.sample``
+        - Replace ``.extra_files_path`` with ``.files_path`` (internal change,
+          thanks to Bjoern Gruening and John Chilton).
+        - Added *"NCBI BLAST+ integrated into Galaxy"* preprint citation.
+v0.1.01 - Requires ``blastdbd`` datatype (``blast_datatypes`` v0.0.19).
+        - Wrapper for makeprofiledb added to create protein domain databases
+          (based on contribution from Bjoern Gruening).
+        - The RPS-BLAST and RPS-TBLASTN wrappers support using a protein
+          domain database from the user's history.
+        - Tool definitions now embed citation information (by John Chilton).
+        - BLAST tools support GI and SeqID filters (added by Bjoern Gruening).
 v0.1.00 - Now depends on ``package_blast_plus_2_2_29`` in ToolShed.
         - Tabular output now includes option to pick specific columns
           (based on contribution from Jim Johnson), including previously
@@ -194,80 +239,55 @@
         - Supports setting a taxonomy ID in ``makeblastdb`` wrapper.
         - Subtle changes like new conditional settings will require some old
           workflows be updated to cope.
-v0.1.01 - Requires ``blastdbd`` datatype (``blast_datatypes`` v0.0.19).
-        - Wrapper for makeprofiledb added to create protein domain databases
-          (based on contribution from Bjoern Gruening).
-        - The RPS-BLAST and RPS-TBLASTN wrappers support using a protein
-          domain database from the user's history.
-        - Tool definitions now embed citation information (by John Chilton).
-        - BLAST tools support GI and SeqID filters (added by Bjoern Gruening).
-v0.1.02 - Now depends on ``package_blast_plus_2_2_30`` in ToolShed.
-        - Tests updated for BLAST+ 2.2.30 instead of BLAST+ 2.2.29.
-        - New tasks ``blastp-fast``, ``blastx-fast`` and ``tblastn-fast``.
-        - New minimum query HSP coverage option, ``-qcov_hsp_perc``.
-        - Removed ``-word_size`` from RPS-BLAST and RPS-TBLASTN wrappers, this
-          is set during database construction and should not have been offered
-          as a command line option in releases prior to BLAST+ 2.2.30.
-        - BLAST database ``blastdb*.loc`` files now accessed via the XML
-          table definitions in Galaxy's ``tool_data_table_conf.xml`` file,
-          setup via ``tool-data/tool_data_table_conf.xml.sample``
-        - Replace ``.extra_files_path`` with ``.files_path`` (internal change,
-          thanks to Bjoern Gruening and John Chilton).
-        - Added *"NCBI BLAST+ integrated into Galaxy"* preprint citation.
-v0.1.03 - Reorder XML elements (internal change only).
-        - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
-v0.1.04 - Fixed regression using BLAST databases from the history. Currently
-          Galaxy inputs must still use ``.extra_files_path`` rather than the
-          more consise ``.extra_files`` available for output files (Issue #69)
-v0.1.05 - Define ``parallelism`` tag via a macro (internal change only).
-        - Define wrapper versions via a macro (internal change only).
-        - Update citation information now GigaScience paper is out.
-v0.1.06 - Now depends on ``package_blast_plus_2_2_31`` in ToolShed.
-        - Tests updated for BLAST+ 2.2.31 instead of BLAST+ 2.2.30.
-v0.1.07 - Re-enabled some ``*.loc`` file tests (these had not been supported
-          on the Tool Shed test framework, but that is not currently in use).
-        - Fixed macro problem with version field in blastxml_to_tabular.xml
-          (contribution from Bjoern Gruening and Daniel Blankenberg).
-v0.1.08 - Allow searching against multiple locally installed databases
-          (contribution from Gildas Le Corguillé and Emma Prudent).
-        - Minor XML and Python style changes (internal change only).
-        - Set ``allow_duplicate_entries="False"`` in sample configuration file
-          ``tool_data_table_conf.xml``.
-        - Fix identifers with pipes in ``blastdbcmd`` wrapper (Devon Ryan).
-v0.2.00 - Updated for NCBI BLAST+ 2.5.0, where GI numbers are less visible,
-          tabular output changes with `-parse_deflines`, and percentage
-          identifies are now given to 3dp rather than 2dp.
-        - Depends on ``package_blast_plus_2_5_0`` in ToolShed, or BioConda.
-        - ``blastxml_to_tabular`` now also gives percentage idenity to 3dp.
-        - Removed never-used binary and Python module dependency declarations
-          (internal change only).
-v0.2.01 - Use ``<command detect_errors="aggressive">`` (internal change only).
-        - Single quote command line arguments (internal change only).
-        - Show BLAST command line argument corresponding to each tool
-          parameter (contribution from Nicola Soranzo).
-        - Add ``-max_hsps`` option (contribution from Nicola Soranzo).
-        - Add ``-use_sw_tback`` option for BLASTP (Nicola Soranzo).
-v0.2.02 - Document the BLAST+ 2.5.0 change in the standard 12 column output
-          from ``qseqid,sseqid,...`` to ``qacc,sacc,...`` instead.
-        - Support for per-matrix recommended gaps settings (``-gapopen`` and
-          ``-gapextend``, contribution from Caleb Easterly and Jim Johnson).
-        - Support for ``-window_size``, ``-threshold``, ``-comp_based_stats``
-          and revising ``-word_size`` to avoid using zero to mean default
-          (contribution from Caleb Easterly).
-v0.3.0  - Updated for NCBI BLAST+ 2.7.1,
-        - Depends on BioConda or legacy ToolShed ``package_blast_plus_2_7_1``.
-        - Document the BLAST+ 2.6.0 change in the standard 12 column output
-          from ``qacc,sacc,...`` to ``qaccver,saccver,...`` instead.
-        - Accept gzipped FASTA inputs for subject files, queries to ``blastn``
-          and input to ``makeblastdb`` (contribution from Anton Nekrutenko).
-v0.3.1  - Clarify help text for max hits option, confusing as depending on the
-          output format it must be mapped to different command line arguments.
-        - Extend gzipped query support to all the command line tools.
-        - Workaround for gzipped support under Galaxy release 16.01 or older.
-v0.3.2  - Fixed incomplete ``@CLI_OPTIONS@`` macro in the help text for the
-          ``tblastn`` and ``blastdbcmd`` wrappers.
-v0.3.3  - Fixed ``tool_dependencies.xml`` to use BLAST+ 2.7.1 (useful only for
-          older Galaxy instances - we recommend conda for dependencies now).
+v0.0.21 - Use macros to simplify the XML wrappers (by John Chilton).
+        - Added wrapper for dustmasker.
+        - Enabled masking for makeblastdb (Nicola Soranzo).
+        - Requires ``maskinfo-asn1`` and ``maskinfo-asn1-binary`` datatypes,
+          defined in ``blast_datatypes`` v0.0.17  on Galaxy ToolShed.
+        - Tests updated for BLAST+ 2.2.27 instead of BLAST+ 2.2.26.
+        - Now depends on ``package_blast_plus_2_2_27`` in ToolShed.
+v0.0.20 - Added unit tests for BLASTN and TBLASTX.
+        - Added percentage identity option to BLASTN.
+        - Fallback on ElementTree if cElementTree missing in XML to tabular.
+        - Link to Tool Shed added to help text and this documentation.
+        - Tweak ``blast_datatypes`` to also work on Test Tool Shed.
+        - Dependency on new ``package_blast_plus_2_2_26`` in Tool Shed.
+        - Adopted standard MIT License.
+        - Development moved to GitHub, https://github.com/peterjc/galaxy_blast
+        - Updated citation information (Cock et al. 2013).
+v0.0.19 - Added wrappers for rpsblast and rpstblastn, and new ``blastdb_d.loc``
+          for the domain databases they use (e.g. CDD, PFAM or SMART).
+        - Correct case of exception regular expression (for error handling
+          fall-back in case the return code is not set properly).
+        - Clearer naming of output files.
+v0.0.17 - The BLAST+ search tools now default to extended tabular output
+          (all too often our users where having to re-run searches just to
+          get one of the missing columns like query or subject length)
+v0.0.16 - Added repository_dependencies.xml for automates installation of the
+          ``blast_datatypes`` repository from the Tool Shed.
+v0.0.15 - Stronger warning in help text against searching against subject
+          FASTA files (better looking e-values than you might be expecting).
+v0.0.14 - Support for makeblastdb and blastdbinfo with local BLAST databases
+          in the history (using work from Edward Kirton), requires v0.0.14
+          of the ``blast_datatypes`` repository from the Tool Shed.
+v0.0.13 - Use the new error handling options in Galaxy (the previously
+          bundled ``hide_stderr.py`` script is no longer needed).
+v0.0.12 - Implements genetic code option for translation searches.
+        - Changes ``<parallelism>`` to 1000 sequences at a time (to cope with
+          very large sets of queries where BLAST+ can become memory hungry)
+        - Include warning that BLAST+ with subject FASTA gives pairwise
+          e-values
+v0.0.11 - Final revision as part of the Galaxy main repository, and the
+          first release via the Tool Shed
+v0.0.22 - More use of macros to simplify the wrappers.
+        - Set number of threads via ``$GALAXY_SLOTS`` environment variable.
+        - More descriptive default output names.
+        - Tests require updated BLAST DB definitions (``blast_datatypes``
+          v0.0.18).
+        - Pre-check for duplicate identifiers in ``makeblastdb`` wrapper.
+        - Tests updated for BLAST+ 2.2.28 instead of BLAST+ 2.2.27.
+        - Now depends on ``package_blast_plus_2_2_28`` in ToolShed.
+        - Extended tabular output includes 'salltitles' as column 25.
 ======= ======================================================================
 
 
--- a/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/blastxml_to_tabular.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="blastxml_to_tabular" name="BLAST XML to tabular" version="@WRAPPER_VERSION@">
+<tool id="blastxml_to_tabular" name="BLAST XML to tabular" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Convert BLAST XML output to tabular</description>
     <macros>
         <import>ncbi_macros.xml</import>
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_info.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastdbcmd_info" name="NCBI BLAST+ database info" version="@WRAPPER_VERSION@">
+<tool id="ncbi_blastdbcmd_info" name="NCBI BLAST+ database info" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Show BLAST database information from blastdbcmd</description>
     <macros>
         <token name="@BINARY@">blastdbcmd</token>
@@ -6,29 +6,36 @@
     </macros>
     <expand macro="preamble" />
     <command detect_errors="aggressive">
-blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path}" -info -out "$info"
+blastdbcmd
+@DBCMD_OPTS@
+-info -out "$info"
     </command>
     <inputs>
         <expand macro="input_conditional_choose_db_type" />
     </inputs>
     <outputs>
-        <data name="info" format="txt" label="${db_opts.database.fields.name} info" />
+        <data name="info" format="txt" label="@ON_DBCMD_OPTS@ info" />
     </outputs>
     <tests>
         <test>
             <param name="db_opts|db_type" value="prot" />
-            <param name="db_opts|database" value="four_human_proteins" />
-            <output name="info" file="four_human_proteins.dbinfo.txt" ftype="txt" lines_diff="4" />
+            <param name="db_opts|db_origin|database" value="four_human_proteins" />
+            <output name="info" file="four_human_proteins.dbinfo.txt" ftype="txt" compare="contains" />
         </test>
         <test>
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="three_human_mRNA" />
-            <output name="info" file="three_human_mRNA.dbinfo.txt" ftype="txt" lines_diff="4" />
+            <param name="db_opts|db_origin|database" value="three_human_mRNA" />
+            <output name="info" file="three_human_mRNA.dbinfo.txt" ftype="txt" compare="contains" />
         </test>
         <test>
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="rhodopsin_nucs" />
-            <output name="info" file="rhodopsin_nucs.dbinfo.txt" ftype="txt" lines_diff="4" />
+            <param name="db_opts|db_origin|database" value="rhodopsin_nucs" />
+            <output name="info" file="rhodopsin_nucs.dbinfo.txt" ftype="txt" compare="contains" />
+        </test>
+        <test>
+            <param name="db_opts|db_type" value="nucl" />
+            <param name="db_opts|db_origin|database" value="three_human_mRNA,rhodopsin_nucs" />
+            <output name="info" file="three_human_mRNA_and_rhodopsin_nucs.dbinfo.txt" ftype="txt" compare="contains" />
         </test>
     </tests>
     <help>
--- a/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastdbcmd_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastdbcmd_wrapper" name="NCBI BLAST+ blastdbcmd entry(s)" version="@WRAPPER_VERSION@">
+<tool id="ncbi_blastdbcmd_wrapper" name="NCBI BLAST+ blastdbcmd entry(s)" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Extract sequence(s) from BLAST database</description>
     <macros>
         <token name="@BINARY@">blastdbcmd</token>
@@ -8,7 +8,8 @@
     <command detect_errors="aggressive" strict="true">
 ## The command is a Cheetah template which allows some Python based syntax.
 ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
-blastdbcmd -dbtype $db_opts.db_type -db "${db_opts.database.fields.path.replace(',',' ')}"
+blastdbcmd
+@DBCMD_OPTS@
 
 ##TODO: What about -ctrl_a and -target_only as advanced options?
 
@@ -67,12 +68,15 @@
         </param>
     </inputs>
     <outputs>
-        <data name="seq" format="fasta" label="Sequences from ${db_opts.database.fields.name}" />
+
+        <data name="seq" format="fasta" label="Sequences from blastdbcmd @ON_DBCMD_OPTS@">
+        </data>
     </outputs>
     <tests>
         <test>
             <param name="db_opts|db_type" value="prot" />
-            <param name="db_opts|database" value="four_human_proteins" />
+            <param name="db_opts|db_origin|database" value="four_human_proteins" />
+            <param name="db_opts|db_origin|db_origin_selector" value="db" />
             <param name="id_opts|id_type" value="prompt" />
             <param name="id_opts|entries" value="all" />
             <param name="outfmt" value="original" />
@@ -81,7 +85,7 @@
         <test>
             <!-- This used to recover the original FASTA file, but had GI numbers -->
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="rhodopsin_nucs" />
+            <param name="db_opts|db_origin|database" value="rhodopsin_nucs" />
             <param name="id_opts|id_type" value="prompt" />
             <param name="id_opts|entries" value="all" />
             <param name="outfmt" value="original" />
@@ -90,7 +94,7 @@
         <test>
             <!-- This uses various start end frame combinations but all recover full sequence -->
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="rhodopsin_nucs" />
+            <param name="db_opts|db_origin|database" value="rhodopsin_nucs" />
             <param name="id_opts|id_type" value="file" />
             <param name="id_opts|entries" value="rhodopsin_nucs.blastdbcmd.txt" ftype="txt" />
             <param name="outfmt" value="original" />
@@ -98,7 +102,7 @@
         </test>
         <test>
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="rhodopsin_nucs" />
+            <param name="db_opts|db_origin|database" value="rhodopsin_nucs" />
             <param name="id_opts|id_type" value="prompt" />
             <param name="id_opts|entries" value="U59921.1" />
             <param name="outfmt" value="original" />
@@ -106,7 +110,8 @@
         </test>
         <test>
             <param name="db_opts|db_type" value="nucl" />
-            <param name="db_opts|database" value="rhodopsin_nucs" />
+            <!-- look in two databases for this entry -->
+            <param name="db_opts|db_origin|database" value="rhodopsin_nucs,three_human_mRNA" />
             <param name="id_opts|id_type" value="prompt" />
             <param name="id_opts|entries" value="gi|2734705|gb|U59921.1|BBU59921" />
             <param name="outfmt" value="original" />
--- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="@WRAPPER_VERSION@">
+<tool id="ncbi_blastn_wrapper" name="NCBI BLAST+ blastn" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search nucleotide database with nucleotide query sequence(s)</description>
     <macros>
         <token name="@BINARY@">blastn</token>
--- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="@WRAPPER_VERSION@">
+<tool id="ncbi_blastp_wrapper" name="NCBI BLAST+ blastp" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search protein database with protein query sequence(s)</description>
     <macros>
         <token name="@BINARY@">blastp</token>
--- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="@WRAPPER_VERSION@">
+<tool id="ncbi_blastx_wrapper" name="NCBI BLAST+ blastx" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search protein database with translated nucleotide query sequence(s)</description>
     <macros>
         <token name="@BINARY@">blastx</token>
--- a/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_convert2blastmask_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_convert2blastmask_wrapper" name="NCBI BLAST+ convert2blastmask" version="@WRAPPER_VERSION@">
+<tool id="ncbi_convert2blastmask_wrapper" name="NCBI BLAST+ convert2blastmask" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Convert masking information in lower-case masked FASTA input to file formats suitable for makeblastdb</description>
     <macros>
         <token name="@BINARY@">convert2blastmask</token>
--- a/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_dustmasker_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_dustmasker_wrapper" name="NCBI BLAST+ dustmasker" version="@WRAPPER_VERSION@">
+<tool id="ncbi_dustmasker_wrapper" name="NCBI BLAST+ dustmasker" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <!-- dustmasker wrapper from Edward Kirton and Nicola Soranzo -->
     <description>masks low complexity regions</description>
     <macros>
--- a/tools/ncbi_blast_plus/ncbi_macros.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_macros.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,5 +1,7 @@
 <macros>
-    <token name="@WRAPPER_VERSION@">0.3.3</token>
+    <token name="@TOOL_VERSION@">2.7.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">16.10</token>
     <xml name="parallelism">
         <!-- If job splitting is enabled, break up the query file into parts -->
         <parallelism method="multi" split_inputs="query" split_mode="to_size" split_size="1000" merge_outputs="output1" />
@@ -7,7 +9,7 @@
 
     <xml name="preamble">
         <requirements>
-            <requirement type="package" version="2.7.1">blast</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">blast</requirement>
         </requirements>
         <version_command>@BINARY@ -version</version_command>
     </xml>
@@ -426,14 +428,40 @@
               <option value="prot">Protein</option>
             </param>
             <when value="nucl">
-                <param name="database" argument="-db" type="select" multiple="true" label="Nucleotide BLAST database">
-                    <options from_data_table="blastdb" />
-                </param>
+                <conditional name="db_origin">
+                    <param name="db_origin_selector" type="select" label="Subject database/sequences">
+                          <option value="db" selected="true">Locally installed BLAST database</option>
+                          <option value="histdb">BLAST database from your history</option>
+                    </param>
+                    <when value="db">
+                        <param name="database" argument="-db" type="select" multiple="true" label="Nucleotide BLAST database">
+                            <options from_data_table="blastdb" />
+                        </param>
+                        <param name="histdb" type="hidden" value="" />
+                    </when>
+                    <when value="histdb">
+                        <param name="database" type="hidden" value="" />
+                        <param name="histdb" type="data" format="blastdbn" label="Nucleotide BLAST database" />
+                    </when>
+                </conditional>
             </when>
             <when value="prot">
-                <param name="database" argument="-db" type="select" multiple="true" label="Protein BLAST database">
-                    <options from_data_table="blastdb_p" />
-                </param>
+                <conditional name="db_origin">
+                    <param name="db_origin_selector" type="select" label="Subject database/sequences">
+                          <option value="db" selected="true">Locally installed BLAST database</option>
+                          <option value="histdb">BLAST database from your history</option>
+                      </param>
+                      <when value="db">
+                          <param name="database" argument="-db" type="select" multiple="true" label="Protein BLAST database">
+                            <options from_data_table="blastdb_p" />
+                        </param>
+                        <param name="histdb" type="hidden" value="" />
+                      </when>
+                      <when value="histdb">
+                        <param name="database" type="hidden" value="" />
+                        <param name="histdb" type="data" format="blastdbp" label="Protein BLAST database" />
+                      </when>
+                </conditional>
             </when>
         </conditional>
     </xml>
@@ -574,6 +602,17 @@
 #end if
     ]]></token>
 
+    <!-- Implement -dbtype and -db command line options (in blastdbcmd) -->
+    <token name="@DBCMD_OPTS@"><![CDATA[
+-dbtype "$db_opts.db_type"
+#if $db_opts.db_origin.db_origin_selector=="db":
+  -db "${db_opts.db_origin.database.fields.path.replace(',',' ')}"
+#else if $db_opts.db_origin.db_origin_selector=="histdb":
+  -db '${os.path.join($db_opts.db_origin.histdb.extra_files_path, "blastdb")}'
+#end if
+    ]]></token>
+
+    <!-- Implement -db ... / -subject ... command line options -->
     <token name="@BLAST_DB_SUBJECT@"><![CDATA[
 #if $db_opts.db_opts_selector == "db":
   -db '${" ".join(str($db_opts.database.fields.path).split(","))}'
@@ -699,6 +738,15 @@
 #end if
 ]]></token>
 
+    <!-- @ON_DBCMD_OPTS@ is for use with @DBCMD_OPTS@ -->
+    <token name="@ON_DBCMD_OPTS@"><![CDATA[
+#if str($db_opts.db_origin.db_origin_selector)=="db"
+'${db_opts.db_origin.database}'
+#else
+'${db_opts.db_origin.histdb.name}'
+#end if
+]]></token>
+
     <token name="@REFERENCES@"><![CDATA[
 Peter J. A. Cock, John M. Chilton, Björn Grüning, James E. Johnson, Nicola Soranzo (2015).
 NCBI BLAST+ integrated into Galaxy. *GigaScience* 4:39
--- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_makeblastdb" name="NCBI BLAST+ makeblastdb" version="@WRAPPER_VERSION@">
+<tool id="ncbi_makeblastdb" name="NCBI BLAST+ makeblastdb" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Make BLAST database</description>
     <macros>
         <token name="@BINARY@">makeblastdb</token>
--- a/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_makeprofiledb" name="NCBI BLAST+ makeprofiledb" version="@WRAPPER_VERSION@">
+<tool id="ncbi_makeprofiledb" name="NCBI BLAST+ makeprofiledb" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Make profile database</description>
     <macros>
         <token name="@BINARY@">makeprofiledb</token>
--- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_rpsblast_wrapper" name="NCBI BLAST+ rpsblast" version="@WRAPPER_VERSION@">
+<tool id="ncbi_rpsblast_wrapper" name="NCBI BLAST+ rpsblast" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search protein domain database (PSSMs) with protein query sequence(s)</description>
     <macros>
         <token name="@BINARY@">deltablast</token>
--- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_rpstblastn_wrapper" name="NCBI BLAST+ rpstblastn" version="@WRAPPER_VERSION@">
+<tool id="ncbi_rpstblastn_wrapper" name="NCBI BLAST+ rpstblastn" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search protein domain database (PSSMs) with translated nucleotide query sequence(s)</description>
     <macros>
         <token name="@BINARY@">rpstblastn</token>
--- a/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_segmasker_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_segmasker_wrapper" name="NCBI BLAST+ segmasker" version="@WRAPPER_VERSION@">
+<tool id="ncbi_segmasker_wrapper" name="NCBI BLAST+ segmasker" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>low-complexity regions in protein sequences</description>
     <macros>
         <token name="@BINARY@">segmasker</token>
--- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_tblastn_wrapper" name="NCBI BLAST+ tblastn" version="@WRAPPER_VERSION@">
+<tool id="ncbi_tblastn_wrapper" name="NCBI BLAST+ tblastn" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search translated nucleotide database with protein query sequence(s)</description>
     <macros>
         <token name="@BINARY@">tblastn</token>
@@ -146,7 +146,7 @@
             <param name="max_hits" value="0" />
             <param name="word_size" value="" />
             <param name="parse_deflines" value="false" />
-            <output name="output1" file="tblastn_four_human_vs_rhodopsin.html" ftype="html" lines_diff="8" />
+            <output name="output1" file="tblastn_four_human_vs_rhodopsin.html" ftype="html" lines_diff="10" />
         </test>
     </tests>
     <help>
--- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Sat Jul 20 18:36:36 2019 -0400
+++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml	Wed Sep 09 15:32:17 2020 +0000
@@ -1,4 +1,4 @@
-<tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="@WRAPPER_VERSION@">
+<tool id="ncbi_tblastx_wrapper" name="NCBI BLAST+ tblastx" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Search translated nucleotide database with translated nucleotide query sequence(s)</description>
     <macros>
         <token name="@BINARY@">tblastx</token>
--- a/tools/ncbi_blast_plus/repository_dependencies.xml	Sat Jul 20 18:36:36 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-<?xml version="1.0" ?>
-<repositories description="This requires the BLAST datatype definitions (e.g. the BLAST XML format).">
-    <repository changeset_revision="01b38f20197e" name="blast_datatypes" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu"/>
-</repositories>
\ No newline at end of file
--- a/tools/ncbi_blast_plus/tool_dependencies.xml	Sat Jul 20 18:36:36 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" ?>
-<tool_dependency>
-    <package name="blast" version="2.7.1">
-        <repository changeset_revision="2e9109a8924f" name="package_blast_plus_2_7_1" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu"/>
-    </package>
-</tool_dependency>
\ No newline at end of file