# HG changeset patch # User peterjc # Date 1540298899 14400 # Node ID e25d3acf6e682982e709a3b72fcdac488f9d545b # Parent c877294f80259135b0f74da4cddfe99d3a7a7e19 v0.3.1 completed gzip support diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/README.rst --- a/tools/ncbi_blast_plus/README.rst Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/README.rst Tue Oct 23 08:48:19 2018 -0400 @@ -213,7 +213,7 @@ 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. + - 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 @@ -252,13 +252,18 @@ - 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 + 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 (contribution from Anton Nekrutenko). + - 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. ======= ====================================================================== diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/blastxml_to_tabular.py --- a/tools/ncbi_blast_plus/blastxml_to_tabular.py Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/blastxml_to_tabular.py Tue Oct 23 08:48:19 2018 -0400 @@ -168,6 +168,7 @@ def convert(blastxml_filename, output_handle): + """Convert BLAST XML input from a file to tabular on given handle.""" blast_program = None # get an iterable try: diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastn_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -11,11 +11,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastn -#if $query.is_of_type('fasta.gz'): --query <(gunzip -c '${query}') -#else: --query '${query}' -#end if +@QUERY@ @BLAST_DB_SUBJECT@ -task '${blast_type}' -evalue '${evalue_cutoff}' @@ -43,7 +39,7 @@ ]]> - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastp_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## 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' +@QUERY@ @BLAST_DB_SUBJECT@ -task $blast_type -evalue $evalue_cutoff @@ -33,7 +33,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_blastx_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces blastx --query '$query' +@QUERY@ @BLAST_DB_SUBJECT@ -query_gencode $query_gencode -task $blast_type @@ -33,7 +33,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_macros.xml --- a/tools/ncbi_blast_plus/ncbi_macros.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_macros.xml Tue Oct 23 08:48:19 2018 -0400 @@ -1,5 +1,5 @@ - 0.3.0 + 0.3.1 @@ -12,6 +12,14 @@ @BINARY@ -version + + + + + + + + @@ -443,7 +451,7 @@ - + @@ -558,13 +566,21 @@ -num_threads "\${GALAXY_SLOTS:-8}" + + $adv_opts.filter_query =0> +## Number of database sequences to show one-line descriptions for +## Not applicable for outfmt > 4 +## Default = `500' +## * Incompatible with: max_target_seqs +## -num_alignments =0> +## Number of database sequences to show alignments for +## Default = `250' +## * Incompatible with: max_target_seqs +## +## *** Restrict search or results +## +## -max_target_seqs =1> +## Maximum number of aligned sequences to keep +## Not applicable for outfmt <= 4 +## Default = `500' +## * Incompatible with: num_descriptions, num_alignments +## +## So, taken at face value we do still need to treat the Text and HTML output +## differently from the Tabular and XML, yet the treatment of these limits is +## different (during search or after the search when writing the output): +## https://blastedbio.blogspot.com/2015/12/blast-max-target-sequences-bug.html +## +## See also our user-facing help text. #if (str($adv_opts.max_hits) and int(str($adv_opts.max_hits)) > 0): #if str($output.out_format) in ["6", "ext", "cols", "5"]: ## Most output formats use this, including tabular and XML: -max_target_seqs '${adv_opts.max_hits}' #else ## Text and HTML output formats 0-4 currently need this instead: - -num_descriptions $adv_opts.max_hits -num_alignments $adv_opts.max_hits + -num_descriptions '${adv_opts.max_hits}' -num_alignments '${adv_opts.max_hits}' #end if #end if #if str($adv_opts.max_hsps) diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_makeblastdb.xml --- a/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_makeblastdb.xml Tue Oct 23 08:48:19 2018 -0400 @@ -17,7 +17,7 @@ ##into a single cat command below cat #for i in $input_file: - #if $i.is_of_type('fasta.gz'): + #if $i.is_of_type('fasta.gz') and $i.ext != "fasta": <(gunzip -c ${i}) #else: ${i} diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_makeprofiledb.xml --- a/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_makeprofiledb.xml Tue Oct 23 08:48:19 2018 -0400 @@ -90,7 +90,7 @@ - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_rpsblast_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces rpsblast --query '$query' +@QUERY@ #if $db_opts.db_opts_selector == "db": -db '${db_opts.database.fields.path}' #elif $db_opts.db_opts_selector == "histdb": @@ -28,7 +28,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_rpstblastn_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces rpstblastn --query '$query' +@QUERY@ #if $db_opts.db_opts_selector == "db": -db '${db_opts.database.fields.path}' #elif $db_opts.db_opts_selector == "histdb": @@ -28,7 +28,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_tblastn_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces tblastn --query '$query' +@QUERY@ @BLAST_DB_SUBJECT@ -task $blast_type -evalue $evalue_cutoff @@ -33,7 +33,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml --- a/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/ncbi_tblastx_wrapper.xml Tue Oct 23 08:48:19 2018 -0400 @@ -10,7 +10,7 @@ ## The command is a Cheetah template which allows some Python based syntax. ## Lines starting hash hash are comments. Galaxy will turn newlines into spaces tblastx --query '$query' +@QUERY@ @BLAST_DB_SUBJECT@ -query_gencode $query_gencode -evalue $evalue_cutoff @@ -30,7 +30,7 @@ #end if - + diff -r c877294f8025 -r e25d3acf6e68 tools/ncbi_blast_plus/tool_dependencies.xml --- a/tools/ncbi_blast_plus/tool_dependencies.xml Mon Jul 09 10:08:16 2018 -0400 +++ b/tools/ncbi_blast_plus/tool_dependencies.xml Tue Oct 23 08:48:19 2018 -0400 @@ -1,6 +1,6 @@ - - + +