Created
July 6, 2017 09:30
-
-
Save josejimenezluna/e8e0622675f41aa99014daef392bfecb to your computer and use it in GitHub Desktop.
xscore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse(process): | |
out = process.stdout.decode('utf8') | |
out = out.split('\n') | |
for line in out: | |
if line[:2] == 'HP': | |
hp = float(line.split('=')[1]) | |
elif line[:2] == 'HM': | |
hm = float(line.split('=')[1]) | |
elif line[:2] == 'HS': | |
hs = float(line.split('=')[1]) | |
else: | |
continue | |
try: | |
return hp, hm, hs | |
except Exception as e: | |
print(e) | |
return 0.0, 0.0, 0.0 | |
def runXscore(protein_file, ligand_file, base='/shared/lab/software/xscore/xscore_v1.2.1/c++'): | |
exec = './xscore' | |
os.chdir(base) | |
out = subprocess.run([exec, '-score', protein_file, ligand_file], stdout=subprocess.PIPE) | |
return parse(out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I come up against trouble install xscore, the official website cannot be visited: http://sw16.im.med.umich.edu/software/xtool/
Could you please do me a favor to install it?