annotate tools/coverage_stats/README.rst @ 4:ed501717f6cd draft default tip

"Update all the pico_galaxy tools on main Tool Shed"
author peterjc
date Fri, 16 Apr 2021 22:34:30 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
1 BAM coverage statistics using samtools idxstats and depth
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
2 =========================================================
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
3
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
4 This tool is copyright 2014-2017 by Peter Cock, The James Hutton Institute
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
5 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
6 See the licence text below.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
7
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
8 Internally this tool uses the command-line samtools suite.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
9
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
10 This tool is available from the Galaxy Tool Shed at:
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
11 http://toolshed.g2.bx.psu.edu/view/peterjc/coverage_stats
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
12
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
13
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
14 Automated Installation
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
15 ======================
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
16
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
17 This should be straightforward, provided your Galaxy is setup to use Conda and
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
18 BioConda for dependencies - Galaxy should then automatically download and
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
19 install the expected version of samtools.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
20
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
21
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
22 Manual Installation
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
23 ===================
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
24
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
25 This expects samtools to be on the ``$PATH``, and was tested using v1.3.1.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
26
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
27 To install the wrapper copy or move the following files under the Galaxy tools
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
28 folder, e.g. in a ``tools/coverage_stats`` folder:
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
29
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
30 * ``coverage_stats.xml`` (the Galaxy tool definition)
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
31 * ``coverage_stats.py`` (the Python wrapper script)
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
32 * ``README.rst`` (this file)
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
33
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
34 You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
35 the tool. Just add the line, perhaps under the NGS tools section::
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
36
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
37 <tool file="coverage_stats/coverage_stats.xml" />
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
38
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
39 If you wish to run the unit tests, also move/copy the ``test-data/`` files
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
40 under Galaxy's ``test-data/`` folder. Then::
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
41
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
42 $ ./run_tests.sh -id coverage_stats
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
43
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
44 That's it.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
45
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
46
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
47 History
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
48 =======
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
49
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
50 ======= ======================================================================
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
51 Version Changes
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
52 ------- ----------------------------------------------------------------------
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
53 v0.0.1 - Initial public release
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
54 v0.0.2 - Cope with samtools' default depth limit using modified samtools,
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
55 see https://github.com/samtools/samtools/pull/322
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
56 v0.0.3 - Cope with no coverage in final contigs.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
57 v0.0.4 - Reorder XML elements (internal change only).
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
58 - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
59 v0.0.5 - Expose new ``samtools depth -d ...`` argument added in samtools v1.3
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
60 - Depends on samtools v1.4.1 via Conda, which IS NOT AVAILABLE as a
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
61 legacy Tool Shed package.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
62 - Apply the new maximum depth parameter within the script to ensure
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
63 excess coverage is clear by getting the max coverage equal to the
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
64 max depth setting (the raw output from samtools is more fuzzy).
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
65 - Report total length and overall mean coverage in stdout.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
66 - Use ``<command detect_errors="aggressive">`` (internal change only).
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
67 - Single quote command line arguments (internal change only).
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
68 v0.0.6 - Python 3 compatibility fix.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
69 v0.1.0 - Provide proper command line API for the Python script.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
70 ======= ======================================================================
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
71
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
72
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
73 Developers
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
74 ==========
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
75
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
76 Development is on this GitHub repository:
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
77 https://github.com/peterjc/pico_galaxy/tree/master/tools/coverage_stats
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
78
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
79 For pushing a release to the test or main "Galaxy Tool Shed", use the following
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
80 Planemo commands (which requires you have set your Tool Shed access details in
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
81 ``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
82
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
83 $ planemo shed_update -t testtoolshed --check_diff tools/coverage_stats/
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
84 ...
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
85
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
86 or::
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
87
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
88 $ planemo shed_update -t toolshed --check_diff tools/coverage_stats/
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
89 ...
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
90
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
91 To just build and check the tar ball, use::
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
92
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
93 $ planemo shed_upload --tar_only tools/coverage_stats/
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
94 ...
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
95 $ tar -tzf shed_upload.tar.gz
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
96 tools/coverage_stats/README.rst
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
97 tools/coverage_stats/coverage_stats.xml
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
98 tools/coverage_stats/coverage_stats.py
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
99 ...
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
100
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
101
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
102 Licence (MIT)
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
103 =============
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
104
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
105 Permission is hereby granted, free of charge, to any person obtaining a copy
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
106 of this software and associated documentation files (the "Software"), to deal
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
107 in the Software without restriction, including without limitation the rights
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
108 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
109 copies of the Software, and to permit persons to whom the Software is
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
110 furnished to do so, subject to the following conditions:
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
111
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
112 The above copyright notice and this permission notice shall be included in
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
113 all copies or substantial portions of the Software.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
114
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
115 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
116 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
117 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
118 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
119 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
120 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
121 THE SOFTWARE.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
122
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
123 NOTE: This is the licence for the Galaxy Wrapper only.
ed501717f6cd "Update all the pico_galaxy tools on main Tool Shed"
peterjc
parents:
diff changeset
124 samtools is available and licenced separately.