Mercurial > repos > peterjc > seq_filter_by_mapping
annotate tools/seq_filter_by_mapping/README.rst @ 5:1d6c149ca211 draft
Bump Biopython dependency
author | peterjc |
---|---|
date | Thu, 30 Nov 2023 09:50:23 +0000 |
parents | f82868a026ea |
children |
rev | line source |
---|---|
0 | 1 Galaxy tool to filter FASTA, FASTQ or SFF sequences by SAM/BAM mapping |
2 ====================================================================== | |
3 | |
5 | 4 This tool is copyright 2014-2023 by Peter Cock, The James Hutton Institute |
0 | 5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. |
6 See the licence text below. | |
7 | |
8 This tool is a short Python script (using Biopython library functions) which | |
9 divides a FASTA, FASTQ, or SFF file in two, those sequences which do or do | |
10 not map according to given SAM/BAM file(s). | |
11 | |
12 Example uses include mapping of FASTQ reads against a known contaminant | |
13 in order to remove reads prior to a de novo assembly. | |
14 | |
15 This tool is available from the Galaxy Tool Shed at: | |
16 | |
17 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_mapping | |
18 | |
19 See also related tools: | |
20 | |
21 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_filter_by_id | |
22 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_select_by_id | |
23 * http://toolshed.g2.bx.psu.edu/view/peterjc/seq_rename | |
24 | |
25 | |
26 Automated Installation | |
27 ====================== | |
28 | |
29 This should be straightforward using the Galaxy Tool Shed, which should be | |
30 able to automatically install the dependency on Biopython and samtools | |
31 and then install this tool and run its unit tests. | |
32 | |
33 | |
34 Manual Installation | |
35 =================== | |
36 | |
37 There are just two files to install to use this tool from within Galaxy: | |
38 | |
39 * ``seq_filter_by_mapping.py`` (the Python script) | |
40 * ``seq_filter_by_mapping.xml`` (the Galaxy tool definition) | |
41 | |
42 The suggested location is a dedicated ``tools/seq_filter_by_mapping/`` folder. | |
43 | |
44 You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer the | |
45 tool. One suggested location is in the filters section. Simply add the line:: | |
46 | |
47 <tool file="seq_filter_by_mapping/seq_filter_by_mapping.xml" /> | |
48 | |
49 If you wish to run the unit tests, also move/copy the ``test-data/`` files | |
50 under Galaxy's ``test-data/`` folder. Then:: | |
51 | |
52 $ ./run_tests.sh -id seq_filter_by_mapping | |
53 | |
54 You will also need to install Biopython 1.54 or later. That's it. | |
55 | |
56 | |
57 History | |
58 ======= | |
59 | |
60 ======= ====================================================================== | |
61 Version Changes | |
62 ------- ---------------------------------------------------------------------- | |
63 v0.0.1 - Initial version. | |
64 v0.0.2 - Fixed some error messages. | |
1 | 65 v0.0.3 - Report counts for FASTQ as done for FASTA and SFF files. |
66 v0.0.4 - Use the ``format_source=...`` tag. | |
67 - Reorder XML elements (internal change only). | |
68 - Planemo for Tool Shed upload (``.shed.yml``, internal change only). | |
2
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
69 v0.0.5 - Python script cleanups (internal change only). |
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
70 - Depends on Biopython 1.67 via legacy Tool Shed package or bioconda. |
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
71 - Use ``<command detect_errors="aggressive">`` (internal change only). |
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
72 - Single quote command line arguments (internal change only). |
3 | 73 v0.0.6 - Python 3 compatible print function. |
4 | 74 v0.0.7 - Script works on Python 2 and 3 (fixed input file mode) |
5 | 75 v0.0.8 - Bumped Biopython dependency version for Python 3 fixes. |
0 | 76 ======= ====================================================================== |
77 | |
78 | |
79 Developers | |
80 ========== | |
81 | |
82 Development is on this GitHub repository: | |
83 https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_mapping | |
84 | |
85 Much of the code was copied from my older tool: | |
86 https://github.com/peterjc/pico_galaxy/tree/master/tools/seq_filter_by_id | |
87 | |
1 | 88 For pushing a release to the test or main "Galaxy Tool Shed", use the following |
89 Planemo commands (which requires you have set your Tool Shed access details in | |
90 ``~/.planemo.yml`` and that you have access rights on the Tool Shed):: | |
91 | |
2
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
92 $ planemo shed_update -t testtoolshed --check_diff tools/seq_filter_by_mapping/ |
1 | 93 ... |
94 | |
95 or:: | |
0 | 96 |
2
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
97 $ planemo shed_update -t toolshed --check_diff tools/seq_filter_by_mapping/ |
1 | 98 ... |
99 | |
100 To just build and check the tar ball, use:: | |
0 | 101 |
2
48e71dfd51b3
v0.0.5 Depend on Biopython 1.67 from Tool Shed or (Bio)conda
peterjc
parents:
1
diff
changeset
|
102 $ planemo shed_upload --tar_only tools/seq_filter_by_mapping/ |
1 | 103 ... |
104 $ tar -tzf shed_upload.tar.gz | |
105 test-data/SRR639755_mito_pairs.fastq.gz | |
106 test-data/SRR639755_sample_by_coord.sam | |
107 test-data/SRR639755_sample_lax.fastq | |
108 test-data/SRR639755_sample_strict.fastq | |
0 | 109 tools/seq_filter_by_mapping/README.rst |
110 tools/seq_filter_by_mapping/seq_filter_by_mapping.py | |
111 tools/seq_filter_by_mapping/seq_filter_by_mapping.xml | |
112 tools/seq_filter_by_mapping/tool_dependencies.xml | |
113 | |
114 | |
115 Licence (MIT) | |
116 ============= | |
117 | |
118 Permission is hereby granted, free of charge, to any person obtaining a copy | |
119 of this software and associated documentation files (the "Software"), to deal | |
120 in the Software without restriction, including without limitation the rights | |
121 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
122 copies of the Software, and to permit persons to whom the Software is | |
123 furnished to do so, subject to the following conditions: | |
124 | |
125 The above copyright notice and this permission notice shall be included in | |
126 all copies or substantial portions of the Software. | |
127 | |
128 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
129 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
130 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
131 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
132 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
133 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
134 THE SOFTWARE. |