diff toolfactory/rgToolFactory2.py @ 133:b843d75a5107 draft

Uploaded
author fubar
date Sat, 10 Apr 2021 01:44:50 +0000
parents 65b5e9acf98a
children 1f353bee783f
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.py	Sat Apr 10 01:04:14 2021 +0000
+++ b/toolfactory/rgToolFactory2.py	Sat Apr 10 01:44:50 2021 +0000
@@ -28,17 +28,13 @@
 import tempfile
 import time
 
-
+import galaxyxml.tool as gxt
+import galaxyxml.tool.parameters as gxtp
+import lxml
+import yaml
 from bioblend import ConnectionError
 from bioblend import toolshed
 
-import galaxyxml.tool as gxt
-import galaxyxml.tool.parameters as gxtp
-
-import lxml
-
-import yaml
-
 myversion = "V2.2 February 2021"
 verbose = True
 debug = True
@@ -305,9 +301,9 @@
                 print(f'### warning. Repeats for {nam} ignored - not permitted in positional parameter command lines!')
             over = p["override"]
             clsuffix.append([p["CL"], nam, over])
-            xclsuffix.append([p["CL"],  '"$%s"' % nam, over])
+            xclsuffix.append([p["CL"], '"$%s"' % nam, over])
         for p in self.selpar:
-            clsuffix.append([p["CL"], nam, p["override"]])
+            clsuffix.append([p["CL"], p["name"], p["override"]])
             xclsuffix.append([p["CL"], '"$%s"' % nam, p["override"]])
         clsuffix.sort()
         xclsuffix.sort()
@@ -490,7 +486,7 @@
             newname = p["infilename"]
             newfmt = p["format"]
             ndash = self.getNdash(newname)
-            reps = p.get("repeat",0) == 1
+            reps = p.get("repeat", 0) == 1
             if not len(p["label"]) > 0:
                 alab = p["CL"]
             else:
@@ -513,7 +509,7 @@
                     aninput.positional = int(p["origCL"])
                     aninput.command_line_override = "$%s" % newname
             if reps:
-                repe = gxtp.Repeat(name=f"R_{newname}", title=f"Add as many {newlabel} as needed")
+                repe = gxtp.Repeat(name=f"R_{newname}", title=f"Add as many {alab} as needed")
                 repe.append(aninput)
                 self.tinputs.append(repe)
                 tparm = gxtp.TestRepeat(name=f"R_{newname}")