diff --git a/.planemo.sh b/.planemo.sh index 301bde551..c3ae9d07b 100755 --- a/.planemo.sh +++ b/.planemo.sh @@ -1,24 +1,29 @@ #!/bin/bash planemo=$HOME/miniconda/envs/planemo/bin/planemo -$planemo test --no_dependency_resolution --install_galaxy \ -galaxy/wrapper/alignmentSieve.xml \ -galaxy/wrapper/bamCompare.xml \ -galaxy/wrapper/bamCoverage.xml \ -galaxy/wrapper/bamPEFragmentSize.xml \ -galaxy/wrapper/bigwigCompare.xml \ -galaxy/wrapper/computeGCBias.xml \ -galaxy/wrapper/computeMatrix.xml \ -galaxy/wrapper/computeMatrixOperations.xml \ -galaxy/wrapper/correctGCBias.xml \ -galaxy/wrapper/estimateReadFiltering.xml \ -galaxy/wrapper/multiBamSummary.xml \ -galaxy/wrapper/multiBigwigSummary.xml \ -galaxy/wrapper/plotCorrelation.xml \ -galaxy/wrapper/plotCoverage.xml \ -galaxy/wrapper/plotEnrichment.xml \ -galaxy/wrapper/plotFingerprint.xml \ -galaxy/wrapper/plotHeatmap.xml \ -galaxy/wrapper/plotPCA.xml \ -galaxy/wrapper/plotProfiler.xml 2>&1 | grep -v -e "^galaxy" | grep -v -e "^requests" +if [[ $1 == "1" ]] ; then + wrappers="galaxy/wrapper/alignmentSieve.xml \ + galaxy/wrapper/bamCompare.xml \ + galaxy/wrapper/bamCoverage.xml \ + galaxy/wrapper/bamPEFragmentSize.xml \ + galaxy/wrapper/bigwigCompare.xml \ + galaxy/wrapper/computeGCBias.xml" +elif [[ $1 == "2" ]] ; then + wrappers="galaxy/wrapper/computeMatrix.xml \ + galaxy/wrapper/computeMatrixOperations.xml \ + galaxy/wrapper/correctGCBias.xml \ + galaxy/wrapper/estimateReadFiltering.xml \ + galaxy/wrapper/multiBamSummary.xml \ + galaxy/wrapper/multiBigwigSummary.xml" +else + wrappers="galaxy/wrapper/plotCorrelation.xml \ + galaxy/wrapper/plotCoverage.xml \ + galaxy/wrapper/plotEnrichment.xml \ + galaxy/wrapper/plotFingerprint.xml \ + galaxy/wrapper/plotHeatmap.xml \ + galaxy/wrapper/plotPCA.xml \ + galaxy/wrapper/plotProfiler.xml" +fi + +${planemo} test --no_dependency_resolution --install_galaxy ${wrappers} 2>&1 | grep -v -e "^galaxy" | grep -v -e "^requests" test ${PIPESTATUS[0]} -eq 0 diff --git a/.travis.yml b/.travis.yml index fe4a2694d..ff07034e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,10 +7,18 @@ os: - osx jobs: include: - - stage: galaxy36 + - stage: galaxy36_1 env: - TESTGALAXY="1" - TRAVIS_PYTHON_VERSION=3.6 + - stage: galaxy36_2 + env: + - TESTGALAXY="2" + - TRAVIS_PYTHON_VERSION=3.6 + - stage: galaxy36_3 + env: + - TESTGALAXY="3" + - TRAVIS_PYTHON_VERSION=3.6 # Setup anaconda before_install: @@ -23,7 +31,7 @@ before_install: - hash -r - conda config --set always_yes yes --set changeps1 no - conda update -q conda - - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "3.6" && ${TESTGALAXY:-"0"} == "1" ]] ; then conda create -c conda-forge -c bioconda -n planemo planemo; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "3.6" && ${TESTGALAXY:-"0"} != "0" ]] ; then conda create -c conda-forge -c bioconda -n planemo planemo; fi # Useful for debugging any issues with conda - conda info -a @@ -35,11 +43,12 @@ install: # command to run tests script: - - if [[ ${TESTGALAXY:-"2"} == "2" ]] ; then flake8 . --exclude=.venv,.build,foo,build,deeptoolsintervals/__init__.py --ignore=E501,F403,E402,F999,F405,E722 ; fi - - if [[ ${TESTGALAXY:-"2"} == "2" ]] ; then export owd=`pwd` ; fi - - if [[ ${TESTGALAXY:-"2"} == "2" ]] ; then cd ~/ && nosetests --with-doctest -sv deeptools ; fi - - if [[ ${TESTGALAXY:-"2"} == "2" ]] ; then nosetests --with-doctest -sv deeptoolsintervals ; fi - - if [[ ${TESTGALAXY:-"2"} == "2" ]] ; then cd ${owd} ; fi + - if [[ ${TESTGALAXY:-"0"} == "0" ]] ; then flake8 . --exclude=.venv,.build,foo,build,deeptoolsintervals/__init__.py --ignore=E501,F403,E402,F999,F405,E722 ; fi + - if [[ ${TESTGALAXY:-"0"} == "0" ]] ; then export owd=`pwd` ; fi + - if [[ ${TESTGALAXY:-"0"} == "0" ]] ; then cd ~/ && nosetests --with-doctest -sv deeptools ; fi + - if [[ ${TESTGALAXY:-"0"} == "0" ]] ; then nosetests --with-doctest -sv deeptoolsintervals ; fi + - if [[ ${TESTGALAXY:-"0"} == "0" ]] ; then cd ${owd} ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" && ${TESTGALAXY:-"0"} == "1" ]] ; then /home/travis/miniconda/envs/planemo/bin/planemo lint galaxy/wrapper/ ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" && ${TESTGALAXY:-"0"} == "1" ]] ; then ./.planemo.sh ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" && ${TESTGALAXY:-"0"} != "0" ]] ; then ./.planemo.sh ${TESTGALAXY}; fi + sudo: false diff --git a/CHANGES.txt b/CHANGES.txt index a2c4c2121..4fc63c468 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,8 @@ +3.0.1 + + * Fixed the `--perGroup` option in plotProfile and plotHeatmap when multiple groups were being used. In version 3.0.0, this would typically cause an error and deepTools to crash. (issue #673) + * Fixed a few issues with the Galaxy wrappers. Thanks to Ralf Gilsbach, Claudia Keller, and @bgruening (e.g., issue #678) + 3.0.0 * plotCorrelation` now has `--log1p` and `--maxRange` options if a scatter plot is produced. `--log1p` plots the natural log of the values (plus 1). `--maxRange` sets the maximum X and Y axis ranges. If they would normally be below this value then they are left unchanged. (issue #536) diff --git a/deeptools/_version.py b/deeptools/_version.py index b5aaf9026..e9cc69b10 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.0.0' +__version__ = '3.0.1' diff --git a/deeptools/plotHeatmap.py b/deeptools/plotHeatmap.py index 482b022c2..336e8bd94 100644 --- a/deeptools/plotHeatmap.py +++ b/deeptools/plotHeatmap.py @@ -128,8 +128,10 @@ def addProfilePlot(hm, plt, fig, grids, iterNum, iterNum2, perGroup, averageType for sample_id in range(iterNum): if perGroup: title = hm.matrix.group_labels[sample_id] + tickIdx = sample_id % hm.matrix.get_num_samples() else: title = hm.matrix.sample_labels[sample_id] + tickIdx = sample_id if sample_id > 0 and len(yMin) == 1 and len(yMax) == 1: ax_profile = fig.add_subplot(grids[0, sample_id], sharey=ax_list[0]) else: @@ -157,7 +159,7 @@ 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(sample_id) + 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) xticks_use = [x * tickscale for x in xticks] diff --git a/deeptools/plotProfile.py b/deeptools/plotProfile.py index 2e55acb02..d21e56939 100644 --- a/deeptools/plotProfile.py +++ b/deeptools/plotProfile.py @@ -698,10 +698,12 @@ def plot_profile(self): title = self.hm.matrix.group_labels[plot] if row != 0 and len(self.y_min) == 1 and len(self.y_max) == 1: plt.setp(ax.get_yticklabels(), visible=False) + tickIdx = plot % self.hm.matrix.get_num_samples() else: title = self.hm.matrix.sample_labels[plot] if col != 0 and len(self.y_min) == 1 and len(self.y_max) == 1: plt.setp(ax.get_yticklabels(), visible=False) + tickIdx = plot ax.set_title(title) for data_idx in range(self.numlines): @@ -747,7 +749,7 @@ def plot_profile(self): """ totalWidth = sub_matrix['matrix'].shape[1] - xticks, xtickslabel = self.getTicks(plot) + xticks, xtickslabel = self.getTicks(tickIdx) if np.ceil(max(xticks)) != float(totalWidth): tickscale = float(totalWidth) / max(xticks) xticks_use = [x * tickscale for x in xticks] diff --git a/galaxy/wrapper/computeMatrix.xml b/galaxy/wrapper/computeMatrix.xml index 5364b666d..1046b17eb 100644 --- a/galaxy/wrapper/computeMatrix.xml +++ b/galaxy/wrapper/computeMatrix.xml @@ -21,7 +21,7 @@ $mode.mode_select --regionsFileName '#echo "' '".join($bed_files)#' - --scoreFileName '#echo "' '".join($files)#' + --scoreFileName #echo ' '.join($files)# --outFileName '$outFileName' diff --git a/galaxy/wrapper/deepTools_macros.xml b/galaxy/wrapper/deepTools_macros.xml index ff2b88389..71d683b65 100644 --- a/galaxy/wrapper/deepTools_macros.xml +++ b/galaxy/wrapper/deepTools_macros.xml @@ -1,10 +1,10 @@ --numberOfProcessors "\${GALAXY_SLOTS:-4}" - 3.0.0 + 3.0.1 - deeptools + deeptools samtools @@ -456,7 +456,6 @@ is vital to you, select Yes below."> #for $counter, $f in enumerate($multibam_conditional.multibam_repeats): #set identifier = re.sub('[^\.\s\w\-]', '_', str($f.bamfiles.element_identifier)) ln -s "${f.bamfiles}" "./${counter}.bam" && - ln -s "${f.bamfiles.metadata.bam_index}" "./${counter}.bam.bai" && #if $f.bamfiles.ext == 'bam': ln -s '${f.bamfiles.metadata.bam_index}' './${counter}.bam.bai' && #else: diff --git a/galaxy/wrapper/multiBigwigSummary.xml b/galaxy/wrapper/multiBigwigSummary.xml index 40bb358c2..c6457d535 100644 --- a/galaxy/wrapper/multiBigwigSummary.xml +++ b/galaxy/wrapper/multiBigwigSummary.xml @@ -19,8 +19,8 @@ --outFileName $outFile - --bwfiles '#echo "' '".join($files)#' - --labels #echo " ".join($labels)# + --bwfiles #echo ' '.join($files)# + --labels #echo ' '.join($labels)# #if $outRawCounts: --outRawCounts '$outFileRawCounts'