Mercurial > repos > guerler > springsuite
comparison spring_model_all.py @ 41:f316caf098a6 draft default tip
"planemo upload commit 685e1236afde7cf6bb0c9236de06998d2c211dd3"
author | guerler |
---|---|
date | Mon, 01 Mar 2021 15:02:36 +0000 |
parents | 172398348efd |
children |
comparison
equal
deleted
inserted
replaced
40:06337927c198 | 41:f316caf098a6 |
---|---|
32 mkdir(outPath) | 32 mkdir(outPath) |
33 if not isdir("temp"): | 33 if not isdir("temp"): |
34 mkdir("temp") | 34 mkdir("temp") |
35 dbkit = DBKit(args.hhr_index, args.hhr_database) | 35 dbkit = DBKit(args.hhr_index, args.hhr_database) |
36 logFile = open(args.log, "w") | 36 logFile = open(args.log, "w") |
37 logFile.write("#namea\t nameb\t springscore\t tmscore\t energy\t clashes\n") | 37 logFile.write("#namea\t nameb\t springscore\t tmscore\t energy\t clashes\t zscore\t templatea\t templateb\n") |
38 with open(args.pairs, "r") as file: | 38 with open(args.pairs, "r") as file: |
39 for line in file: | 39 for line in file: |
40 param = line.split() | 40 param = line.split() |
41 aIdentifier = param[0] | 41 aIdentifier = param[0] |
42 bIdentifier = param[1] | 42 bIdentifier = param[1] |
50 continue | 50 continue |
51 output = "%s/%s.%s.pdb" % (outPath, aIdentifier, bIdentifier) | 51 output = "%s/%s.%s.pdb" % (outPath, aIdentifier, bIdentifier) |
52 modelArgs.set(a_hhr=aFile, b_hhr=bFile, output=output) | 52 modelArgs.set(a_hhr=aFile, b_hhr=bFile, output=output) |
53 modelData = createModel(modelArgs) | 53 modelData = createModel(modelArgs) |
54 if modelData: | 54 if modelData: |
55 infoStr = "%s\t %s\t %5.2f\t %5.2f\t %5.2f\t %5.2f\n" % (aIdentifier, bIdentifier, | 55 infoStr = "%s\t %s\t %5.2f\t %5.2f\t %5.2f\t %5.2f\t %5.2f\t %s\t %s\n" |
56 modelData["springscore"], | 56 infoStr = infoStr % (aIdentifier, bIdentifier, |
57 modelData["tmscore"], | 57 modelData["springscore"], |
58 modelData["energy"], | 58 modelData["tmscore"], |
59 modelData["clashes"]) | 59 modelData["energy"], |
60 modelData["clashes"], | |
61 modelData["zscore"], | |
62 modelData["aTemplate"], | |
63 modelData["bTemplate"]) | |
60 logFile.write(infoStr) | 64 logFile.write(infoStr) |
65 logFile.flush() | |
61 if isfile(aFile): | 66 if isfile(aFile): |
62 remove(aFile) | 67 remove(aFile) |
63 if isfile(bFile): | 68 if isfile(bFile): |
64 remove(bFile) | 69 remove(bFile) |
65 logFile.close() | 70 logFile.close() |