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