From 7c89456b6a986259c96b8d280c53e4ab155696ef Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Thu, 23 Jan 2020 09:37:58 +0100 Subject: [PATCH 1/2] Develop (#911) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * copy changes from bgruening * this file should not be here since years (#845) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * this file should not be here since years * Add Arabidopsis TAIR10 (A_thaliana_Jun_2009) (#853) Using output from: faCount A_thaliana_Jun_2009.fa #seq len A C G T N cpg Chr1 30427671 9709674 5435374 5421151 9697113 164359 697370 Chr2 19698289 6315641 3542973 3520766 6316348 2561 457572 Chr3 23459830 7484757 4258333 4262704 7448059 5977 559031 Chr4 18585056 5940546 3371349 3356091 5914038 3032 439585 Chr5 26975502 8621974 4832253 4858759 8652238 10278 630299 ChrC 154478 48546 28496 27570 49866 0 4639 ChrM 366924 102464 82661 81609 100190 0 13697 total 119667750 38223602 21551439 21528650 38177852 186207 2802193 hpc $ python Python 2.7.11 (default, Jul 25 2019, 12:10:26) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 119667750-186207 119481543 * Fix python version in Azure tests (#860) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * Fix python version * Update azure-pipelines.yml * fixed typo (#864) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * fixed typo * Update test images, skip testing if the wrong matplotlib version is used (#865) * Update test images, skip testing if the wrong matplotlib version is used * Update test-template.yml * linting * can't conda activate on azure * now the heatmap is correct and the profile is wrong * lint * only one test should fail now * Fix #844 * Should fix one test at least * fix last tests * fix #838 (#843) * fix #838 * fixes * Update CHANGES.txt * Close #868 #867 and #851 (#869) * Fix #868 * Fix #867 * Default ALL the things! * Fix #866 (#871) * Release 3.3.1 (#873) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * release 3.3.1 * try github actions * each action is a file * OK, that's inflexible * OK, the action.yml thing is a mess * syntax * ok, try this * uses * spacing * ok * do anchors work? * boo, so duplicative! * oops * maybe this will work for pypi * ensure dist is empty * nev * rename * bump version number * Actionable active actions acting actively (#874) * give actions another try * wrong docs? * ok * hmm * WTF * ah, we CAN give a path * hmm * actions everywhere * foo * artifacts * fix #889 (#891) * Fix888 (#892) * fix x-axis profile tick positions * set minimum matplotlib version to 3.1.0 * fix hexbin and overlapped_lines too * fix #887 (#893) * update change log * Seaborn colormaps (#894) * add seaborn colormaps * bump version and finally change license * indenting * update colormaps in galaxy wrapper * update version in galaxy wrapper * changelog * wrong issue number * pep8 * pep8 * pep8 * pep8 * added clusterUsingSamples to heatmap * Added a couple of assertions to cehck the range of samples' indices * Using --xRange and --yRange fails in galaxy due to the single quote. … (#901) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * Release 3.3.1 (#872) * copy changes from bgruening * this file should not be here since years (#845) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * this file should not be here since years * Add Arabidopsis TAIR10 (A_thaliana_Jun_2009) (#853) Using output from: faCount A_thaliana_Jun_2009.fa #seq len A C G T N cpg Chr1 30427671 9709674 5435374 5421151 9697113 164359 697370 Chr2 19698289 6315641 3542973 3520766 6316348 2561 457572 Chr3 23459830 7484757 4258333 4262704 7448059 5977 559031 Chr4 18585056 5940546 3371349 3356091 5914038 3032 439585 Chr5 26975502 8621974 4832253 4858759 8652238 10278 630299 ChrC 154478 48546 28496 27570 49866 0 4639 ChrM 366924 102464 82661 81609 100190 0 13697 total 119667750 38223602 21551439 21528650 38177852 186207 2802193 hpc $ python Python 2.7.11 (default, Jul 25 2019, 12:10:26) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 119667750-186207 119481543 * Fix python version in Azure tests (#860) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * Fix python version * Update azure-pipelines.yml * fixed typo (#864) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * fixed typo * Update test images, skip testing if the wrong matplotlib version is used (#865) * Update test images, skip testing if the wrong matplotlib version is used * Update test-template.yml * linting * can't conda activate on azure * now the heatmap is correct and the profile is wrong * lint * only one test should fail now * Fix #844 * Should fix one test at least * fix last tests * fix #838 (#843) * fix #838 * fixes * Update CHANGES.txt * Close #868 #867 and #851 (#869) * Fix #868 * Fix #867 * Default ALL the things! * Fix #866 (#871) * release 3.3.1 * try github actions * each action is a file * OK, that's inflexible * OK, the action.yml thing is a mess * syntax * ok, try this * uses * spacing * ok * do anchors work? * boo, so duplicative! * oops * maybe this will work for pypi * ensure dist is empty * nev * rename * bump version number * Using --xRange and --yRange fails in galaxy due to the single quote. Removed them. * Try just changing the wrapper * fix wrapper linting * plotCorrelation wrapper works properly now * Add separate linting step to catch some of this in the future Co-authored-by: Devon Ryan Co-authored-by: Björn Grüning Co-authored-by: Steffen Möller * Documentation fixes, closes #886 (#905) * Fix #902 (#906) * [WIP] added a silhouette calculation (#876) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * Release 3.3.1 (#872) * copy changes from bgruening * this file should not be here since years (#845) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * this file should not be here since years * Add Arabidopsis TAIR10 (A_thaliana_Jun_2009) (#853) Using output from: faCount A_thaliana_Jun_2009.fa #seq len A C G T N cpg Chr1 30427671 9709674 5435374 5421151 9697113 164359 697370 Chr2 19698289 6315641 3542973 3520766 6316348 2561 457572 Chr3 23459830 7484757 4258333 4262704 7448059 5977 559031 Chr4 18585056 5940546 3371349 3356091 5914038 3032 439585 Chr5 26975502 8621974 4832253 4858759 8652238 10278 630299 ChrC 154478 48546 28496 27570 49866 0 4639 ChrM 366924 102464 82661 81609 100190 0 13697 total 119667750 38223602 21551439 21528650 38177852 186207 2802193 hpc $ python Python 2.7.11 (default, Jul 25 2019, 12:10:26) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 119667750-186207 119481543 * Fix python version in Azure tests (#860) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * Fix python version * Update azure-pipelines.yml * fixed typo (#864) * Develop (#827) * Merged into the wrong branch without noticing :( (#814) * use better conda link (#799) * Estimated filtering fix (#813) * oops * fix testing and set a max number of filtered reads * apparently a bunch of things were getting skipped * fix wrappers * update computeMatrix wrapper * Decrease memory needs (#817) * Use an iterator to not blow memory up * Update a bit more * The GC bias stuff is all deprecated, I'm not fixing that old code * Cache resulting counts rather than just decreasing the bin size (#818) * Cache resulting counts rather than just decreasing the bin size * sanity check * Implement #815 * [skip ci] update change log * Implement #816 (#825) * Implement #816 * expose option * Add a test using pseudocounts and skipZeroOverZero * syntax * Fix tests * Make --skipZeroOverZero a galaxy macro and add to bigwigCompare * [ci skip] a bit of formatting * Fix #822 (#826) * fixes linting issues (#837) * Delete #test.bg# (#859) File is removed upon clean. * fixed typo * Update test images, skip testing if the wrong matplotlib version is used (#865) * Update test images, skip testing if the wrong matplotlib version is used * Update test-template.yml * linting * can't conda activate on azure * now the heatmap is correct and the profile is wrong * lint * only one test should fail now * Fix #844 * Should fix one test at least * fix last tests * fix #838 (#843) * fix #838 * fixes * Update CHANGES.txt * Close #868 #867 and #851 (#869) * Fix #868 * Fix #867 * Default ALL the things! * Fix #866 (#871) * release 3.3.1 * try github actions * each action is a file * OK, that's inflexible * OK, the action.yml thing is a mess * syntax * ok, try this * uses * spacing * ok * do anchors work? * boo, so duplicative! * oops * maybe this will work for pypi * ensure dist is empty * nev * rename * bump version number * added a silhouette calculation * remove sklearn, implement with scipy and numpy * Update requirements.txt * Update setup.py * Update heatmapper.py * update galaxy wrapper * Fix run time issues * refactor, the order matters here. * removing debugging stuff * Update heatmapper.py * Update plotHeatmap.py Co-authored-by: Devon Ryan Co-authored-by: Björn Grüning Co-authored-by: Steffen Möller * mention silhouette score * update help location * see if this fixes things (#909) Co-authored-by: Björn Grüning Co-authored-by: Ann Loraine Co-authored-by: Jan Janssen Co-authored-by: Ömer An Co-authored-by: LeilyR Co-authored-by: cgirardot Co-authored-by: Steffen Möller Co-authored-by: Lucille Delisle --- .github/workflows/test.yml | 65 +- .planemo.sh | 1 + CHANGES.txt | 10 + LICENSE.txt | 675 +-------------- README.md | 8 +- README.rst | 3 +- deeptools/_version.py | 2 +- deeptools/bamCoverage.py | 5 +- deeptools/bamPEFragmentSize.py | 1 + deeptools/cm.py | 1088 ++++++++++++++++++++++++ deeptools/computeMatrixOperations.py | 2 +- deeptools/correlation.py | 1 + deeptools/correlation_heatmap.py | 1 + deeptools/countReadsPerBin.py | 20 +- deeptools/heatmapper.py | 78 +- deeptools/heatmapper_utilities.py | 14 +- deeptools/multiBamSummary.py | 8 + deeptools/parserCommon.py | 28 +- deeptools/plotCorrelation.py | 1 + deeptools/plotCoverage.py | 1 + deeptools/plotEnrichment.py | 1 + deeptools/plotFingerprint.py | 1 + deeptools/plotHeatmap.py | 23 +- deeptools/plotPCA.py | 1 + deeptools/plotProfile.py | 11 +- deeptools/utilities.py | 1 + docs/content/example_gallery.rst | 4 - docs/content/example_step_by_step.rst | 3 +- docs/content/help_faq.rst | 2 +- docs/content/help_galaxy_dataup.rst | 2 +- docs/content/help_galaxy_deeptools.rst | 2 +- docs/content/help_galaxy_intro.rst | 2 +- docs/content/help_glossary.rst | 2 +- docs/content/installation.rst | 3 +- docs/content/tools/computeMatrix.rst | 5 +- docs/index.rst | 2 +- galaxy/wrapper/deepTools_macros.xml | 53 +- galaxy/wrapper/plotCorrelation.xml | 40 +- galaxy/wrapper/plotEnrichment.xml | 1 - galaxy/wrapper/readme.rst | 2 +- requirements.txt | 2 +- setup.py | 4 +- 42 files changed, 1376 insertions(+), 803 deletions(-) create mode 100644 deeptools/cm.py diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64828249b..cb0973ca9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,56 +6,33 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Setup conda - run: | - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - - name: create env - run: | - export PATH=$HOME/miniconda/bin:$PATH - conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 numpy scipy matplotlib==3.1.1 nose flake8 plotly pysam pyBigWig py2bit deeptoolsintervals - - name: install deeptools - run: | - export PATH=$HOME/miniconda/bin:$PATH - source activate foo - python -m pip install . --no-deps --ignore-installed -vvv + - uses: "dpryan79/github-actions/@master" - name: PEP8 run: | - export PATH=$HOME/miniconda/bin:$PATH source activate foo flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E722,W504,W605 - name: Test deepTools run: | - export PATH=$HOME/miniconda/bin:$PATH source activate foo nosetests --with-doctest -sv deeptools + - name: make an artifact + run: | + source activate foo + rm -f dist/* + python setup.py sdist + - uses: actions/upload-artifact@master + with: + name: "Dist files" + path: "dist" build-osx: name: Test on OSX runs-on: macOS-latest steps: - uses: actions/checkout@v1 - - name: Setup conda - run: | - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - - name: create env - run: | - export PATH=$HOME/miniconda/bin:$PATH - conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 numpy scipy matplotlib==3.1.1 nose flake8 plotly pysam pyBigWig py2bit deeptoolsintervals - - name: install deeptools - run: | - export PATH=$HOME/miniconda/bin:$PATH - source activate foo - python -m pip install . --no-deps --ignore-installed -vvv + - uses: "dpryan79/github-actions/@master" - name: Test deepTools run: | - export PATH=$HOME/miniconda/bin:$PATH + source activate foo nosetests --with-doctest -sv deeptools planemo: @@ -67,24 +44,8 @@ jobs: chunk: [1, 2, 3] steps: - uses: actions/checkout@v1 - - name: Setup conda - run: | - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH" - hash -r - conda config --set always_yes yes --set changeps1 no - - name: create env - run: | - export PATH=$HOME/miniconda/bin:$PATH - conda create -n foo -q --yes -c conda-forge -c bioconda python=3.7 numpy scipy matplotlib==3.1.1 nose flake8 plotly pysam pyBigWig py2bit deeptoolsintervals planemo samtools - - name: install deeptools - run: | - export PATH=$HOME/miniconda/bin:$PATH - source activate foo - python -m pip install . --no-deps --ignore-installed -vvv + - uses: "dpryan79/github-actions/@master" - name: planemo run: | - export PATH=$HOME/miniconda/bin:$PATH source activate foo ./.planemo.sh ${{ matrix.chunk }} diff --git a/.planemo.sh b/.planemo.sh index bb4680fd3..96303e47a 100755 --- a/.planemo.sh +++ b/.planemo.sh @@ -27,5 +27,6 @@ else galaxy/wrapper/plotProfiler.xml" fi +planemo lint ${wrappers} planemo test --no_dependency_resolution --galaxy_branch release_18.05 --install_galaxy ${wrappers} 2>&1 | grep -v -e "^galaxy" | grep -v -e "^requests" test ${PIPESTATUS[0]} -eq 0 diff --git a/CHANGES.txt b/CHANGES.txt index a0e10a774..3c8f999bf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,13 @@ +3.3.2 + + * Fixed --yAxisLabel in plotProfile (issue #889) + * Fixed a small X-axis tick offset issue. This caused the location of tick marks in profile plots to be shifted to the left by 0.5 to 1 bin. This was generally not notable, only really appearing when very few bins (e.g., 4) were used. The issue was mostly that the end tick would appear after the end of the plot, since its coordinate was the end of the bin. (issue #888) + * multiBamSummary and multiBigwigSummary no longer exclude small bins at the end of genomic chunks. multiBamSummary now has a `--genomicChunkSize` option in case users need to control the size of the genome used for multiprocessing for consistency. (issue #887) + * Added 4 new colormaps, which were copied from the seaborn project (issue #879). These are: rocket, mako, vlag, and icefire. + * Fixed an issue in the Galaxy wrapper of plotCorrelation where the X and Y. + * Fixed an issue with the `--Offset` option, where a single negative value wouldn't include only a single position, but rather that base through the end of the read. (stems from issue #902) + * Clustered output from plotHeatmap and plotProfile now allow computing the silhouette score of each row. This is printed in the returned BED file as the last column. + 3.3.1 * Fixed `--plotNumbers` not working in `plotCorrelation`. This was issue #838. diff --git a/LICENSE.txt b/LICENSE.txt index 94a9ed024..0bd5bfd9e 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,674 +1,9 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 +The file deeptools/cm.py is licensed under the BSD license, see a copy in that file. The remainder of the code is licensed under the MIT license: - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. +Copyright 2019 Max Planck Institute for Immunobiology and Epigenetics - Preamble +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The GNU General Public License is a free, copyleft license for -software and other kinds of works. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index ee4bf8f2f..149f174dd 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ deepTools addresses the challenge of handling the large amounts of data that are now routinely generated from DNA sequencing centers. deepTools contains useful modules to process the mapped reads data for multiple quality checks, creating **normalized coverage files** in standard bedGraph and bigWig file formats, that allow comparison between different files (for example, treatment and control). Finally, using such normalized and standardized files, deepTools can create many publication-ready **visualizations** to identify enrichments and for functional annotations of the genome. -For support, questions, or feature requests contact: deeptools@googlegroups.com +For support or questions please post to [Biostars](http://biostars.org). For bug reports and feature requests please open an issue [on github](http://github.com/deeptools/deeptools). + ### Citation: @@ -19,7 +20,7 @@ Our [documentation](http://deeptools.readthedocs.org/) contains more details on >Please see also the [FAQ](http://deeptools.readthedocs.org/en/latest/content/help_faq.html), which we update regularly. Our [Gallery](http://deeptools.readthedocs.org/en/latest/content/example_gallery.html) may give you some more ideas about the scope of deepTools. ->For more specific **troubleshooting, feedback, and tool suggestions**, contact us via deeptools@googlegroups.com. +>For more specific **troubleshooting, feedback, and tool suggestions**, please post [to Biostars](http://biostars.org). ------------------------------------------------------------------------------------------------------------------- @@ -63,8 +64,7 @@ To install into your home directory, use: deepTools can be easily integrated into [Galaxy](http://galaxyproject.org). Please see the [installation instructions in our documentation](http://deeptools.readthedocs.io/en/latest/content/installation.html#galaxy-installation) for further details. -**Note:** From version 2.3 onwards, deepTools support **python3**. In case of any problems running with python3/python2, -contact our user group : deeptools@googlegroups.com. +**Note:** From version 2.3 onwards, deepTools support **python3**. ------------------------------------ diff --git a/README.rst b/README.rst index 56f8c5fe5..d0231e841 100644 --- a/README.rst +++ b/README.rst @@ -15,8 +15,7 @@ such normalized and standardized files, deepTools can create many publication-ready **visualizations** to identify enrichments and for functional annotations of the genome. -For support, questions, or feature requests contact: -deeptools@googlegroups.com +For support or questions please make a post on `Biostars `__. For feature requests, please open an issue on `github `__. For further documentation, please see our `read the docs page `__. diff --git a/deeptools/_version.py b/deeptools/_version.py index 35196baaa..fe1c1a888 100644 --- a/deeptools/_version.py +++ b/deeptools/_version.py @@ -2,4 +2,4 @@ # This file is originally generated from Git information by running 'setup.py # version'. Distribution tarballs contain a pre-generated copy of this file. -__version__ = '3.3.1' +__version__ = '3.3.2' diff --git a/deeptools/bamCoverage.py b/deeptools/bamCoverage.py index f2bb2e423..c0002a59d 100644 --- a/deeptools/bamCoverage.py +++ b/deeptools/bamCoverage.py @@ -376,7 +376,10 @@ def get_fragment_from_read(self, read): offset[0] -= 1 offset = [offset[0], offset[0] + 1] else: - offset = [offset[0], None] + if offset[0] < -1: + offset = [offset[0], offset[0] + 1] + else: + offset = [offset[0], None] if offset[1] == 0: # -1 gets switched to 0, which screws things up offset = (offset[0], None) diff --git a/deeptools/bamPEFragmentSize.py b/deeptools/bamPEFragmentSize.py index 70764b484..4725457e2 100644 --- a/deeptools/bamPEFragmentSize.py +++ b/deeptools/bamPEFragmentSize.py @@ -9,6 +9,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt import plotly.offline as py diff --git a/deeptools/cm.py b/deeptools/cm.py new file mode 100644 index 000000000..fcb7c20ff --- /dev/null +++ b/deeptools/cm.py @@ -0,0 +1,1088 @@ +#!/usr/bin/env python + +# This file comes from the seaborn project and is under a BSD license: + +# Copyright (c) 2012-2019, Michael L. Waskom +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the project nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from matplotlib import colors, cm as mpl_cm + + +_rocket_lut = [ + [0.01060815, 0.01808215, 0.10018654], + [0.01428972, 0.02048237, 0.10374486], + [0.01831941, 0.0229766, 0.10738511], + [0.02275049, 0.02554464, 0.11108639], + [0.02759119, 0.02818316, 0.11483751], + [0.03285175, 0.03088792, 0.11863035], + [0.03853466, 0.03365771, 0.12245873], + [0.04447016, 0.03648425, 0.12631831], + [0.05032105, 0.03936808, 0.13020508], + [0.05611171, 0.04224835, 0.13411624], + [0.0618531, 0.04504866, 0.13804929], + [0.06755457, 0.04778179, 0.14200206], + [0.0732236, 0.05045047, 0.14597263], + [0.0788708, 0.05305461, 0.14995981], + [0.08450105, 0.05559631, 0.15396203], + [0.09011319, 0.05808059, 0.15797687], + [0.09572396, 0.06050127, 0.16200507], + [0.10132312, 0.06286782, 0.16604287], + [0.10692823, 0.06517224, 0.17009175], + [0.1125315, 0.06742194, 0.17414848], + [0.11813947, 0.06961499, 0.17821272], + [0.12375803, 0.07174938, 0.18228425], + [0.12938228, 0.07383015, 0.18636053], + [0.13501631, 0.07585609, 0.19044109], + [0.14066867, 0.0778224, 0.19452676], + [0.14633406, 0.07973393, 0.1986151], + [0.15201338, 0.08159108, 0.20270523], + [0.15770877, 0.08339312, 0.20679668], + [0.16342174, 0.0851396, 0.21088893], + [0.16915387, 0.08682996, 0.21498104], + [0.17489524, 0.08848235, 0.2190294], + [0.18065495, 0.09009031, 0.22303512], + [0.18643324, 0.09165431, 0.22699705], + [0.19223028, 0.09317479, 0.23091409], + [0.19804623, 0.09465217, 0.23478512], + [0.20388117, 0.09608689, 0.23860907], + [0.20973515, 0.09747934, 0.24238489], + [0.21560818, 0.09882993, 0.24611154], + [0.22150014, 0.10013944, 0.2497868], + [0.22741085, 0.10140876, 0.25340813], + [0.23334047, 0.10263737, 0.25697736], + [0.23928891, 0.10382562, 0.2604936], + [0.24525608, 0.10497384, 0.26395596], + [0.25124182, 0.10608236, 0.26736359], + [0.25724602, 0.10715148, 0.27071569], + [0.26326851, 0.1081815, 0.27401148], + [0.26930915, 0.1091727, 0.2772502], + [0.27536766, 0.11012568, 0.28043021], + [0.28144375, 0.11104133, 0.2835489], + [0.2875374, 0.11191896, 0.28660853], + [0.29364846, 0.11275876, 0.2896085], + [0.29977678, 0.11356089, 0.29254823], + [0.30592213, 0.11432553, 0.29542718], + [0.31208435, 0.11505284, 0.29824485], + [0.31826327, 0.1157429, 0.30100076], + [0.32445869, 0.11639585, 0.30369448], + [0.33067031, 0.11701189, 0.30632563], + [0.33689808, 0.11759095, 0.3088938], + [0.34314168, 0.11813362, 0.31139721], + [0.34940101, 0.11863987, 0.3138355], + [0.355676, 0.11910909, 0.31620996], + [0.36196644, 0.1195413, 0.31852037], + [0.36827206, 0.11993653, 0.32076656], + [0.37459292, 0.12029443, 0.32294825], + [0.38092887, 0.12061482, 0.32506528], + [0.38727975, 0.12089756, 0.3271175], + [0.39364518, 0.12114272, 0.32910494], + [0.40002537, 0.12134964, 0.33102734], + [0.40642019, 0.12151801, 0.33288464], + [0.41282936, 0.12164769, 0.33467689], + [0.41925278, 0.12173833, 0.33640407], + [0.42569057, 0.12178916, 0.33806605], + [0.43214263, 0.12179973, 0.33966284], + [0.43860848, 0.12177004, 0.34119475], + [0.44508855, 0.12169883, 0.34266151], + [0.45158266, 0.12158557, 0.34406324], + [0.45809049, 0.12142996, 0.34540024], + [0.46461238, 0.12123063, 0.34667231], + [0.47114798, 0.12098721, 0.34787978], + [0.47769736, 0.12069864, 0.34902273], + [0.48426077, 0.12036349, 0.35010104], + [0.49083761, 0.11998161, 0.35111537], + [0.49742847, 0.11955087, 0.35206533], + [0.50403286, 0.11907081, 0.35295152], + [0.51065109, 0.11853959, 0.35377385], + [0.51728314, 0.1179558, 0.35453252], + [0.52392883, 0.11731817, 0.35522789], + [0.53058853, 0.11662445, 0.35585982], + [0.53726173, 0.11587369, 0.35642903], + [0.54394898, 0.11506307, 0.35693521], + [0.5506426, 0.11420757, 0.35737863], + [0.55734473, 0.11330456, 0.35775059], + [0.56405586, 0.11235265, 0.35804813], + [0.57077365, 0.11135597, 0.35827146], + [0.5774991, 0.11031233, 0.35841679], + [0.58422945, 0.10922707, 0.35848469], + [0.59096382, 0.10810205, 0.35847347], + [0.59770215, 0.10693774, 0.35838029], + [0.60444226, 0.10573912, 0.35820487], + [0.61118304, 0.10450943, 0.35794557], + [0.61792306, 0.10325288, 0.35760108], + [0.62466162, 0.10197244, 0.35716891], + [0.63139686, 0.10067417, 0.35664819], + [0.63812122, 0.09938212, 0.35603757], + [0.64483795, 0.0980891, 0.35533555], + [0.65154562, 0.09680192, 0.35454107], + [0.65824241, 0.09552918, 0.3536529], + [0.66492652, 0.09428017, 0.3526697], + [0.67159578, 0.09306598, 0.35159077], + [0.67824099, 0.09192342, 0.3504148], + [0.684863, 0.09085633, 0.34914061], + [0.69146268, 0.0898675, 0.34776864], + [0.69803757, 0.08897226, 0.3462986], + [0.70457834, 0.0882129, 0.34473046], + [0.71108138, 0.08761223, 0.3430635], + [0.7175507, 0.08716212, 0.34129974], + [0.72398193, 0.08688725, 0.33943958], + [0.73035829, 0.0868623, 0.33748452], + [0.73669146, 0.08704683, 0.33543669], + [0.74297501, 0.08747196, 0.33329799], + [0.74919318, 0.08820542, 0.33107204], + [0.75535825, 0.08919792, 0.32876184], + [0.76145589, 0.09050716, 0.32637117], + [0.76748424, 0.09213602, 0.32390525], + [0.77344838, 0.09405684, 0.32136808], + [0.77932641, 0.09634794, 0.31876642], + [0.78513609, 0.09892473, 0.31610488], + [0.79085854, 0.10184672, 0.313391], + [0.7965014, 0.10506637, 0.31063031], + [0.80205987, 0.10858333, 0.30783], + [0.80752799, 0.11239964, 0.30499738], + [0.81291606, 0.11645784, 0.30213802], + [0.81820481, 0.12080606, 0.29926105], + [0.82341472, 0.12535343, 0.2963705], + [0.82852822, 0.13014118, 0.29347474], + [0.83355779, 0.13511035, 0.29057852], + [0.83850183, 0.14025098, 0.2876878], + [0.84335441, 0.14556683, 0.28480819], + [0.84813096, 0.15099892, 0.281943], + [0.85281737, 0.15657772, 0.27909826], + [0.85742602, 0.1622583, 0.27627462], + [0.86196552, 0.16801239, 0.27346473], + [0.86641628, 0.17387796, 0.27070818], + [0.87079129, 0.17982114, 0.26797378], + [0.87507281, 0.18587368, 0.26529697], + [0.87925878, 0.19203259, 0.26268136], + [0.8833417, 0.19830556, 0.26014181], + [0.88731387, 0.20469941, 0.25769539], + [0.89116859, 0.21121788, 0.2553592], + [0.89490337, 0.21785614, 0.25314362], + [0.8985026, 0.22463251, 0.25108745], + [0.90197527, 0.23152063, 0.24918223], + [0.90530097, 0.23854541, 0.24748098], + [0.90848638, 0.24568473, 0.24598324], + [0.911533, 0.25292623, 0.24470258], + [0.9144225, 0.26028902, 0.24369359], + [0.91717106, 0.26773821, 0.24294137], + [0.91978131, 0.27526191, 0.24245973], + [0.92223947, 0.28287251, 0.24229568], + [0.92456587, 0.29053388, 0.24242622], + [0.92676657, 0.29823282, 0.24285536], + [0.92882964, 0.30598085, 0.24362274], + [0.93078135, 0.31373977, 0.24468803], + [0.93262051, 0.3215093, 0.24606461], + [0.93435067, 0.32928362, 0.24775328], + [0.93599076, 0.33703942, 0.24972157], + [0.93752831, 0.34479177, 0.25199928], + [0.93899289, 0.35250734, 0.25452808], + [0.94036561, 0.36020899, 0.25734661], + [0.94167588, 0.36786594, 0.2603949], + [0.94291042, 0.37549479, 0.26369821], + [0.94408513, 0.3830811, 0.26722004], + [0.94520419, 0.39062329, 0.27094924], + [0.94625977, 0.39813168, 0.27489742], + [0.94727016, 0.4055909, 0.27902322], + [0.94823505, 0.41300424, 0.28332283], + [0.94914549, 0.42038251, 0.28780969], + [0.95001704, 0.42771398, 0.29244728], + [0.95085121, 0.43500005, 0.29722817], + [0.95165009, 0.44224144, 0.30214494], + [0.9524044, 0.44944853, 0.3072105], + [0.95312556, 0.45661389, 0.31239776], + [0.95381595, 0.46373781, 0.31769923], + [0.95447591, 0.47082238, 0.32310953], + [0.95510255, 0.47787236, 0.32862553], + [0.95569679, 0.48489115, 0.33421404], + [0.95626788, 0.49187351, 0.33985601], + [0.95681685, 0.49882008, 0.34555431], + [0.9573439, 0.50573243, 0.35130912], + [0.95784842, 0.51261283, 0.35711942], + [0.95833051, 0.51946267, 0.36298589], + [0.95879054, 0.52628305, 0.36890904], + [0.95922872, 0.53307513, 0.3748895], + [0.95964538, 0.53983991, 0.38092784], + [0.96004345, 0.54657593, 0.3870292], + [0.96042097, 0.55328624, 0.39319057], + [0.96077819, 0.55997184, 0.39941173], + [0.9611152, 0.5666337, 0.40569343], + [0.96143273, 0.57327231, 0.41203603], + [0.96173392, 0.57988594, 0.41844491], + [0.96201757, 0.58647675, 0.42491751], + [0.96228344, 0.59304598, 0.43145271], + [0.96253168, 0.5995944, 0.43805131], + [0.96276513, 0.60612062, 0.44471698], + [0.96298491, 0.6126247, 0.45145074], + [0.96318967, 0.61910879, 0.45824902], + [0.96337949, 0.6255736, 0.46511271], + [0.96355923, 0.63201624, 0.47204746], + [0.96372785, 0.63843852, 0.47905028], + [0.96388426, 0.64484214, 0.4861196], + [0.96403203, 0.65122535, 0.4932578], + [0.96417332, 0.65758729, 0.50046894], + [0.9643063, 0.66393045, 0.5077467], + [0.96443322, 0.67025402, 0.51509334], + [0.96455845, 0.67655564, 0.52251447], + [0.96467922, 0.68283846, 0.53000231], + [0.96479861, 0.68910113, 0.53756026], + [0.96492035, 0.69534192, 0.5451917], + [0.96504223, 0.7015636, 0.5528892], + [0.96516917, 0.70776351, 0.5606593], + [0.96530224, 0.71394212, 0.56849894], + [0.96544032, 0.72010124, 0.57640375], + [0.96559206, 0.72623592, 0.58438387], + [0.96575293, 0.73235058, 0.59242739], + [0.96592829, 0.73844258, 0.60053991], + [0.96612013, 0.74451182, 0.60871954], + [0.96632832, 0.75055966, 0.61696136], + [0.96656022, 0.75658231, 0.62527295], + [0.96681185, 0.76258381, 0.63364277], + [0.96709183, 0.76855969, 0.64207921], + [0.96739773, 0.77451297, 0.65057302], + [0.96773482, 0.78044149, 0.65912731], + [0.96810471, 0.78634563, 0.66773889], + [0.96850919, 0.79222565, 0.6764046], + [0.96893132, 0.79809112, 0.68512266], + [0.96935926, 0.80395415, 0.69383201], + [0.9698028, 0.80981139, 0.70252255], + [0.97025511, 0.81566605, 0.71120296], + [0.97071849, 0.82151775, 0.71987163], + [0.97120159, 0.82736371, 0.72851999], + [0.97169389, 0.83320847, 0.73716071], + [0.97220061, 0.83905052, 0.74578903], + [0.97272597, 0.84488881, 0.75440141], + [0.97327085, 0.85072354, 0.76299805], + [0.97383206, 0.85655639, 0.77158353], + [0.97441222, 0.86238689, 0.78015619], + [0.97501782, 0.86821321, 0.78871034], + [0.97564391, 0.87403763, 0.79725261], + [0.97628674, 0.87986189, 0.8057883], + [0.97696114, 0.88568129, 0.81430324], + [0.97765722, 0.89149971, 0.82280948], + [0.97837585, 0.89731727, 0.83130786], + [0.97912374, 0.90313207, 0.83979337], + [0.979891, 0.90894778, 0.84827858], + [0.98067764, 0.91476465, 0.85676611], + [0.98137749, 0.92061729, 0.86536915] +] + + +_mako_lut = [ + [0.04503935, 0.01482344, 0.02092227], + [0.04933018, 0.01709292, 0.02535719], + [0.05356262, 0.01950702, 0.03018802], + [0.05774337, 0.02205989, 0.03545515], + [0.06188095, 0.02474764, 0.04115287], + [0.06598247, 0.0275665, 0.04691409], + [0.07005374, 0.03051278, 0.05264306], + [0.07409947, 0.03358324, 0.05834631], + [0.07812339, 0.03677446, 0.06403249], + [0.08212852, 0.0400833, 0.06970862], + [0.08611731, 0.04339148, 0.07538208], + [0.09009161, 0.04664706, 0.08105568], + [0.09405308, 0.04985685, 0.08673591], + [0.09800301, 0.05302279, 0.09242646], + [0.10194255, 0.05614641, 0.09813162], + [0.10587261, 0.05922941, 0.103854], + [0.1097942, 0.06227277, 0.10959847], + [0.11370826, 0.06527747, 0.11536893], + [0.11761516, 0.06824548, 0.12116393], + [0.12151575, 0.07117741, 0.12698763], + [0.12541095, 0.07407363, 0.1328442], + [0.12930083, 0.07693611, 0.13873064], + [0.13317849, 0.07976988, 0.14465095], + [0.13701138, 0.08259683, 0.15060265], + [0.14079223, 0.08542126, 0.15659379], + [0.14452486, 0.08824175, 0.16262484], + [0.14820351, 0.09106304, 0.16869476], + [0.15183185, 0.09388372, 0.17480366], + [0.15540398, 0.09670855, 0.18094993], + [0.15892417, 0.09953561, 0.18713384], + [0.16238588, 0.10236998, 0.19335329], + [0.16579435, 0.10520905, 0.19960847], + [0.16914226, 0.10805832, 0.20589698], + [0.17243586, 0.11091443, 0.21221911], + [0.17566717, 0.11378321, 0.21857219], + [0.17884322, 0.11666074, 0.2249565], + [0.18195582, 0.11955283, 0.23136943], + [0.18501213, 0.12245547, 0.23781116], + [0.18800459, 0.12537395, 0.24427914], + [0.19093944, 0.1283047, 0.25077369], + [0.19381092, 0.13125179, 0.25729255], + [0.19662307, 0.13421303, 0.26383543], + [0.19937337, 0.13719028, 0.27040111], + [0.20206187, 0.14018372, 0.27698891], + [0.20469116, 0.14319196, 0.28359861], + [0.20725547, 0.14621882, 0.29022775], + [0.20976258, 0.14925954, 0.29687795], + [0.21220409, 0.15231929, 0.30354703], + [0.21458611, 0.15539445, 0.31023563], + [0.21690827, 0.15848519, 0.31694355], + [0.21916481, 0.16159489, 0.32366939], + [0.2213631, 0.16471913, 0.33041431], + [0.22349947, 0.1678599, 0.33717781], + [0.2255714, 0.1710185, 0.34395925], + [0.22758415, 0.17419169, 0.35075983], + [0.22953569, 0.17738041, 0.35757941], + [0.23142077, 0.18058733, 0.3644173], + [0.2332454, 0.18380872, 0.37127514], + [0.2350092, 0.18704459, 0.3781528], + [0.23670785, 0.190297, 0.38504973], + [0.23834119, 0.19356547, 0.39196711], + [0.23991189, 0.19684817, 0.39890581], + [0.24141903, 0.20014508, 0.4058667], + [0.24286214, 0.20345642, 0.4128484], + [0.24423453, 0.20678459, 0.41985299], + [0.24554109, 0.21012669, 0.42688124], + [0.2467815, 0.21348266, 0.43393244], + [0.24795393, 0.21685249, 0.4410088], + [0.24905614, 0.22023618, 0.448113], + [0.25007383, 0.22365053, 0.45519562], + [0.25098926, 0.22710664, 0.46223892], + [0.25179696, 0.23060342, 0.46925447], + [0.25249346, 0.23414353, 0.47623196], + [0.25307401, 0.23772973, 0.48316271], + [0.25353152, 0.24136961, 0.49001976], + [0.25386167, 0.24506548, 0.49679407], + [0.25406082, 0.2488164, 0.50348932], + [0.25412435, 0.25262843, 0.51007843], + [0.25404842, 0.25650743, 0.51653282], + [0.25383134, 0.26044852, 0.52286845], + [0.2534705, 0.26446165, 0.52903422], + [0.25296722, 0.2685428, 0.53503572], + [0.2523226, 0.27269346, 0.54085315], + [0.25153974, 0.27691629, 0.54645752], + [0.25062402, 0.28120467, 0.55185939], + [0.24958205, 0.28556371, 0.55701246], + [0.24842386, 0.28998148, 0.56194601], + [0.24715928, 0.29446327, 0.56660884], + [0.24580099, 0.29899398, 0.57104399], + [0.24436202, 0.30357852, 0.57519929], + [0.24285591, 0.30819938, 0.57913247], + [0.24129828, 0.31286235, 0.58278615], + [0.23970131, 0.3175495, 0.5862272], + [0.23807973, 0.32226344, 0.58941872], + [0.23644557, 0.32699241, 0.59240198], + [0.2348113, 0.33173196, 0.59518282], + [0.23318874, 0.33648036, 0.59775543], + [0.2315855, 0.34122763, 0.60016456], + [0.23001121, 0.34597357, 0.60240251], + [0.2284748, 0.35071512, 0.6044784], + [0.22698081, 0.35544612, 0.60642528], + [0.22553305, 0.36016515, 0.60825252], + [0.22413977, 0.36487341, 0.60994938], + [0.22280246, 0.36956728, 0.61154118], + [0.22152555, 0.37424409, 0.61304472], + [0.22030752, 0.37890437, 0.61446646], + [0.2191538, 0.38354668, 0.61581561], + [0.21806257, 0.38817169, 0.61709794], + [0.21703799, 0.39277882, 0.61831922], + [0.21607792, 0.39736958, 0.61948028], + [0.21518463, 0.40194196, 0.62059763], + [0.21435467, 0.40649717, 0.62167507], + [0.21358663, 0.41103579, 0.62271724], + [0.21288172, 0.41555771, 0.62373011], + [0.21223835, 0.42006355, 0.62471794], + [0.21165312, 0.42455441, 0.62568371], + [0.21112526, 0.42903064, 0.6266318], + [0.21065161, 0.43349321, 0.62756504], + [0.21023306, 0.43794288, 0.62848279], + [0.20985996, 0.44238227, 0.62938329], + [0.20951045, 0.44680966, 0.63030696], + [0.20916709, 0.45122981, 0.63124483], + [0.20882976, 0.45564335, 0.63219599], + [0.20849798, 0.46005094, 0.63315928], + [0.20817199, 0.46445309, 0.63413391], + [0.20785149, 0.46885041, 0.63511876], + [0.20753716, 0.47324327, 0.63611321], + [0.20722876, 0.47763224, 0.63711608], + [0.20692679, 0.48201774, 0.63812656], + [0.20663156, 0.48640018, 0.63914367], + [0.20634336, 0.49078002, 0.64016638], + [0.20606303, 0.49515755, 0.6411939], + [0.20578999, 0.49953341, 0.64222457], + [0.20552612, 0.50390766, 0.64325811], + [0.20527189, 0.50828072, 0.64429331], + [0.20502868, 0.51265277, 0.64532947], + [0.20479718, 0.51702417, 0.64636539], + [0.20457804, 0.52139527, 0.64739979], + [0.20437304, 0.52576622, 0.64843198], + [0.20418396, 0.53013715, 0.64946117], + [0.20401238, 0.53450825, 0.65048638], + [0.20385896, 0.53887991, 0.65150606], + [0.20372653, 0.54325208, 0.65251978], + [0.20361709, 0.5476249, 0.6535266], + [0.20353258, 0.55199854, 0.65452542], + [0.20347472, 0.55637318, 0.655515], + [0.20344718, 0.56074869, 0.65649508], + [0.20345161, 0.56512531, 0.65746419], + [0.20349089, 0.56950304, 0.65842151], + [0.20356842, 0.57388184, 0.65936642], + [0.20368663, 0.57826181, 0.66029768], + [0.20384884, 0.58264293, 0.6612145], + [0.20405904, 0.58702506, 0.66211645], + [0.20431921, 0.59140842, 0.66300179], + [0.20463464, 0.59579264, 0.66387079], + [0.20500731, 0.60017798, 0.66472159], + [0.20544449, 0.60456387, 0.66555409], + [0.20596097, 0.60894927, 0.66636568], + [0.20654832, 0.61333521, 0.66715744], + [0.20721003, 0.61772167, 0.66792838], + [0.20795035, 0.62210845, 0.66867802], + [0.20877302, 0.62649546, 0.66940555], + [0.20968223, 0.63088252, 0.6701105], + [0.21068163, 0.63526951, 0.67079211], + [0.21177544, 0.63965621, 0.67145005], + [0.21298582, 0.64404072, 0.67208182], + [0.21430361, 0.64842404, 0.67268861], + [0.21572716, 0.65280655, 0.67326978], + [0.21726052, 0.65718791, 0.6738255], + [0.21890636, 0.66156803, 0.67435491], + [0.220668, 0.66594665, 0.67485792], + [0.22255447, 0.67032297, 0.67533374], + [0.22458372, 0.67469531, 0.67578061], + [0.22673713, 0.67906542, 0.67620044], + [0.22901625, 0.6834332, 0.67659251], + [0.23142316, 0.68779836, 0.67695703], + [0.23395924, 0.69216072, 0.67729378], + [0.23663857, 0.69651881, 0.67760151], + [0.23946645, 0.70087194, 0.67788018], + [0.24242624, 0.70522162, 0.67813088], + [0.24549008, 0.70957083, 0.67835215], + [0.24863372, 0.71392166, 0.67854868], + [0.25187832, 0.71827158, 0.67872193], + [0.25524083, 0.72261873, 0.67887024], + [0.25870947, 0.72696469, 0.67898912], + [0.26229238, 0.73130855, 0.67907645], + [0.26604085, 0.73564353, 0.67914062], + [0.26993099, 0.73997282, 0.67917264], + [0.27397488, 0.74429484, 0.67917096], + [0.27822463, 0.74860229, 0.67914468], + [0.28264201, 0.75290034, 0.67907959], + [0.2873016, 0.75717817, 0.67899164], + [0.29215894, 0.76144162, 0.67886578], + [0.29729823, 0.76567816, 0.67871894], + [0.30268199, 0.76989232, 0.67853896], + [0.30835665, 0.77407636, 0.67833512], + [0.31435139, 0.77822478, 0.67811118], + [0.3206671, 0.78233575, 0.67786729], + [0.32733158, 0.78640315, 0.67761027], + [0.33437168, 0.79042043, 0.67734882], + [0.34182112, 0.79437948, 0.67709394], + [0.34968889, 0.79827511, 0.67685638], + [0.35799244, 0.80210037, 0.67664969], + [0.36675371, 0.80584651, 0.67649539], + [0.3759816, 0.80950627, 0.67641393], + [0.38566792, 0.81307432, 0.67642947], + [0.39579804, 0.81654592, 0.67656899], + [0.40634556, 0.81991799, 0.67686215], + [0.41730243, 0.82318339, 0.67735255], + [0.4285828, 0.82635051, 0.6780564], + [0.44012728, 0.82942353, 0.67900049], + [0.45189421, 0.83240398, 0.68021733], + [0.46378379, 0.83530763, 0.6817062], + [0.47573199, 0.83814472, 0.68347352], + [0.48769865, 0.84092197, 0.68552698], + [0.49962354, 0.84365379, 0.68783929], + [0.5114027, 0.8463718, 0.69029789], + [0.52301693, 0.84908401, 0.69288545], + [0.53447549, 0.85179048, 0.69561066], + [0.54578602, 0.8544913, 0.69848331], + [0.55695565, 0.85718723, 0.70150427], + [0.56798832, 0.85987893, 0.70468261], + [0.57888639, 0.86256715, 0.70802931], + [0.5896541, 0.8652532, 0.71154204], + [0.60028928, 0.86793835, 0.71523675], + [0.61079441, 0.87062438, 0.71910895], + [0.62116633, 0.87331311, 0.72317003], + [0.63140509, 0.87600675, 0.72741689], + [0.64150735, 0.87870746, 0.73185717], + [0.65147219, 0.8814179, 0.73648495], + [0.66129632, 0.8841403, 0.74130658], + [0.67097934, 0.88687758, 0.74631123], + [0.68051833, 0.88963189, 0.75150483], + [0.68991419, 0.89240612, 0.75687187], + [0.69916533, 0.89520211, 0.76241714], + [0.70827373, 0.89802257, 0.76812286], + [0.71723995, 0.90086891, 0.77399039], + [0.72606665, 0.90374337, 0.7800041], + [0.73475675, 0.90664718, 0.78615802], + [0.74331358, 0.90958151, 0.79244474], + [0.75174143, 0.91254787, 0.79884925], + [0.76004473, 0.91554656, 0.80536823], + [0.76827704, 0.91856549, 0.81196513], + [0.77647029, 0.921603, 0.81855729], + [0.78462009, 0.92466151, 0.82514119], + [0.79273542, 0.92773848, 0.83172131], + [0.8008109, 0.93083672, 0.83829355], + [0.80885107, 0.93395528, 0.84485982], + [0.81685878, 0.9370938, 0.85142101], + [0.82483206, 0.94025378, 0.8579751], + [0.83277661, 0.94343371, 0.86452477], + [0.84069127, 0.94663473, 0.87106853], + [0.84857662, 0.9498573, 0.8776059], + [0.8564431, 0.95309792, 0.88414253], + [0.86429066, 0.95635719, 0.89067759], + [0.87218969, 0.95960708, 0.89725384] +] + + +_vlag_lut = [ + [0.13850039, 0.41331206, 0.74052025], + [0.15077609, 0.41762684, 0.73970427], + [0.16235219, 0.4219191, 0.7389667], + [0.1733322, 0.42619024, 0.73832537], + [0.18382538, 0.43044226, 0.73776764], + [0.19394034, 0.4346772, 0.73725867], + [0.20367115, 0.43889576, 0.73685314], + [0.21313625, 0.44310003, 0.73648045], + [0.22231173, 0.44729079, 0.73619681], + [0.23125148, 0.45146945, 0.73597803], + [0.23998101, 0.45563715, 0.7358223], + [0.24853358, 0.45979489, 0.73571524], + [0.25691416, 0.4639437, 0.73566943], + [0.26513894, 0.46808455, 0.73568319], + [0.27322194, 0.47221835, 0.73575497], + [0.28117543, 0.47634598, 0.73588332], + [0.28901021, 0.48046826, 0.73606686], + [0.2967358, 0.48458597, 0.73630433], + [0.30436071, 0.48869986, 0.73659451], + [0.3118955, 0.49281055, 0.73693255], + [0.31935389, 0.49691847, 0.73730851], + [0.32672701, 0.5010247, 0.73774013], + [0.33402607, 0.50512971, 0.73821941], + [0.34125337, 0.50923419, 0.73874905], + [0.34840921, 0.51333892, 0.73933402], + [0.35551826, 0.51744353, 0.73994642], + [0.3625676, 0.52154929, 0.74060763], + [0.36956356, 0.52565656, 0.74131327], + [0.37649902, 0.52976642, 0.74207698], + [0.38340273, 0.53387791, 0.74286286], + [0.39025859, 0.53799253, 0.7436962], + [0.39706821, 0.54211081, 0.744578], + [0.40384046, 0.54623277, 0.74549872], + [0.41058241, 0.55035849, 0.74645094], + [0.41728385, 0.55448919, 0.74745174], + [0.42395178, 0.55862494, 0.74849357], + [0.4305964, 0.56276546, 0.74956387], + [0.4372044, 0.56691228, 0.75068412], + [0.4437909, 0.57106468, 0.75183427], + [0.45035117, 0.5752235, 0.75302312], + [0.45687824, 0.57938983, 0.75426297], + [0.46339713, 0.58356191, 0.75551816], + [0.46988778, 0.58774195, 0.75682037], + [0.47635605, 0.59192986, 0.75816245], + [0.48281101, 0.5961252, 0.75953212], + [0.4892374, 0.60032986, 0.76095418], + [0.49566225, 0.60454154, 0.76238852], + [0.50206137, 0.60876307, 0.76387371], + [0.50845128, 0.61299312, 0.76538551], + [0.5148258, 0.61723272, 0.76693475], + [0.52118385, 0.62148236, 0.76852436], + [0.52753571, 0.62574126, 0.77013939], + [0.53386831, 0.63001125, 0.77180152], + [0.54020159, 0.63429038, 0.7734803], + [0.54651272, 0.63858165, 0.77521306], + [0.55282975, 0.64288207, 0.77695608], + [0.55912585, 0.64719519, 0.77875327], + [0.56542599, 0.65151828, 0.78056551], + [0.57170924, 0.65585426, 0.78242747], + [0.57799572, 0.6602009, 0.78430751], + [0.58426817, 0.66456073, 0.78623458], + [0.590544, 0.66893178, 0.78818117], + [0.59680758, 0.67331643, 0.79017369], + [0.60307553, 0.67771273, 0.79218572], + [0.60934065, 0.68212194, 0.79422987], + [0.61559495, 0.68654548, 0.7963202], + [0.62185554, 0.69098125, 0.79842918], + [0.62810662, 0.69543176, 0.80058381], + [0.63436425, 0.69989499, 0.80275812], + [0.64061445, 0.70437326, 0.80497621], + [0.6468706, 0.70886488, 0.80721641], + [0.65312213, 0.7133717, 0.80949719], + [0.65937818, 0.71789261, 0.81180392], + [0.66563334, 0.72242871, 0.81414642], + [0.67189155, 0.72697967, 0.81651872], + [0.67815314, 0.73154569, 0.81892097], + [0.68441395, 0.73612771, 0.82136094], + [0.69068321, 0.74072452, 0.82382353], + [0.69694776, 0.7453385, 0.82633199], + [0.70322431, 0.74996721, 0.8288583], + [0.70949595, 0.75461368, 0.83143221], + [0.7157774, 0.75927574, 0.83402904], + [0.72206299, 0.76395461, 0.83665922], + [0.72835227, 0.76865061, 0.8393242], + [0.73465238, 0.7733628, 0.84201224], + [0.74094862, 0.77809393, 0.84474951], + [0.74725683, 0.78284158, 0.84750915], + [0.75357103, 0.78760701, 0.85030217], + [0.75988961, 0.79239077, 0.85313207], + [0.76621987, 0.79719185, 0.85598668], + [0.77255045, 0.8020125, 0.85888658], + [0.77889241, 0.80685102, 0.86181298], + [0.78524572, 0.81170768, 0.86476656], + [0.79159841, 0.81658489, 0.86776906], + [0.79796459, 0.82148036, 0.8707962], + [0.80434168, 0.82639479, 0.87385315], + [0.8107221, 0.83132983, 0.87695392], + [0.81711301, 0.8362844, 0.88008641], + [0.82351479, 0.84125863, 0.88325045], + [0.82992772, 0.84625263, 0.88644594], + [0.83634359, 0.85126806, 0.8896878], + [0.84277295, 0.85630293, 0.89295721], + [0.84921192, 0.86135782, 0.89626076], + [0.85566206, 0.866432, 0.89959467], + [0.86211514, 0.87152627, 0.90297183], + [0.86857483, 0.87663856, 0.90638248], + [0.87504231, 0.88176648, 0.90981938], + [0.88151194, 0.88690782, 0.91328493], + [0.88797938, 0.89205857, 0.91677544], + [0.89443865, 0.89721298, 0.9202854], + [0.90088204, 0.90236294, 0.92380601], + [0.90729768, 0.90749778, 0.92732797], + [0.91367037, 0.91260329, 0.93083814], + [0.91998105, 0.91766106, 0.93431861], + [0.92620596, 0.92264789, 0.93774647], + [0.93231683, 0.9275351, 0.94109192], + [0.93827772, 0.9322888, 0.94432312], + [0.94404755, 0.93686925, 0.94740137], + [0.94958284, 0.94123072, 0.95027696], + [0.95482682, 0.9453245, 0.95291103], + [0.9597248, 0.94909728, 0.95525103], + [0.96422552, 0.95249273, 0.95723271], + [0.96826161, 0.95545812, 0.95882188], + [0.97178458, 0.95793984, 0.95995705], + [0.97474105, 0.95989142, 0.96059997], + [0.97708604, 0.96127366, 0.96071853], + [0.97877855, 0.96205832, 0.96030095], + [0.97978484, 0.96222949, 0.95935496], + [0.9805997, 0.96155216, 0.95813083], + [0.98152619, 0.95993719, 0.95639322], + [0.9819726, 0.95766608, 0.95399269], + [0.98191855, 0.9547873, 0.95098107], + [0.98138514, 0.95134771, 0.94740644], + [0.98040845, 0.94739906, 0.94332125], + [0.97902107, 0.94300131, 0.93878672], + [0.97729348, 0.93820409, 0.93385135], + [0.9752533, 0.933073, 0.92858252], + [0.97297834, 0.92765261, 0.92302309], + [0.97049104, 0.92200317, 0.91723505], + [0.96784372, 0.91616744, 0.91126063], + [0.96507281, 0.91018664, 0.90514124], + [0.96222034, 0.90409203, 0.89890756], + [0.9593079, 0.89791478, 0.89259122], + [0.95635626, 0.89167908, 0.88621654], + [0.95338303, 0.88540373, 0.87980238], + [0.95040174, 0.87910333, 0.87336339], + [0.94742246, 0.87278899, 0.86691076], + [0.94445249, 0.86646893, 0.86045277], + [0.94150476, 0.86014606, 0.85399191], + [0.93857394, 0.85382798, 0.84753642], + [0.93566206, 0.84751766, 0.84108935], + [0.93277194, 0.8412164, 0.83465197], + [0.92990106, 0.83492672, 0.82822708], + [0.92704736, 0.82865028, 0.82181656], + [0.92422703, 0.82238092, 0.81541333], + [0.92142581, 0.81612448, 0.80902415], + [0.91864501, 0.80988032, 0.80264838], + [0.91587578, 0.80365187, 0.79629001], + [0.9131367, 0.79743115, 0.78994], + [0.91041602, 0.79122265, 0.78360361], + [0.90771071, 0.78502727, 0.77728196], + [0.90501581, 0.77884674, 0.7709771], + [0.90235365, 0.77267117, 0.76467793], + [0.8997019, 0.76650962, 0.75839484], + [0.89705346, 0.76036481, 0.752131], + [0.89444021, 0.75422253, 0.74587047], + [0.89183355, 0.74809474, 0.73962689], + [0.88923216, 0.74198168, 0.73340061], + [0.88665892, 0.73587283, 0.72717995], + [0.88408839, 0.72977904, 0.72097718], + [0.88153537, 0.72369332, 0.71478461], + [0.87899389, 0.7176179, 0.70860487], + [0.87645157, 0.71155805, 0.7024439], + [0.8739399, 0.70549893, 0.6962854], + [0.87142626, 0.6994551, 0.69014561], + [0.8689268, 0.69341868, 0.68401597], + [0.86643562, 0.687392, 0.67789917], + [0.86394434, 0.68137863, 0.67179927], + [0.86147586, 0.67536728, 0.665704], + [0.85899928, 0.66937226, 0.6596292], + [0.85654668, 0.66337773, 0.6535577], + [0.85408818, 0.65739772, 0.64750494], + [0.85164413, 0.65142189, 0.64145983], + [0.84920091, 0.6454565, 0.63542932], + [0.84676427, 0.63949827, 0.62941], + [0.84433231, 0.63354773, 0.62340261], + [0.84190106, 0.62760645, 0.61740899], + [0.83947935, 0.62166951, 0.61142404], + [0.8370538, 0.61574332, 0.60545478], + [0.83463975, 0.60981951, 0.59949247], + [0.83221877, 0.60390724, 0.593547], + [0.82980985, 0.59799607, 0.58760751], + [0.82740268, 0.59209095, 0.58167944], + [0.82498638, 0.5861973, 0.57576866], + [0.82258181, 0.5803034, 0.56986307], + [0.82016611, 0.57442123, 0.56397539], + [0.81776305, 0.56853725, 0.55809173], + [0.81534551, 0.56266602, 0.55222741], + [0.81294293, 0.55679056, 0.5463651], + [0.81052113, 0.55092973, 0.54052443], + [0.80811509, 0.54506305, 0.53468464], + [0.80568952, 0.53921036, 0.52886622], + [0.80327506, 0.53335335, 0.52305077], + [0.80084727, 0.52750583, 0.51725256], + [0.79842217, 0.5216578, 0.51146173], + [0.79599382, 0.51581223, 0.50568155], + [0.79355781, 0.50997127, 0.49991444], + [0.79112596, 0.50412707, 0.49415289], + [0.78867442, 0.49829386, 0.48841129], + [0.7862306, 0.49245398, 0.48267247], + [0.7837687, 0.48662309, 0.47695216], + [0.78130809, 0.4807883, 0.47123805], + [0.77884467, 0.47495151, 0.46553236], + [0.77636283, 0.46912235, 0.45984473], + [0.77388383, 0.46328617, 0.45416141], + [0.77138912, 0.45745466, 0.44849398], + [0.76888874, 0.45162042, 0.44283573], + [0.76638802, 0.44577901, 0.43718292], + [0.76386116, 0.43994762, 0.43155211], + [0.76133542, 0.43410655, 0.42592523], + [0.75880631, 0.42825801, 0.42030488], + [0.75624913, 0.42241905, 0.41470727], + [0.7536919, 0.41656866, 0.40911347], + [0.75112748, 0.41071104, 0.40352792], + [0.74854331, 0.40485474, 0.3979589], + [0.74594723, 0.39899309, 0.39240088], + [0.74334332, 0.39312199, 0.38685075], + [0.74073277, 0.38723941, 0.3813074], + [0.73809409, 0.38136133, 0.37578553], + [0.73544692, 0.37547129, 0.37027123], + [0.73278943, 0.36956954, 0.36476549], + [0.73011829, 0.36365761, 0.35927038], + [0.72743485, 0.35773314, 0.35378465], + [0.72472722, 0.35180504, 0.34831662], + [0.72200473, 0.34586421, 0.34285937], + [0.71927052, 0.33990649, 0.33741033], + [0.71652049, 0.33393396, 0.33197219], + [0.71375362, 0.32794602, 0.32654545], + [0.71096951, 0.32194148, 0.32113016], + [0.70816772, 0.31591904, 0.31572637], + [0.70534784, 0.30987734, 0.31033414], + [0.70250944, 0.30381489, 0.30495353], + [0.69965211, 0.2977301, 0.2995846], + [0.6967754, 0.29162126, 0.29422741], + [0.69388446, 0.28548074, 0.28887769], + [0.69097561, 0.2793096, 0.28353795], + [0.68803513, 0.27311993, 0.27821876], + [0.6850794, 0.26689144, 0.27290694], + [0.682108, 0.26062114, 0.26760246], + [0.67911013, 0.2543177, 0.26231367], + [0.67609393, 0.24796818, 0.25703372], + [0.67305921, 0.24156846, 0.25176238], + [0.67000176, 0.23511902, 0.24650278], + [0.66693423, 0.22859879, 0.24124404], + [0.6638441, 0.22201742, 0.2359961], + [0.66080672, 0.21526712, 0.23069468] +] + + +_icefire_lut = [ + [0.73936227, 0.90443867, 0.85757238], + [0.72888063, 0.89639109, 0.85488394], + [0.71834255, 0.88842162, 0.8521605], + [0.70773866, 0.88052939, 0.849422], + [0.69706215, 0.87271313, 0.84668315], + [0.68629021, 0.86497329, 0.84398721], + [0.67543654, 0.85730617, 0.84130969], + [0.66448539, 0.84971123, 0.83868005], + [0.65342679, 0.84218728, 0.83611512], + [0.64231804, 0.83471867, 0.83358584], + [0.63117745, 0.827294, 0.83113431], + [0.62000484, 0.81991069, 0.82876741], + [0.60879435, 0.81256797, 0.82648905], + [0.59754118, 0.80526458, 0.82430414], + [0.58624247, 0.79799884, 0.82221573], + [0.57489525, 0.7907688, 0.82022901], + [0.56349779, 0.78357215, 0.81834861], + [0.55204294, 0.77640827, 0.81657563], + [0.54052516, 0.76927562, 0.81491462], + [0.52894085, 0.76217215, 0.81336913], + [0.51728854, 0.75509528, 0.81194156], + [0.50555676, 0.74804469, 0.81063503], + [0.49373871, 0.7410187, 0.80945242], + [0.48183174, 0.73401449, 0.80839675], + [0.46982587, 0.72703075, 0.80747097], + [0.45770893, 0.72006648, 0.80667756], + [0.44547249, 0.71311941, 0.80601991], + [0.43318643, 0.70617126, 0.80549278], + [0.42110294, 0.69916972, 0.80506683], + [0.40925101, 0.69211059, 0.80473246], + [0.3976693, 0.68498786, 0.80448272], + [0.38632002, 0.67781125, 0.80431024], + [0.37523981, 0.67057537, 0.80420832], + [0.36442578, 0.66328229, 0.80417474], + [0.35385939, 0.65593699, 0.80420591], + [0.34358916, 0.64853177, 0.8043], + [0.33355526, 0.64107876, 0.80445484], + [0.32383062, 0.63356578, 0.80467091], + [0.31434372, 0.62600624, 0.8049475], + [0.30516161, 0.618389, 0.80528692], + [0.29623491, 0.61072284, 0.80569021], + [0.28759072, 0.60300319, 0.80616055], + [0.27923924, 0.59522877, 0.80669803], + [0.27114651, 0.5874047, 0.80730545], + [0.26337153, 0.57952055, 0.80799113], + [0.25588696, 0.57157984, 0.80875922], + [0.248686, 0.56358255, 0.80961366], + [0.24180668, 0.55552289, 0.81055123], + [0.23526251, 0.54739477, 0.8115939], + [0.22921445, 0.53918506, 0.81267292], + [0.22397687, 0.53086094, 0.8137141], + [0.21977058, 0.52241482, 0.81457651], + [0.21658989, 0.51384321, 0.81528511], + [0.21452772, 0.50514155, 0.81577278], + [0.21372783, 0.49630865, 0.81589566], + [0.21409503, 0.48734861, 0.81566163], + [0.2157176, 0.47827123, 0.81487615], + [0.21842857, 0.46909168, 0.81351614], + [0.22211705, 0.45983212, 0.81146983], + [0.22665681, 0.45052233, 0.80860217], + [0.23176013, 0.44119137, 0.80494325], + [0.23727775, 0.43187704, 0.80038017], + [0.24298285, 0.42261123, 0.79493267], + [0.24865068, 0.41341842, 0.78869164], + [0.25423116, 0.40433127, 0.78155831], + [0.25950239, 0.39535521, 0.77376848], + [0.2644736, 0.38651212, 0.76524809], + [0.26901584, 0.37779582, 0.75621942], + [0.27318141, 0.36922056, 0.746605], + [0.27690355, 0.3607736, 0.73659374], + [0.28023585, 0.35244234, 0.72622103], + [0.28306009, 0.34438449, 0.71500731], + [0.28535896, 0.33660243, 0.70303975], + [0.28708711, 0.32912157, 0.69034504], + [0.28816354, 0.32200604, 0.67684067], + [0.28862749, 0.31519824, 0.66278813], + [0.28847904, 0.30869064, 0.6482815], + [0.28770912, 0.30250126, 0.63331265], + [0.28640325, 0.29655509, 0.61811374], + [0.28458943, 0.29082155, 0.60280913], + [0.28233561, 0.28527482, 0.58742866], + [0.27967038, 0.2798938, 0.57204225], + [0.27665361, 0.27465357, 0.55667809], + [0.27332564, 0.2695165, 0.54145387], + [0.26973851, 0.26447054, 0.52634916], + [0.2659204, 0.25949691, 0.511417], + [0.26190145, 0.25458123, 0.49668768], + [0.2577151, 0.24971691, 0.48214874], + [0.25337618, 0.24490494, 0.46778758], + [0.24890842, 0.24013332, 0.45363816], + [0.24433654, 0.23539226, 0.4397245], + [0.23967922, 0.23067729, 0.4260591], + [0.23495608, 0.22598894, 0.41262952], + [0.23018113, 0.22132414, 0.39945577], + [0.22534609, 0.21670847, 0.38645794], + [0.22048761, 0.21211723, 0.37372555], + [0.2156198, 0.20755389, 0.36125301], + [0.21074637, 0.20302717, 0.34903192], + [0.20586893, 0.19855368, 0.33701661], + [0.20101757, 0.19411573, 0.32529173], + [0.19619947, 0.18972425, 0.31383846], + [0.19140726, 0.18540157, 0.30260777], + [0.1866769, 0.1811332, 0.29166583], + [0.18201285, 0.17694992, 0.28088776], + [0.17745228, 0.17282141, 0.27044211], + [0.17300684, 0.16876921, 0.26024893], + [0.16868273, 0.16479861, 0.25034479], + [0.16448691, 0.16091728, 0.24075373], + [0.16043195, 0.15714351, 0.23141745], + [0.15652427, 0.15348248, 0.22238175], + [0.15277065, 0.14994111, 0.21368395], + [0.14918274, 0.14653431, 0.20529486], + [0.14577095, 0.14327403, 0.19720829], + [0.14254381, 0.14016944, 0.18944326], + [0.13951035, 0.13723063, 0.18201072], + [0.13667798, 0.13446606, 0.17493774], + [0.13405762, 0.13188822, 0.16820842], + [0.13165767, 0.12950667, 0.16183275], + [0.12948748, 0.12733187, 0.15580631], + [0.12755435, 0.1253723, 0.15014098], + [0.12586516, 0.12363617, 0.1448459], + [0.12442647, 0.12213143, 0.13992571], + [0.12324241, 0.12086419, 0.13539995], + [0.12232067, 0.11984278, 0.13124644], + [0.12166209, 0.11907077, 0.12749671], + [0.12126982, 0.11855309, 0.12415079], + [0.12114244, 0.11829179, 0.1212385], + [0.12127766, 0.11828837, 0.11878534], + [0.12284806, 0.1179729, 0.11772022], + [0.12619498, 0.11721796, 0.11770203], + [0.129968, 0.11663788, 0.11792377], + [0.13410011, 0.11625146, 0.11839138], + [0.13855459, 0.11606618, 0.11910584], + [0.14333775, 0.11607038, 0.1200606], + [0.148417, 0.11626929, 0.12125453], + [0.15377389, 0.11666192, 0.12268364], + [0.15941427, 0.11723486, 0.12433911], + [0.16533376, 0.11797856, 0.12621303], + [0.17152547, 0.11888403, 0.12829735], + [0.17797765, 0.11994436, 0.13058435], + [0.18468769, 0.12114722, 0.13306426], + [0.19165663, 0.12247737, 0.13572616], + [0.19884415, 0.12394381, 0.1385669], + [0.20627181, 0.12551883, 0.14157124], + [0.21394877, 0.12718055, 0.14472604], + [0.22184572, 0.12893119, 0.14802579], + [0.22994394, 0.13076731, 0.15146314], + [0.23823937, 0.13267611, 0.15502793], + [0.24676041, 0.13462172, 0.15870321], + [0.25546457, 0.13661751, 0.16248722], + [0.26433628, 0.13865956, 0.16637301], + [0.27341345, 0.14070412, 0.17034221], + [0.28264773, 0.14277192, 0.1743957], + [0.29202272, 0.14486161, 0.17852793], + [0.30159648, 0.14691224, 0.1827169], + [0.31129002, 0.14897583, 0.18695213], + [0.32111555, 0.15103351, 0.19119629], + [0.33107961, 0.1530674, 0.19543758], + [0.34119892, 0.15504762, 0.1996803], + [0.35142388, 0.15701131, 0.20389086], + [0.36178937, 0.1589124, 0.20807639], + [0.37229381, 0.16073993, 0.21223189], + [0.38288348, 0.16254006, 0.2163249], + [0.39359592, 0.16426336, 0.22036577], + [0.40444332, 0.16588767, 0.22434027], + [0.41537995, 0.16745325, 0.2282297], + [0.42640867, 0.16894939, 0.23202755], + [0.43754706, 0.17034847, 0.23572899], + [0.44878564, 0.1716535, 0.23932344], + [0.4601126, 0.17287365, 0.24278607], + [0.47151732, 0.17401641, 0.24610337], + [0.48300689, 0.17506676, 0.2492737], + [0.49458302, 0.17601892, 0.25227688], + [0.50623876, 0.17687777, 0.255096], + [0.5179623, 0.17765528, 0.2577162], + [0.52975234, 0.17835232, 0.2601134], + [0.54159776, 0.17898292, 0.26226847], + [0.55348804, 0.17956232, 0.26416003], + [0.56541729, 0.18010175, 0.26575971], + [0.57736669, 0.180631, 0.26704888], + [0.58932081, 0.18117827, 0.26800409], + [0.60127582, 0.18175888, 0.26858488], + [0.61319563, 0.1824336, 0.2687872], + [0.62506376, 0.18324015, 0.26858301], + [0.63681202, 0.18430173, 0.26795276], + [0.64842603, 0.18565472, 0.26689463], + [0.65988195, 0.18734638, 0.26543435], + [0.67111966, 0.18948885, 0.26357955], + [0.68209194, 0.19216636, 0.26137175], + [0.69281185, 0.19535326, 0.25887063], + [0.70335022, 0.19891271, 0.25617971], + [0.71375229, 0.20276438, 0.25331365], + [0.72401436, 0.20691287, 0.25027366], + [0.73407638, 0.21145051, 0.24710661], + [0.74396983, 0.21631913, 0.24380715], + [0.75361506, 0.22163653, 0.24043996], + [0.7630579, 0.22731637, 0.23700095], + [0.77222228, 0.23346231, 0.23356628], + [0.78115441, 0.23998404, 0.23013825], + [0.78979746, 0.24694858, 0.22678822], + [0.79819286, 0.25427223, 0.22352658], + [0.80630444, 0.26198807, 0.22040877], + [0.81417437, 0.27001406, 0.21744645], + [0.82177364, 0.27837336, 0.21468316], + [0.82915955, 0.28696963, 0.21210766], + [0.83628628, 0.2958499, 0.20977813], + [0.84322168, 0.30491136, 0.20766435], + [0.84995458, 0.31415945, 0.2057863], + [0.85648867, 0.32358058, 0.20415327], + [0.86286243, 0.33312058, 0.20274969], + [0.86908321, 0.34276705, 0.20157271], + [0.87512876, 0.3525416, 0.20064949], + [0.88100349, 0.36243385, 0.19999078], + [0.8866469, 0.37249496, 0.1997976], + [0.89203964, 0.38273475, 0.20013431], + [0.89713496, 0.39318156, 0.20121514], + [0.90195099, 0.40380687, 0.20301555], + [0.90648379, 0.41460191, 0.20558847], + [0.9106967, 0.42557857, 0.20918529], + [0.91463791, 0.43668557, 0.21367954], + [0.91830723, 0.44790913, 0.21916352], + [0.92171507, 0.45922856, 0.22568002], + [0.92491786, 0.4705936, 0.23308207], + [0.92790792, 0.48200153, 0.24145932], + [0.93073701, 0.49341219, 0.25065486], + [0.93343918, 0.5048017, 0.26056148], + [0.93602064, 0.51616486, 0.27118485], + [0.93850535, 0.52748892, 0.28242464], + [0.94092933, 0.53875462, 0.29416042], + [0.94330011, 0.5499628, 0.30634189], + [0.94563159, 0.56110987, 0.31891624], + [0.94792955, 0.57219822, 0.33184256], + [0.95020929, 0.5832232, 0.34508419], + [0.95247324, 0.59419035, 0.35859866], + [0.95471709, 0.60510869, 0.37236035], + [0.95698411, 0.61595766, 0.38629631], + [0.95923863, 0.62676473, 0.40043317], + [0.9615041, 0.6375203, 0.41474106], + [0.96371553, 0.64826619, 0.42928335], + [0.96591497, 0.65899621, 0.44380444], + [0.96809871, 0.66971662, 0.45830232], + [0.9702495, 0.6804394, 0.47280492], + [0.9723881, 0.69115622, 0.48729272], + [0.97450723, 0.70187358, 0.50178034], + [0.9766108, 0.712592, 0.51626837], + [0.97871716, 0.72330511, 0.53074053], + [0.98082222, 0.73401769, 0.54520694], + [0.9829001, 0.74474445, 0.5597019], + [0.98497466, 0.75547635, 0.57420239], + [0.98705581, 0.76621129, 0.58870185], + [0.98913325, 0.77695637, 0.60321626], + [0.99119918, 0.78771716, 0.61775821], + [0.9932672, 0.79848979, 0.63231691], + [0.99535958, 0.80926704, 0.64687278], + [0.99740544, 0.82008078, 0.66150571], + [0.9992197, 0.83100723, 0.6764127] +] + + +_luts = [_rocket_lut, _mako_lut, _vlag_lut, _icefire_lut] +_names = ["rocket", "mako", "vlag", "icefire"] + +for _lut, _name in zip(_luts, _names): + + _cmap = colors.ListedColormap(_lut, _name) + locals()[_name] = _cmap + + _cmap_r = colors.ListedColormap(_lut[::-1], _name + "_r") + locals()[_name + "_r"] = _cmap_r + + mpl_cm.register_cmap(_name, _cmap) + mpl_cm.register_cmap(_name + "_r", _cmap_r) diff --git a/deeptools/computeMatrixOperations.py b/deeptools/computeMatrixOperations.py index 60d1e3630..a67cdd7a2 100644 --- a/deeptools/computeMatrixOperations.py +++ b/deeptools/computeMatrixOperations.py @@ -269,7 +269,7 @@ def sortArgs(): optional.add_argument('--transcriptID', default='transcript', help='When a GTF file is used to provide regions, only ' - 'entries with this value as their feature (column 2) ' + 'entries with this value as their feature (column 3) ' 'will be processed as transcripts. (Default: %(default)s)') optional.add_argument('--transcript_id_designator', diff --git a/deeptools/correlation.py b/deeptools/correlation.py index 9c7150d7d..d21b32598 100644 --- a/deeptools/correlation.py +++ b/deeptools/correlation.py @@ -7,6 +7,7 @@ mpl.use('Agg') mpl.rcParams['pdf.fonttype'] = 42 mpl.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import matplotlib.ticker diff --git a/deeptools/correlation_heatmap.py b/deeptools/correlation_heatmap.py index 3ca82326c..69d7506f2 100644 --- a/deeptools/correlation_heatmap.py +++ b/deeptools/correlation_heatmap.py @@ -1,5 +1,6 @@ from matplotlib import use as mplt_use mplt_use('Agg') +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt import numpy as np import scipy.cluster.hierarchy as sch diff --git a/deeptools/countReadsPerBin.py b/deeptools/countReadsPerBin.py index 8ce4b59ae..f9fe77cd1 100644 --- a/deeptools/countReadsPerBin.py +++ b/deeptools/countReadsPerBin.py @@ -133,6 +133,9 @@ class CountReadsPerBin(object): bed_and_bin : boolean If true AND a bedFile is given, compute coverage of each bin of the given size in each region of bedFile + genomeChunkSize : int + If not None, the length of the genome used for multiprocessing. + Returns ------- numpy array @@ -160,6 +163,7 @@ class CountReadsPerBin(object): def __init__(self, bamFilesList, binLength=50, numberOfSamples=None, numberOfProcessors=1, verbose=False, region=None, bedFile=None, extendReads=False, + genomeChunkSize=None, blackListFileName=None, minMappingQuality=None, ignoreDuplicates=False, @@ -186,6 +190,7 @@ def __init__(self, bamFilesList, binLength=50, numberOfSamples=None, numberOfPro self.mappedList = mappedList self.skipZeroOverZero = skipZeroOverZero self.bed_and_bin = bed_and_bin + self.genomeChunkSize = genomeChunkSize if extendReads and len(bamFilesList): from deeptools.getFragmentAndReadSize import get_read_and_fragment_length @@ -328,10 +333,12 @@ def run(self, allArgs=None): genomeSize = sum(chrLengths) + chunkSize = None if self.bedFile is None: - chunkSize = self.get_chunk_length(bamFilesHandles, genomeSize, chromsizes, chrLengths) - else: - chunkSize = None + if self.genomeChunkSize is None: + chunkSize = self.get_chunk_length(bamFilesHandles, genomeSize, chromsizes, chrLengths) + else: + chunkSize = self.genomeChunkSize [bam_h.close() for bam_h in bamFilesHandles] @@ -514,7 +521,7 @@ def count_reads_in_region(self, chrom, start, end, bed_regions_list=None): # At the end of chromosomes (or due to blacklisted regions), there are bins smaller than the bin size # Counts there are added to the bin before them, but range() will still try to include them. break - _file.write("{0}\t{1}\t{2}\t".format(chrom, startPos, startPos + exon[2])) + _file.write("{0}\t{1}\t{2}\t".format(chrom, startPos, min(startPos + exon[2], exon[1]))) _file.write("\t".join(["{}".format(x) for x in subnum_reads_per_bin[idx, :]]) + "\n") idx += 1 _file.close() @@ -572,6 +579,8 @@ def get_coverage_of_region(self, bamHandle, chrom, regions, nbins = 0 for reg in regions: nbins += (reg[1] - reg[0]) // reg[2] + if (reg[1] - reg[0]) % reg[2] > 0: + nbins += 1 coverages = np.zeros(nbins, dtype='float64') if self.defaultFragmentLength == 'read length': @@ -588,6 +597,9 @@ def get_coverage_of_region(self, bamHandle, chrom, regions, if len(reg) == 3: tileSize = int(reg[2]) nRegBins = (reg[1] - reg[0]) // tileSize + if (reg[1] - reg[0]) % tileSize > 0: + # Don't eliminate small bins! Issue 887 + nRegBins += 1 else: nRegBins = 1 tileSize = int(reg[1] - reg[0]) diff --git a/deeptools/heatmapper.py b/deeptools/heatmapper.py index 942870b93..6a95ba005 100644 --- a/deeptools/heatmapper.py +++ b/deeptools/heatmapper.py @@ -991,7 +991,10 @@ def save_matrix_values(self, file_name): def save_BED(self, file_handle): boundaries = np.array(self.matrix.group_boundaries) # Add a header - file_handle.write("#chrom\tstart\tend\tname\tscore\tstrand\tthickStart\tthickEnd\titemRGB\tblockCount\tblockSizes\tblockStart\tdeepTools_group\n") + file_handle.write("#chrom\tstart\tend\tname\tscore\tstrand\tthickStart\tthickEnd\titemRGB\tblockCount\tblockSizes\tblockStart\tdeepTools_group") + if self.matrix.silhouette is not None: + file_handle.write("\tsilhouette") + file_handle.write("\n") for idx, region in enumerate(self.matrix.regions): # the label id corresponds to the last boundary # that is smaller than the region index. @@ -1013,11 +1016,14 @@ def save_BED(self, file_handle): region[5], region[4])) file_handle.write( - '\t{0}\t{1}\t{2}\t{3}\n'.format( + '\t{0}\t{1}\t{2}\t{3}'.format( len(region[1]), ",".join([str(int(y) - int(x)) for x, y in region[1]]), ",".join([str(int(x) - int(starts[0])) for x, y in region[1]]), self.matrix.group_labels[label_idx])) + if self.matrix.silhouette is not None: + file_handle.write("\t{}".format(self.matrix.silhouette[idx])) + file_handle.write("\n") file_handle.close() @staticmethod @@ -1053,6 +1059,23 @@ def get_num_individual_matrix_cols(self): return matrixCols +def computeSilhouetteScore(d, idx, labels): + """ + Given a square distance matrix with NaN diagonals, compute the silhouette score + of a given row (idx). Each row should have an associated label (labels). + """ + keep = ~np.isnan(d[idx, ]) + foo = np.bincount(labels[keep], weights=d[idx, ][keep]) + groupSizes = np.bincount(labels[keep]) + intraIdx = labels[idx] + if groupSizes[intraIdx] == 1: + return 0 + intra = foo[labels[idx]] / groupSizes[intraIdx] + interMask = np.arange(len(foo))[np.arange(len(foo)) != labels[idx]] + inter = np.min(foo[interMask] / groupSizes[interMask]) + return (inter - intra) / max(inter, intra) + + class _matrix(object): """ class to hold heatmapper matrices @@ -1082,6 +1105,7 @@ def __init__(self, regions, matrix, group_boundaries, sample_boundaries, self.sample_boundaries = sample_boundaries self.sort_method = None self.sort_using = None + self.silhouette = None if group_labels is None: self.group_labels = ['group {}'.format(x) @@ -1225,26 +1249,42 @@ def sort_groups(self, sort_using='mean', sort_method='no', sample_list=None): self.regions = _sorted_regions self.set_sorting_method(sort_method, sort_using) - def hmcluster(self, k, method='kmeans'): - + def hmcluster(self, k, evaluate_silhouette=True, method='kmeans', clustering_samples=None): matrix = np.asarray(self.matrix) - if np.any(np.isnan(matrix)): + matrix_to_cluster = matrix + if clustering_samples is not None: + assert all(i > 0 for i in clustering_samples),\ + "all indices should be bigger than or equal to 1." + assert all(i <= len(self.sample_labels) for i in + clustering_samples),\ + "each index should be smaller than or equal to {}(total "\ + "number of samples.)".format(len(self.sample_labels)) + + clustering_samples = np.asarray(clustering_samples) - 1 + + samples_cols = [] + for idx in clustering_samples: + samples_cols += range(self.sample_boundaries[idx], + self.sample_boundaries[idx + 1]) + + matrix_to_cluster = matrix_to_cluster[:, samples_cols] + if np.any(np.isnan(matrix_to_cluster)): # replace nans for 0 otherwise kmeans produces a weird behaviour sys.stderr.write("*Warning* For clustering nan values have to be replaced by zeros \n") - matrix[np.isnan(matrix)] = 0 + matrix_to_cluster[np.isnan(matrix_to_cluster)] = 0 if method == 'kmeans': from scipy.cluster.vq import vq, kmeans - centroids, _ = kmeans(matrix, k) + centroids, _ = kmeans(matrix_to_cluster, k) # order the centroids in an attempt to # get the same cluster order - cluster_labels, _ = vq(matrix, centroids) + cluster_labels, _ = vq(matrix_to_cluster, centroids) if method == 'hierarchical': # normally too slow for large data sets from scipy.cluster.hierarchy import fcluster, linkage - Z = linkage(matrix, method='ward', metric='euclidean') + Z = linkage(matrix_to_cluster, method='ward', metric='euclidean') cluster_labels = fcluster(Z, k, criterion='maxclust') # hierarchical clustering labels from 1 .. k # while k-means labels 0 .. k -1 @@ -1257,11 +1297,10 @@ def hmcluster(self, k, method='kmeans'): for cluster in range(k): cluster_ids = np.flatnonzero(cluster_labels == cluster) _cluster_ids_list.append(cluster_ids) - _clustered_mean.append(self.matrix[cluster_ids, :].mean()) + _clustered_mean.append(matrix_to_cluster[cluster_ids, :].mean()) # reorder clusters based on mean cluster_order = np.argsort(_clustered_mean)[::-1] - # create groups using the clustering self.group_labels = [] self.group_boundaries = [0] @@ -1280,8 +1319,25 @@ def hmcluster(self, k, method='kmeans'): self.regions = _clustered_regions self.matrix = np.vstack(_clustered_matrix) + return idx + def computeSilhouette(self, k): + if k > 1: + from scipy.spatial.distance import pdist, squareform + + silhouette = np.repeat(0.0, self.group_boundaries[-1]) + groupSizes = np.subtract(self.group_boundaries[1:], self.group_boundaries[:-1]) + labels = np.repeat(np.arange(k), groupSizes) + + d = pdist(self.matrix) + d2 = squareform(d) + np.fill_diagonal(d2, np.nan) # This excludes the diagonal + for idx in range(len(labels)): + silhouette[idx] = computeSilhouetteScore(d2, idx, labels) + sys.stderr.write("The average silhouette score is: {}\n".format(np.mean(silhouette))) + self.silhouette = silhouette + def removeempty(self): """ removes matrix rows containing only zeros or nans diff --git a/deeptools/heatmapper_utilities.py b/deeptools/heatmapper_utilities.py index f0b627e2b..e63dfb022 100644 --- a/deeptools/heatmapper_utilities.py +++ b/deeptools/heatmapper_utilities.py @@ -3,6 +3,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.colors as pltcolors import plotly.graph_objs as go @@ -128,6 +129,9 @@ def getProfileTicks(hm, referencePointLabel, startLabel, endLabel, idx): As of deepTools 3, the various parameters can be lists, in which case we then need to index things (the idx parameter) As of matplotlib 3 the ticks in the heatmap need to have 0.5 added to them. + + As of matplotlib 3.1 there is no longer padding added to all ticks. Reference point ticks will be adjusted by width/2 + or width for spacing and the last half of scaled ticks will be shifed by 1 bin so the ticks are at the beginning of bins. """ w = hm.parameters['bin size'] b = hm.parameters['upstream'] @@ -152,7 +156,6 @@ def getProfileTicks(hm, referencePointLabel, startLabel, endLabel, idx): m = hm.parameters['body'] if idx is not None: m = m[idx] - tickPlotAdj = 0.5 if b < 1e5: quotient = 1000 @@ -162,7 +165,7 @@ def getProfileTicks(hm, referencePointLabel, startLabel, endLabel, idx): symbol = 'Mb' if m == 0: - xticks = [(k / w) - tickPlotAdj for k in [0, b, b + a]] + xticks = [(k / w) for k in [0, b - 0.5 * w, b + a - w]] xtickslabel = ['{0:.1f}'.format(-(float(b) / quotient)), referencePointLabel, '{0:.1f}{1}'.format(float(a) / quotient, symbol)] @@ -187,14 +190,15 @@ def getProfileTicks(hm, referencePointLabel, startLabel, endLabel, idx): xticks_values.append(b + c + m) xtickslabel.append("") - xticks_values.append(b + c + m + d) + # We need to subtract the bin size from the last 2 point so they're placed at the beginning of the bin + xticks_values.append(b + c + m + d - w) xtickslabel.append(endLabel) if a > 0: - xticks_values.append(b + c + m + d + a) + xticks_values.append(b + c + m + d + a - w) xtickslabel.append('{0:.1f}{1}'.format(float(a) / quotient, symbol)) - xticks = [(k / w) - tickPlotAdj for k in xticks_values] + xticks = [(k / w) for k in xticks_values] xticks = [max(x, 0) for x in xticks] return xticks, xtickslabel diff --git a/deeptools/multiBamSummary.py b/deeptools/multiBamSummary.py index 3a0bf8361..a588c09c9 100644 --- a/deeptools/multiBamSummary.py +++ b/deeptools/multiBamSummary.py @@ -124,6 +124,13 @@ def bamcorrelate_args(case='bins'): 'BAM files, this causes deepTools to use the file name ' 'after removing the path and extension.') + optional.add_argument('--genomeChunkSize', + type=int, + default=None, + help='Manually specify the size of the genome provided to each processor. ' + 'The default value of None specifies that this is determined by read ' + 'density of the BAM file.') + if case == 'bins': optional.add_argument('--binSize', '-bs', metavar='INT', @@ -222,6 +229,7 @@ def main(args=None): args.bamfiles, args.binSize, numberOfSamples=None, + genomeChunkSize=args.genomeChunkSize, numberOfProcessors=args.numberOfProcessors, verbose=args.verbose, region=args.region, diff --git a/deeptools/parserCommon.py b/deeptools/parserCommon.py index 2090d60e8..c76eb603f 100644 --- a/deeptools/parserCommon.py +++ b/deeptools/parserCommon.py @@ -165,7 +165,7 @@ def gtf_options(suppress=False): if suppress is False: help = 'When a GTF file is used to provide regions, only \ - entries with this value as their feature (column 2) \ + entries with this value as their feature (column 3) \ will be processed as transcripts. (Default: %(default)s)' group.add_argument('--transcriptID', @@ -174,7 +174,7 @@ def gtf_options(suppress=False): if suppress is False: help = 'When a GTF file is used to provide regions, only \ - entries with this value as their feature (column 2) \ + entries with this value as their feature (column 3) \ will be processed as exons. CDS would be another common \ value for this. (Default: %(default)s)' @@ -505,6 +505,17 @@ def heatmapperOptionalArgs(mode=['heatmap', 'profile'][0]): 'fail with an error if a cluster has very few members compared to the ' 'total number of regions.', type=int) + cluster.add_argument( + '--silhouette', + help='Compute the silhouette score for regions. This is only' + ' applicable if clustering has been performed. The silhouette score' + ' is a measure of how similar a region is to other regions in the' + ' same cluster as opposed to those in other clusters. It will be reported' + ' in the final column of the BED file with regions. The ' + 'silhouette evaluation can be very slow when you have more' + 'than 100 000 regions.', + action='store_true' + ) optional = parser.add_argument_group('Optional arguments') @@ -600,6 +611,14 @@ def heatmapperOptionalArgs(mode=['heatmap', 'profile'][0]): 'example: --sortUsingSamples 1 3', type=int, nargs='+') + optional.add_argument('--clusterUsingSamples', + help='List of sample numbers (order as in ' + 'matrix), that are used for clustering by ' + '--kmeans or --hclust if not given, all samples ' + 'are taken into account for clustering. ' + 'Example: --ClusterUsingSamples 1 3', + type=int, nargs='+') + optional.add_argument( '--averageTypeSummaryPlot', default='mean', @@ -622,9 +641,8 @@ def heatmapperOptionalArgs(mode=['heatmap', 'profile'][0]): 'Other colors can be specified using the #rrggbb ' 'notation.') - from matplotlib import cm - color_options = "', '".join([m for m in cm.datad - if not m.endswith('_r')]) + import matplotlib.pyplot as plt + color_options = "', '".join([x for x in plt.colormaps() if not x.endswith('_r')]) optional.add_argument( '--colorMap', diff --git a/deeptools/plotCorrelation.py b/deeptools/plotCorrelation.py index c72e43bfc..a03839baa 100644 --- a/deeptools/plotCorrelation.py +++ b/deeptools/plotCorrelation.py @@ -8,6 +8,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt from deeptools.correlation import Correlation diff --git a/deeptools/plotCoverage.py b/deeptools/plotCoverage.py index 7b647f3ba..de6f7cdcb 100644 --- a/deeptools/plotCoverage.py +++ b/deeptools/plotCoverage.py @@ -10,6 +10,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt import plotly.offline as py import plotly.graph_objs as go diff --git a/deeptools/plotEnrichment.py b/deeptools/plotEnrichment.py index b9843f420..b6baab8d7 100644 --- a/deeptools/plotEnrichment.py +++ b/deeptools/plotEnrichment.py @@ -8,6 +8,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec diff --git a/deeptools/plotFingerprint.py b/deeptools/plotFingerprint.py index b09e10bdf..f1f118fa4 100644 --- a/deeptools/plotFingerprint.py +++ b/deeptools/plotFingerprint.py @@ -8,6 +8,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt from scipy import interpolate from scipy.stats import poisson diff --git a/deeptools/plotHeatmap.py b/deeptools/plotHeatmap.py index 4e2f827bd..8bd6b42e6 100644 --- a/deeptools/plotHeatmap.py +++ b/deeptools/plotHeatmap.py @@ -9,6 +9,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import matplotlib.gridspec as gridspec @@ -163,8 +164,8 @@ def addProfilePlot(hm, plt, fig, grids, iterNum, iterNum2, perGroup, averageType if sample_id == 0 and yAxisLabel != '': ax_profile.set_ylabel(yAxisLabel) xticks, xtickslabel = hm.getTicks(tickIdx) - if np.ceil(max(xticks)) != float(sub_matrix['matrix'].shape[1]): - tickscale = float(sub_matrix['matrix'].shape[1]) / max(xticks) + if np.ceil(max(xticks)) != float(sub_matrix['matrix'].shape[1] - 1): + tickscale = float(sub_matrix['matrix'].shape[1] - 1) / max(xticks) xticks_use = [x * tickscale for x in xticks] ax_profile.axes.set_xticks(xticks_use) else: @@ -778,14 +779,12 @@ def main(args=None): if args.sortRegions == 'keep': args.sortRegions = 'no' # These are the same thing - if args.kmeans is not None: - hm.matrix.hmcluster(args.kmeans, method='kmeans') - else: - if args.hclust is not None: - print("Performing hierarchical clustering." - "Please note that it might be very slow for large datasets.\n") - hm.matrix.hmcluster(args.hclust, method='hierarchical') + hm.matrix.hmcluster(args.kmeans, method='kmeans', clustering_samples=args.clusterUsingSamples) + elif args.hclust is not None: + print("Performing hierarchical clustering." + "Please note that it might be very slow for large datasets.\n") + hm.matrix.hmcluster(args.hclust, method='hierarchical', clustering_samples=args.clusterUsingSamples) group_len_ratio = np.diff(hm.matrix.group_boundaries) / len(hm.matrix.regions) if np.any(group_len_ratio < 5.0 / 1000): @@ -814,6 +813,12 @@ def main(args=None): sort_method=args.sortRegions, sample_list=sortUsingSamples) + if args.silhouette: + if args.kmeans is not None: + hm.matrix.computeSilhouette(args.kmeans) + elif args.hclust is not None: + hm.matrix.computeSilhouette(args.args.hclust) + if args.outFileNameMatrix: hm.save_matrix_values(args.outFileNameMatrix) diff --git a/deeptools/plotPCA.py b/deeptools/plotPCA.py index 9df973e4b..d12eac8d4 100644 --- a/deeptools/plotPCA.py +++ b/deeptools/plotPCA.py @@ -7,6 +7,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +from deeptools import cm # noqa: F401 from deeptools.correlation import Correlation from deeptools.parserCommon import writableFile diff --git a/deeptools/plotProfile.py b/deeptools/plotProfile.py index 0d103d519..9f6025a9c 100644 --- a/deeptools/plotProfile.py +++ b/deeptools/plotProfile.py @@ -10,6 +10,7 @@ matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' +import deeptools.cm # noqa: F401 import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties from matplotlib import colors as pltcolors @@ -308,8 +309,8 @@ def plot_hexbin(self): ax.set_ylim(lims) xticks, xtickslabel = self.getTicks(plot) - if np.ceil(max(xticks)) != float(ma.shape[1]): - tickscale = float(sub_matrix['matrix'].shape[1]) / max(self.xticks) + if np.ceil(max(xticks)) != float(ma.shape[1] - 1): + tickscale = float(sub_matrix['matrix'].shape[1]) / max(xticks) xticks_use = [x * tickscale for x in xticks] ax_list[0].axes.set_xticks(xticks_use) else: @@ -532,7 +533,7 @@ def plot_heatmap(self): totalWidth = np.vstack(mat).shape[1] xticks, xtickslabel = self.getTicks(plot) - if np.ceil(max(xticks)) != float(totalWidth): + if np.ceil(max(xticks)) != float(totalWidth - 1): tickscale = float(totalWidth) / max(xticks) xticks_use = [x * tickscale for x in xticks] ax.axes.set_xticks(xticks_use) @@ -751,7 +752,7 @@ def plot_profile(self): totalWidth = sub_matrix['matrix'].shape[1] xticks, xtickslabel = self.getTicks(tickIdx) - if np.ceil(max(xticks)) != float(totalWidth): + if np.ceil(max(xticks)) != float(totalWidth - 1): tickscale = float(totalWidth) / max(xticks) xticks_use = [x * tickscale for x in xticks] ax.axes.set_xticks(xticks_use) @@ -765,6 +766,8 @@ def plot_profile(self): ticks[0].label1.set_horizontalalignment('left') ticks[-1].label1.set_horizontalalignment('right') + if first and self.y_axis_label != '': + ax.set_ylabel(self.y_axis_label) if first and self.plot_type not in ['heatmap', 'overlapped_lines']: ax.legend(loc=self.legend_location.replace('-', ' '), ncol=1, prop=self.font_p, diff --git a/deeptools/utilities.py b/deeptools/utilities.py index 691567ff7..b0ae27631 100644 --- a/deeptools/utilities.py +++ b/deeptools/utilities.py @@ -4,6 +4,7 @@ from deeptools.bamHandler import openBam import matplotlib as mpl mpl.use('Agg') +from deeptools import cm # noqa: F401 import numpy as np diff --git a/docs/content/example_gallery.rst b/docs/content/example_gallery.rst index 9ac915cb1..0d8169659 100644 --- a/docs/content/example_gallery.rst +++ b/docs/content/example_gallery.rst @@ -1,10 +1,6 @@ Gallery of deepTools plots =========================== -.. note:: If you have a nice deepTools plot that you'd like to share, we'll be - happy to add it to our Gallery! Just send us an email: - deeptools@googlegroups.com - .. contents:: Published example plots :local: diff --git a/docs/content/example_step_by_step.rst b/docs/content/example_step_by_step.rst index e0a0d9ca5..fe14cd204 100644 --- a/docs/content/example_step_by_step.rst +++ b/docs/content/example_step_by_step.rst @@ -4,7 +4,8 @@ Step-by-step protocols This section should give you an overview of how to do many common tasks. We're using **screenshots from Galaxy** here. If you're using the command-line version you can easily follow the given examples since the vast majority of parameters is either indicated in Galaxy, too. Otherwise, just type the program name and the help option (e.g. ``/deepTools/bin/bamCoverage --help``), which will show you all the parameters and options available. Alternatively, you can follow the respective link to the tool documentation here on readthedocs. -.. note:: Do let us know if you spot things that are missing or should be explained better! Just send an email to deeptools@googlegroups.com. +.. note:: For support or questions please post to `Biostars `__. For bug reports and feature requests please open an issue ``__. + All protocols assume that you have uploaded your files into a Galaxy instance with a deepTools installation, e.g., `deepTools Galaxy `_. If you need help to get started with Galaxy in general, e.g. to upload your data, see :doc:`help_galaxy_intro` and :doc:`help_galaxy_dataup`. diff --git a/docs/content/help_faq.rst b/docs/content/help_faq.rst index 1fc21bdec..3fa90a0bf 100644 --- a/docs/content/help_faq.rst +++ b/docs/content/help_faq.rst @@ -1,7 +1,7 @@ General FAQ =========== -Feel free to contribute your questions via deeptools@googlegroups.com +.. tip:: For support or questions please post to `Biostars `__. For bug reports and feature requests please open an issue ``__. .. Note:: We also have a :doc:`help_faq_galaxy` with questions that are more specific to Galaxy rather than deepTools usage. diff --git a/docs/content/help_galaxy_dataup.rst b/docs/content/help_galaxy_dataup.rst index b493da08e..e942d0d04 100644 --- a/docs/content/help_galaxy_dataup.rst +++ b/docs/content/help_galaxy_dataup.rst @@ -104,5 +104,5 @@ Copying can easily be done via the History panel's ``option`` button ⟶ "Copy d +--------------------------------------------------------------------------------+-----------------------------------------------------------------+ | `deepTools Galaxy FAQs `__ | Frequently encountered issues with our specific Galaxy instance | +--------------------------------------------------------------------------------+-----------------------------------------------------------------+ -| deeptools@googlegroups.com | For issues not addressed in the FAQs | +| `Biostars `__ | For issues not addressed in the FAQs | +--------------------------------------------------------------------------------+-----------------------------------------------------------------+ diff --git a/docs/content/help_galaxy_deeptools.rst b/docs/content/help_galaxy_deeptools.rst index 12f555e7e..4f739f204 100644 --- a/docs/content/help_galaxy_deeptools.rst +++ b/docs/content/help_galaxy_deeptools.rst @@ -126,5 +126,5 @@ The ``Summary Statistics`` can be used to calculate the sum, mean, standard devi +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ | `deepTools Galaxy FAQs `_ | Frequently encountered issues with our specific Galaxy instance | +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ -| deeptools@googlegroups.com | For issues not addressed in the FAQs | +| `Biostars `__ | For issues not addressed in the FAQs | +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ diff --git a/docs/content/help_galaxy_intro.rst b/docs/content/help_galaxy_intro.rst index e8ce87861..7ba1b913d 100644 --- a/docs/content/help_galaxy_intro.rst +++ b/docs/content/help_galaxy_intro.rst @@ -108,5 +108,5 @@ This is the graphical representation of a Galaxy workflow that can easily be mod +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ | `deepTools Galaxy FAQs `_ | Frequently encountered issues with our specific Galaxy instance | +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ -| deeptools@googlegroups.com | For issues not addressed in the FAQs | +| `Biostars `__ | For issues not addressed in the FAQs | +-------------------------------------------------------------------------------+-----------------------------------------------------------------+ diff --git a/docs/content/help_glossary.rst b/docs/content/help_glossary.rst index 5b4888869..c5de0cf48 100644 --- a/docs/content/help_glossary.rst +++ b/docs/content/help_glossary.rst @@ -3,7 +3,7 @@ Glossary of NGS terms Like most specialized fields, next-generation sequencing has inspired many an acronyms. We are trying to keep track of those :ref:`abbreviations` that we heavily use. -Do make us aware if something is unclear: deeptools@googlegroups.com +Do make us aware if something is unclear by opening an issue on `github `__ .. contents:: diff --git a/docs/content/installation.rst b/docs/content/installation.rst index 6d8d8337b..c45ecacfe 100644 --- a/docs/content/installation.rst +++ b/docs/content/installation.rst @@ -117,5 +117,4 @@ The deepTools Galaxy instance is also available as a docker container, for those To start and otherwise modify this container, please see the instructions on `the docker-galaxy-stable github repository `__. Note that you must use `bgruening/galaxy-deeptools` in place of `bgruening/galaxy-stable` in the examples, as the deepTools Galaxy container is built on top of the galaxy-stable container. -.. tip:: For support, questions, or feature requests contact: - deeptools@googlegroups.com +.. tip:: For support or questions please make a post on `Biostars `__. For feature requests or bug reports please open an issue `on github `__. diff --git a/docs/content/tools/computeMatrix.rst b/docs/content/tools/computeMatrix.rst index ba11c5f02..60aaf8cb5 100644 --- a/docs/content/tools/computeMatrix.rst +++ b/docs/content/tools/computeMatrix.rst @@ -10,7 +10,7 @@ computeMatrix :nodefault: Details -^^^^^^^^^^^^^^^ +^^^^^^^ ``computeMatrix`` has two main modes of use: @@ -44,6 +44,9 @@ The following tables summarizes the kinds of optional outputs that are available .. attention:: As of version 3.0, computeMatrix produces output with labels present for each sample. Matrices produced with that or later versions can not be used with older versions of ``plotHeatmap`` or any other deepTools program. +.. note:: + ``computeMatrix`` will properly handle strand information if your BED file includes that column (GTF files always include strand). For the ``--metagene`` option to work, you will need either a BED12 (including columns 11 and 12) or a GTF file as input. GFF is NOT the same as GTF format! + Examples ^^^^^^^^ diff --git a/docs/index.rst b/docs/index.rst index e8481b376..a512e8c11 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -56,7 +56,7 @@ that fulfills the following criteria: we can add more and more modules and make use of established methods) -.. tip:: For support, questions, or feature requests contact: deeptools@googlegroups.com +.. tip:: For support or questions please post to `Biostars `__. For bug reports and feature requests please open an issue ``__. Please cite deepTools2 as follows: diff --git a/galaxy/wrapper/deepTools_macros.xml b/galaxy/wrapper/deepTools_macros.xml index 40ef25080..5c947f0e5 100644 --- a/galaxy/wrapper/deepTools_macros.xml +++ b/galaxy/wrapper/deepTools_macros.xml @@ -1,10 +1,10 @@ --numberOfProcessors "\${GALAXY_SLOTS:-4}" - 3.3.1.0 + 3.3.2.0 - deeptools + deeptools samtools @@ -164,6 +164,12 @@ + @@ -181,6 +187,7 @@ --hclust $advancedOpt.used_multiple_regions.clustering.n_hclust #end if #end if + $advancedOpt.used_multiple_regions.silhouette #end if @@ -217,10 +224,10 @@ help="If set and a BED12 or GTF file or files is used to provide regions, only exons will be used. This is convenient for looking at coverage over mature mRNA transcripts or similar uses where introns should be ignored." /> + help="When a GTF file is used to provide regions, only entries with this value as their feature (column 3) will be processed as transcripts. Default: transcript" /> + help="When a GTF file is used to provide regions, only entries with this value as their feature (column 3) will be processed as exons. CDS would be another common value for this. Default: exon" /> + + + + + + + + + + + + + + + + + @@ -893,6 +919,23 @@ is vital to you, select Yes below."> + + + + + + + + + + + + + + + + + diff --git a/galaxy/wrapper/plotCorrelation.xml b/galaxy/wrapper/plotCorrelation.xml index 9bf542e53..e09c2a031 100644 --- a/galaxy/wrapper/plotCorrelation.xml +++ b/galaxy/wrapper/plotCorrelation.xml @@ -18,11 +18,11 @@ --plotHeight $plotting_type.plotHeight #else: --plotTitle '$plotting_type.plotTitle' - #if str($plotting_type.xRange) != '': - --xRange '$plotting_type.xRange' + #if str($plotting_type.xrange_conditional.xrange_select) == 'yes': + --xRange $plotting_type.xrange_conditional.xRange_min $plotting_type.xrange_conditional.xRange_max #end if - #if str($plotting_type.yRange) != '': - --yRange '$plotting_type.yRange' + #if str($plotting_type.yrange_conditional.yrange_select) == 'yes': + --yRange $plotting_type.yrange_conditional.yRange_min $plotting_type.yrange_conditional.yRange_max #end if $plotting_type.log1p #end if @@ -50,12 +50,32 @@ - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/galaxy/wrapper/plotEnrichment.xml b/galaxy/wrapper/plotEnrichment.xml index d17648552..f77b86eb1 100644 --- a/galaxy/wrapper/plotEnrichment.xml +++ b/galaxy/wrapper/plotEnrichment.xml @@ -88,7 +88,6 @@ - = 1.9.0", "scipy >= 0.17.0", - "matplotlib >= 3.0.0", + "matplotlib >= 3.1.0", "pysam >= 0.14.0", "numpydoc >= 0.5", "pyBigWig >= 0.2.1", From 61f0bcdb8244068b861c8dcb4e4adc8f7cd150d0 Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Thu, 5 Mar 2020 09:41:58 +0100 Subject: [PATCH 2/2] fix spelling mistake (#922) --- galaxy/wrapper/plotCoverage.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/galaxy/wrapper/plotCoverage.xml b/galaxy/wrapper/plotCoverage.xml index 6fee4a538..1be8c35ba 100644 --- a/galaxy/wrapper/plotCoverage.xml +++ b/galaxy/wrapper/plotCoverage.xml @@ -26,7 +26,7 @@ #end if #if ' '.join(map(str, $BED)) != 'None': - #set bedFileLList=[] + #set bedFileList=[] #for $f in $BED: #silent $bedFileList.append("'%s'" % $f) #end for @@ -101,11 +101,8 @@ - - -