Mercurial > repos > peterjc > seq_select_by_id
annotate tools/seq_select_by_id/README.rst @ 6:91f55ee8fea5 draft
v0.0.11; more tests and assorting minor changes
author | peterjc |
---|---|
date | Wed, 13 May 2015 10:56:29 -0400 |
parents | 1a83f5ab9e95 |
children | a5602454b0ad |
rev | line source |
---|---|
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
1 Galaxy tool to select FASTA, QUAL, FASTQ or SFF sequences by ID |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
2 =============================================================== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
3 |
6 | 4 This tool is copyright 2011-2015 by Peter Cock, The James Hutton Institute |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
6 See the licence text below. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
7 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
8 This tool is a short Python script (using Biopython library functions) to extract |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
9 sequences from a FASTA, QUAL, FASTQ, or SFF file based on the list of IDs given |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
10 by a column of a tabular file. The output order follows that of the tabular file, |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
11 and if there are duplicates in the tabular file, there will be duplicates in the |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
12 output sequence file. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
13 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
14 This tool is available from the Galaxy Tool Shed at: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
15 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
16 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_select_by_id |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
17 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
18 See also the sister tools to filter sequence files according to IDs from column(s) |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
19 of a tabular file (where the output order follows the sequence file, and any |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
20 duplicate IDs are ignored) and rename sequences: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
21 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
22 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_id |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
23 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_rename |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
24 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
25 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
26 Automated Installation |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
27 ====================== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
28 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
29 This should be straightforward using the Galaxy Tool Shed, which should be |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
30 able to automatically install the dependency on Biopython, and then install |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
31 this tool and run its unit tests. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
32 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
33 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
34 Manual Installation |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
35 =================== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
36 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
37 There are just two files to install to use this tool from within Galaxy: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
38 |
6 | 39 * ``seq_select_by_id.py`` (the Python script) |
40 * ``seq_select_by_id.xml`` (the Galaxy tool definition) | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
41 |
6 | 42 The suggested location is a dedicated ``tools/seq_select_by_id`` folder. |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
43 |
6 | 44 You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer the |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
45 tool. One suggested location is in the filters section. Simply add the line:: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
46 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
47 <tool file="seq_select_by_id/seq_select_by_id.xml" /> |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
48 |
6 | 49 If you wish to run the unit tests, also move/copy the ``test-data/`` files |
50 under Galaxy's ``test-data/`` folder. Then:: | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
51 |
6 | 52 $ ./run_tests.sh -id seq_select_by_id |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
53 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
54 You will also need to install Biopython 1.54 or later. That's it. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
55 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
56 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
57 History |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
58 ======= |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
59 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
60 ======= ====================================================================== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
61 Version Changes |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
62 ------- ---------------------------------------------------------------------- |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
63 v0.0.1 - Initial version. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
64 v0.0.3 - Ignore blank lines in input. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
65 v0.0.4 - Record script version when run from Galaxy. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
66 - Basic unit test included. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
67 v0.0.5 - Check for errors using Python script's return code. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
68 v0.0.6 - Link to Tool Shed added to help text and this documentation. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
69 - Automatic installation of Biopython dependency. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
70 - Use reStructuredText for this README file. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
71 - Adopt standard MIT License. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
72 v0.0.7 - Updated citation information (Cock et al. 2013). |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
73 - Fixed Biopython dependency setup. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
74 - Development moved to GitHub, https://github.com/peterjc/pico_galaxy |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
75 - Renamed folder and adopted README.rst naming. |
6 | 76 v0.0.8 - Corrected automated dependency definition. |
77 v0.0.9 - Simplified XML to apply input format to output data. | |
78 - Tool definition now embeds citation information. | |
79 - Include input dataset name in output dataset names. | |
80 - If white space is found in the requested tabular field then only | |
81 the first word is used as the identifier (with a warning to stderr). | |
82 v0.0.10 - Includes testing of stdout messages. | |
83 - Includes testing of failure modes. | |
84 v0.0.11 - Use the ``format_source=...`` tag. | |
85 - Reorder XML elements (internal change only). | |
86 - Planemo for Tool Shed upload (``.shed.yml``, internal change only). | |
87 - Quote filenames in case of spaces (internal change only). | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
88 ======= ====================================================================== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
89 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
90 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
91 Developers |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
92 ========== |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
93 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
94 This script and related tools were initially developed on the following hg branch: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
95 http://bitbucket.org/peterjc/galaxy-central/src/tools |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
96 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
97 Development has now moved to a dedicated GitHub repository: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
98 https://github.com/peterjc/pico_galaxy/tree/master/tools |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
99 |
6 | 100 For pushing a release to the test or main "Galaxy Tool Shed", use the following |
101 Planemo commands (which requires you have set your Tool Shed access details in | |
102 ``~/.planemo.yml`` and that you have access rights on the Tool Shed):: | |
103 | |
104 $ planemo shed_upload --shed_target testtoolshed --check_diff ~/repositories/pico_galaxy/tools/seq_select_by_id/ | |
105 ... | |
106 | |
107 or:: | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
108 |
6 | 109 $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/seq_select_by_id/ |
110 ... | |
111 | |
112 To just build and check the tar ball, use:: | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
113 |
6 | 114 $ planemo shed_upload --tar_only ~/repositories/pico_galaxy/tools/seq_select_by_id/ |
115 ... | |
116 $ tar -tzf shed_upload.tar.gz | |
117 test-data/k12_hypothetical.fasta | |
118 test-data/k12_hypothetical.tabular | |
119 test-data/k12_hypothetical_alt.tabular | |
120 test-data/k12_ten_proteins.fasta | |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
121 tools/seq_select_by_id/README.rst |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
122 tools/seq_select_by_id/seq_select_by_id.py |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
123 tools/seq_select_by_id/seq_select_by_id.xml |
5
1a83f5ab9e95
Uploaded v0.0.8, corrected automated dependency definition
peterjc
parents:
4
diff
changeset
|
124 tools/seq_select_by_id/tool_dependencies.xml |
4
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
125 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
126 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
127 Licence (MIT) |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
128 ============= |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
129 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
130 Permission is hereby granted, free of charge, to any person obtaining a copy |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
131 of this software and associated documentation files (the "Software"), to deal |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
132 in the Software without restriction, including without limitation the rights |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
133 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
134 copies of the Software, and to permit persons to whom the Software is |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
135 furnished to do so, subject to the following conditions: |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
136 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
137 The above copyright notice and this permission notice shall be included in |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
138 all copies or substantial portions of the Software. |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
139 |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
140 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
141 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
142 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
143 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
144 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
145 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
6842c0c7bc70
Uploaded v0.0.7, depend on Biopython 1.62, tabs to spaces in XML
peterjc
parents:
diff
changeset
|
146 THE SOFTWARE. |