diff 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
line wrap: on
line diff
--- a/spring_model_all.py	Sat Jan 23 14:42:46 2021 +0000
+++ b/spring_model_all.py	Mon Mar 01 15:02:36 2021 +0000
@@ -34,7 +34,7 @@
         mkdir("temp")
     dbkit = DBKit(args.hhr_index, args.hhr_database)
     logFile = open(args.log, "w")
-    logFile.write("#namea\t nameb\t springscore\t tmscore\t energy\t clashes\n")
+    logFile.write("#namea\t nameb\t springscore\t tmscore\t energy\t clashes\t zscore\t templatea\t templateb\n")
     with open(args.pairs, "r") as file:
         for line in file:
             param = line.split()
@@ -52,12 +52,17 @@
             modelArgs.set(a_hhr=aFile, b_hhr=bFile, output=output)
             modelData = createModel(modelArgs)
             if modelData:
-                infoStr = "%s\t %s\t %5.2f\t %5.2f\t %5.2f\t %5.2f\n" % (aIdentifier, bIdentifier,
-                                                                         modelData["springscore"],
-                                                                         modelData["tmscore"],
-                                                                         modelData["energy"],
-                                                                         modelData["clashes"])
+                infoStr = "%s\t %s\t %5.2f\t %5.2f\t %5.2f\t %5.2f\t %5.2f\t %s\t %s\n"
+                infoStr = infoStr % (aIdentifier, bIdentifier,
+                                     modelData["springscore"],
+                                     modelData["tmscore"],
+                                     modelData["energy"],
+                                     modelData["clashes"],
+                                     modelData["zscore"],
+                                     modelData["aTemplate"],
+                                     modelData["bTemplate"])
                 logFile.write(infoStr)
+                logFile.flush()
             if isfile(aFile):
                 remove(aFile)
             if isfile(bFile):