comparison tools/blastxml_to_top_descr/README.rst @ 13:8dc4ba7eba5d draft default tip

v0.1.2 with Python 3.9 declaration
author peterjc
date Sun, 17 Sep 2023 13:01:56 +0000
parents fe1ed74793c9
children
comparison
equal deleted inserted replaced
12:fe1ed74793c9 13:8dc4ba7eba5d
1 Galaxy tool to extract top BLAST hit descriptions from BLAST XML 1 Galaxy tool to extract top BLAST hit descriptions from BLAST XML
2 ================================================================ 2 ================================================================
3 3
4 This tool is copyright 2012-2013 by Peter Cock, The James Hutton Institute 4 This tool is copyright 2012-2015 by Peter Cock, The James Hutton Institute
5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. 5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
6 See the licence text below. 6 See the licence text below.
7 7
8 This tool is a short Python script to parse a BLAST XML file, and extract the 8 This tool is a short Python script to parse a BLAST XML file, and extract the
9 identifiers with description for the top matches (by default the top 3), and 9 identifiers with description for the top matches (by default the top 3), and
10 output these as a simple tabular file along with the query identifiers. 10 output these as a simple tabular file along with the query identifiers.
11 11
12 It is available from the Galaxy Tool Shed at: 12 It is available from the Galaxy Tool Shed at:
13 http://toolshed.g2.bx.psu.edu/view/peterjc/blastxml_to_top_descr 13 http://toolshed.g2.bx.psu.edu/view/peterjc/blastxml_to_top_descr
14 14
15 This requires the 'blast_datatypes' repository from the Galaxy Tool Shed 15 This requires the ``blast_datatypes`` repository from the Galaxy Tool Shed
16 to provide the 'blastxml' file format definition. 16 to provide the ``blastxml`` file format definition.
17 17
18 18
19 Automated Installation 19 Automated Installation
20 ====================== 20 ======================
21 21
22 This should be straightforward, Galaxy should automatically install the 22 This should be straightforward, Galaxy should automatically install the
23 'blast_datatypes' dependency. 23 ``blast_datatypes`` dependency.
24 24
25 25
26 Manual Installation 26 Manual Installation
27 =================== 27 ===================
28 28
29 If you haven't done so before, first install the 'blast_datatypes' repository. 29 If you haven't done so before, first install the ``blast_datatypes`` repository.
30 30
31 There are just two files to install (if doing this manually): 31 There are just two files to install (if doing this manually):
32 32
33 * blastxml_to_top_descr.py (the Python script) 33 - ``blastxml_to_top_descr.py`` (the Python script)
34 * blastxml_to_top_descr.xml (the Galaxy tool definition) 34 - ``blastxml_to_top_descr.xml`` (the Galaxy tool definition)
35 35
36 The suggested location is in the Galaxy folder tools/ncbi_blast_plus next to 36 The suggested location is in the Galaxy folder ``tools/ncbi_blast_plus/``
37 the NCBI BLAST+ tool wrappers. 37 next to the NCBI BLAST+ tool wrappers.
38 38
39 You will also need to modify the tools_conf.xml file to tell Galaxy to offer 39 You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer
40 the tool. e.g. next to the NCBI BLAST+ tools. Simply add the line:: 40 the tool. e.g. next to the NCBI BLAST+ tools. Simply add the line::
41 41
42 <tool file="ncbi_blast_plus/blastxml_to_top_descr.xml" /> 42 <tool file="ncbi_blast_plus/blastxml_to_top_descr.xml" />
43 43
44 To run the tool's tests, also add this line to tools_conf.xml.sample then:: 44 If you wish to run the unit tests, alsomove/copy the ``test-data/`` files
45 under Galaxy's ``test-data/`` folder. Then::
45 46
46 $ sh run_functional_tests.sh -id blastxml_to_top_descr 47 $ sh run_tests.sh -id blastxml_to_top_descr
47 48
48 49
49 History 50 History
50 ======= 51 =======
51 52
52 ======= ====================================================================== 53 ======= ======================================================================
53 Version Changes 54 Version Changes
54 ------- ---------------------------------------------------------------------- 55 ------- ----------------------------------------------------------------------
55 v0.0.1 - Initial version. 56 v0.0.1 - Initial version.
56 v0.0.2 - Since BLAST+ was moved out of the Galaxy core, now have a dependency 57 v0.0.2 - Since BLAST+ was moved out of the Galaxy core, now have a dependency
57 on the 'blast_datatypes' repository in the Tool Shed. 58 on the ``blast_datatypes`` repository in the Tool Shed.
58 v0.0.3 - Include the test files required to run the unit tests 59 v0.0.3 - Include the test files required to run the unit tests
59 v0.0.4 - Quote filenames in case they contain spaces (internal change) 60 v0.0.4 - Quote filenames in case they contain spaces (internal change)
60 v0.0.5 - Include number of queries with BLAST matches in stdout (peek text) 61 v0.0.5 - Include number of queries with BLAST matches in stdout (peek text)
61 v0.0.6 - Check for errors via the script's return code (internal change) 62 v0.0.6 - Check for errors via the script's return code (internal change)
62 v0.0.7 - Link to Tool Shed added to help text and this documentation. 63 v0.0.7 - Link to Tool Shed added to help text and this documentation.
63 - Tweak dependency on blast_datatypes to also work on Test Tool Shed 64 - Tweak dependency on ``blast_datatypes`` to also work on Test Tool Shed
64 - Adopt standard MIT License. 65 - Adopt standard MIT License.
65 v0.0.8 - Development moved to GitHub, https://github.com/peterjc/galaxy_blast 66 v0.0.8 - Development moved to GitHub, https://github.com/peterjc/galaxy_blast
66 v0.0.9 - Updated citation information (Cock et al. 2013). 67 v0.0.9 - Updated citation information (Cock et al. 2013).
67 v0.0.10 - Update help text to mention BLAST+ 2.2.28 can produce tabular files 68 v0.0.10 - Update help text to mention BLAST+ 2.2.28 can produce tabular files
68 including the description/title (via the salltitles field). 69 including the description/title (via the salltitles field).
69 v0.1.0 - Switch to using an optparse based API for Python script internally. 70 v0.1.0 - Switch to using an optparse based API for Python script internally.
70 - Support BLAST XML with multiple ``<Iteration>`` blocks per query. 71 - Support BLAST XML with multiple ``<Iteration>`` blocks per query.
71 - Support the default 25 column extended tabular BLAST output. 72 - Support the default 25 column extended tabular BLAST output.
72 v0.1.1 - Embed citation information in the tool XML (new Galaxy feature). 73 v0.1.1 - Embed citation information in the tool XML (new Galaxy feature).
74 v0.1.2 - Reorder XML elements (internal change only).
75 - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
76 - Use ``<command detect_errors="aggressive">`` (internal change only).
77 - Single quote command line arguments (internal change only).
78 - Python 3 compatible syntax.
73 ======= ====================================================================== 79 ======= ======================================================================
74 80
75 81
76 Bug Reports 82 Bug Reports
77 =========== 83 ===========
87 the following Mercurial repository: https://bitbucket.org/peterjc/galaxy-central/ 93 the following Mercurial repository: https://bitbucket.org/peterjc/galaxy-central/
88 94
89 As of July 2013, development is continuing on a dedicated GitHub repository: 95 As of July 2013, development is continuing on a dedicated GitHub repository:
90 https://github.com/peterjc/galaxy_blast 96 https://github.com/peterjc/galaxy_blast
91 97
92 For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use 98 For pushing a release to the test or main "Galaxy Tool Shed", use the following
93 the following command from the GitHub repository root folder:: 99 Planemo commands (which requires you have set your Tool Shed access details in
100 ``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
94 101
95 $ tar -czf blastxml_to_top_descr.tar.gz tools/blastxml_to_top_descr/README.rst tools/blastxml_to_top_descr/blastxml_to_top_descr.* tools/blastxml_to_top_descr/repository_dependencies.xml test-data/blastp_four_human_vs_rhodopsin.xml test-data/blastp_four_human_vs_rhodopsin_top3.tabular test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular 102 $ planemo shed_update -t testtoolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
103 ...
96 104
97 Check this worked:: 105 or::
98 106
99 $ tar -tzf blastxml_to_top_descr.tar.gz 107 $ planemo shed_update -t toolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
108 ...
109
110 To just build and check the tar ball, use::
111
112 $ planemo shed_upload --tar_only ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
113 ...
114 $ tar -tzf shed_upload.tar.gz
115 test-data/blastp_four_human_vs_rhodopsin.xml
116 test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
117 test-data/blastp_four_human_vs_rhodopsin_top3.tabular
118 test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
100 tools/blastxml_to_top_descr/README.rst 119 tools/blastxml_to_top_descr/README.rst
101 tools/blastxml_to_top_descr/blastxml_to_top_descr.py 120 tools/blastxml_to_top_descr/blastxml_to_top_descr.py
102 tools/blastxml_to_top_descr/blastxml_to_top_descr.xml 121 tools/blastxml_to_top_descr/blastxml_to_top_descr.xml
103 tools/blastxml_to_top_descr/repository_dependencies.xml 122 tools/blastxml_to_top_descr/repository_dependencies.xml
104 test-data/blastp_four_human_vs_rhodopsin.xml
105 test-data/blastp_four_human_vs_rhodopsin_top3.tabular
106 test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
107 test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
108 123
109 124
110 Licence (MIT) 125 Licence (MIT)
111 ============= 126 =============
112 127