annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
1 Galaxy tool to extract top BLAST hit descriptions from BLAST XML
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
2 ================================================================
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
3
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
4 This tool is copyright 2012-2015 by Peter Cock, The James Hutton Institute
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
6 See the licence text below.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
7
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
8 This tool is a short Python script to parse a BLAST XML file, and extract the
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
9 identifiers with description for the top matches (by default the top 3), and
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
10 output these as a simple tabular file along with the query identifiers.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
12 It is available from the Galaxy Tool Shed at:
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
13 http://toolshed.g2.bx.psu.edu/view/peterjc/blastxml_to_top_descr
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
14
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
15 This requires the ``blast_datatypes`` repository from the Galaxy Tool Shed
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
16 to provide the ``blastxml`` file format definition.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
17
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
18
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
19 Automated Installation
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
20 ======================
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
21
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
22 This should be straightforward, Galaxy should automatically install the
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
23 ``blast_datatypes`` dependency.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
24
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
25
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
26 Manual Installation
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
27 ===================
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
28
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
29 If you haven't done so before, first install the ``blast_datatypes`` repository.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
30
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
31 There are just two files to install (if doing this manually):
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
32
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
33 - ``blastxml_to_top_descr.py`` (the Python script)
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
34 - ``blastxml_to_top_descr.xml`` (the Galaxy tool definition)
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
35
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
36 The suggested location is in the Galaxy folder ``tools/ncbi_blast_plus/``
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
37 next to the NCBI BLAST+ tool wrappers.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
38
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
39 You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
40 the tool. e.g. next to the NCBI BLAST+ tools. Simply add the line::
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
41
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
42 <tool file="ncbi_blast_plus/blastxml_to_top_descr.xml" />
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
43
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
44 If you wish to run the unit tests, alsomove/copy the ``test-data/`` files
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
45 under Galaxy's ``test-data/`` folder. Then::
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
46
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
47 $ sh run_tests.sh -id blastxml_to_top_descr
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
48
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
49
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
50 History
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
51 =======
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
52
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
53 ======= ======================================================================
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
54 Version Changes
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
55 ------- ----------------------------------------------------------------------
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
56 v0.0.1 - Initial version.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
57 v0.0.2 - Since BLAST+ was moved out of the Galaxy core, now have a dependency
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
58 on the ``blast_datatypes`` repository in the Tool Shed.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
59 v0.0.3 - Include the test files required to run the unit tests
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
60 v0.0.4 - Quote filenames in case they contain spaces (internal change)
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
61 v0.0.5 - Include number of queries with BLAST matches in stdout (peek text)
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
62 v0.0.6 - Check for errors via the script's return code (internal change)
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
63 v0.0.7 - Link to Tool Shed added to help text and this documentation.
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
64 - Tweak dependency on ``blast_datatypes`` to also work on Test Tool Shed
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
65 - Adopt standard MIT License.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
66 v0.0.8 - Development moved to GitHub, https://github.com/peterjc/galaxy_blast
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
67 v0.0.9 - Updated citation information (Cock et al. 2013).
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
68 v0.0.10 - Update help text to mention BLAST+ 2.2.28 can produce tabular files
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
69 including the description/title (via the salltitles field).
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
70 v0.1.0 - Switch to using an optparse based API for Python script internally.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
71 - Support BLAST XML with multiple ``<Iteration>`` blocks per query.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
72 - Support the default 25 column extended tabular BLAST output.
12
fe1ed74793c9 Uploaded v0.1.1, embed citation in tool XML
peterjc
parents: 11
diff changeset
73 v0.1.1 - Embed citation information in the tool XML (new Galaxy feature).
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
74 v0.1.2 - Reorder XML elements (internal change only).
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
75 - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
76 - Use ``<command detect_errors="aggressive">`` (internal change only).
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
77 - Single quote command line arguments (internal change only).
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
78 - Python 3 compatible syntax.
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
79 ======= ======================================================================
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
80
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
81
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
82 Bug Reports
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
83 ===========
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
84
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
85 You can file an issue here https://github.com/peterjc/galaxy_blast/issues or ask
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
86 us on the Galaxy development list http://lists.bx.psu.edu/listinfo/galaxy-dev
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
87
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
88
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
89 Developers
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
90 ==========
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
91
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
92 This script and related tools were originally developed on the 'tools' branch of
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
93 the following Mercurial repository: https://bitbucket.org/peterjc/galaxy-central/
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
94
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
95 As of July 2013, development is continuing on a dedicated GitHub repository:
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
96 https://github.com/peterjc/galaxy_blast
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
97
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
98 For pushing a release to the test or main "Galaxy Tool Shed", use the following
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
99 Planemo commands (which requires you have set your Tool Shed access details in
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
100 ``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
101
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
102 $ planemo shed_update -t testtoolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
103 ...
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
104
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
105 or::
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
106
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
107 $ planemo shed_update -t toolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
108 ...
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
109
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
110 To just build and check the tar ball, use::
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
111
13
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
112 $ planemo shed_upload --tar_only ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
113 ...
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
114 $ tar -tzf shed_upload.tar.gz
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
115 test-data/blastp_four_human_vs_rhodopsin.xml
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
116 test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
117 test-data/blastp_four_human_vs_rhodopsin_top3.tabular
8dc4ba7eba5d v0.1.2 with Python 3.9 declaration
peterjc
parents: 12
diff changeset
118 test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
11
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
119 tools/blastxml_to_top_descr/README.rst
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
120 tools/blastxml_to_top_descr/blastxml_to_top_descr.py
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
121 tools/blastxml_to_top_descr/blastxml_to_top_descr.xml
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
122 tools/blastxml_to_top_descr/repository_dependencies.xml
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
123
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
124
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
125 Licence (MIT)
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
126 =============
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
127
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
128 Permission is hereby granted, free of charge, to any person obtaining a copy
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
129 of this software and associated documentation files (the "Software"), to deal
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
130 in the Software without restriction, including without limitation the rights
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
131 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
132 copies of the Software, and to permit persons to whom the Software is
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
133 furnished to do so, subject to the following conditions:
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
134
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
135 The above copyright notice and this permission notice shall be included in
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
136 all copies or substantial portions of the Software.
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
137
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
138 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
139 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
140 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
141 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
142 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
143 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
98f8431dab44 Uploaded v0.1.0, now also handles extended tabular BLAST output.
peterjc
parents:
diff changeset
144 THE SOFTWARE.