From 8ab1af867d31eb93eb748eff7009287750417cf1 Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@unibas.ch> Date: Mon, 2 Dec 2019 18:43:57 +0100 Subject: [PATCH] parse lga output from binary stream --- modules/bindings/pymod/lga.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/bindings/pymod/lga.py b/modules/bindings/pymod/lga.py index 7ab23e854..59f5d53fb 100644 --- a/modules/bindings/pymod/lga.py +++ b/modules/bindings/pymod/lga.py @@ -109,7 +109,9 @@ def GDT(pdb1, pdb2, chain1='', chain2='', reference_length=None, lga_bin=None): expanded_cmd=command % params lga_proc=subprocess.Popen(expanded_cmd, shell=True, stdout=subprocess.PIPE) + stdout, _ = lga_proc.communicate() + length=reference_length or max(pdb1.residue_count, pdb2.residue_count) - result=_ParseLGAOutput(lga_proc.stdout.readlines(), reference_length) + result=_ParseLGAOutput(stdout.decode().splitlines(), reference_length) os.system('rm -r %s' % temp_d) return result -- GitLab