From b3928d91b12f0a09de5a26fec1774d7c93a3eefa Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Tue, 8 Mar 2016 00:32:11 +0100 Subject: [PATCH] Monkey patch this thing and call it done --- .travis.yml | 2 +- deeptools/correctGCBias.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 575912459a..67640b1e18 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ install: # command to run tests script: - flake8 . --exclude=.venv,.build,foo --ignore=E501,F403,E402 - - nosetests --with-doctest --ignore-files=plotCoverage --exclude=deeptools.correctGCBias deeptools + - nosetests --with-doctest --ignore-files=plotCoverage deeptools - nosetests deeptools/test/test_plotCoverage.py - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=`echo $PATH | sed -e 's/\/home\/travis\/miniconda\/bin://'` ; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then /home/travis/build/fidelram/deepTools/foo/bin/planemo lint galaxy/wrapper/ ; fi diff --git a/deeptools/correctGCBias.py b/deeptools/correctGCBias.py index add8afb525..4729741e06 100644 --- a/deeptools/correctGCBias.py +++ b/deeptools/correctGCBias.py @@ -296,7 +296,11 @@ def writeCorrectedSam_worker(chrNameBam, chrNameBit, start, end, >>> tempFile = writeCorrectedSam_worker(*args, \ ... tag_but_not_change_number=True, verbose=False) >>> from StringIO import StringIO + >>> ostdout = sys.stdout + >>> import tempfile + >>> sys.stdout = tempfile.TemporaryFile() >>> idx = pysam.index(tempFile) + >>> sys.stdout = ostdout >>> bam = pysam.Samfile(tempFile) >>> [dict(r.tags)['YN'] for r in bam.fetch(args[0], 200, 250)] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1] @@ -305,7 +309,9 @@ def writeCorrectedSam_worker(chrNameBam, chrNameBit, start, end, >>> tempFile = \ ... writeCorrectedSam_worker(*test.testWriteCorrectedSam_paired(),\ ... tag_but_not_change_number=True, verbose=False) + >>> sys.stdout = tempfile.TemporaryFile() >>> idx = pysam.index(tempFile) + >>> sys.stdout = ostdout >>> bam = pysam.Samfile(tempFile) >>> [dict(r.tags)['YN'] for r in bam.fetch('chr2L', 0, 50)] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]