diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index 6ede4c2614f..1fa6bd500a0 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -33,6 +33,9 @@ from galaxy.util.checkers import is_bz2, is_gzip from . import data, dataproviders log = logging.getLogger(__name__) +# pysam 0.16.0.1 emits logs containing the word 'Error', this can confuse the stdout/stderr checkers. +# Can be be removed once https://github.com/pysam-developers/pysam/issues/939 is resolved. +pysam.set_verbosity(0) # Currently these supported binary data types must be manually set on upload @@ -489,9 +492,9 @@ class Bam(BamNative): # we start another process and discard stderr. if index_flag == '-b': # IOError: No such file or directory: '-b' if index_flag is set to -b (pysam 0.15.4) - cmd = ['python', '-c', "import pysam; pysam.index('%s', '%s')" % (file_name, index_name)] + cmd = ['python', '-c', "import pysam; pysam.set_verbosity(0); pysam.index('{}', '{}')".format(file_name, index_name)] else: - cmd = ['python', '-c', "import pysam; pysam.index('%s', '%s', '%s')" % (index_flag, file_name, index_name)] + cmd = ['python', '-c', "import pysam; pysam.set_verbosity(0); pysam.index('{}', '{}', '{}')".format(index_flag, file_name, index_name)] with open(os.devnull, 'w') as devnull: subprocess.check_call(cmd, stderr=devnull, shell=False) needs_sorting = False diff --git a/lib/galaxy/visualization/data_providers/genome.py b/lib/galaxy/visualization/data_providers/genome.py index 1e06e82bcab..c9c1a82b2c2 100644 --- a/lib/galaxy/visualization/data_providers/genome.py +++ b/lib/galaxy/visualization/data_providers/genome.py @@ -27,6 +27,9 @@ from galaxy.visualization.data_providers.cigar import get_ref_based_read_seq_and # Utility functions. # +# pysam 0.16.0.1 emits logs containing the word 'Error', this can confuse the stdout/stderr checkers. +# Can be be removed once https://github.com/pysam-developers/pysam/issues/939 is resolved. +pysam.set_verbosity(0) PYSAM_INDEX_SYMLINK_NECESSARY = packaging.version.parse(pysam.__version__) <= packaging.version.parse('0.13.0')