diff toolfactory/rgToolFactory2.py @ 39:2cd6555baf44 draft

Uploaded
author fubar
date Wed, 12 Aug 2020 19:00:44 -0400
parents a30536c100bf
children
line wrap: on
line diff
--- a/toolfactory/rgToolFactory2.py	Wed Aug 12 01:43:46 2020 -0400
+++ b/toolfactory/rgToolFactory2.py	Wed Aug 12 19:00:44 2020 -0400
@@ -17,8 +17,10 @@
 # removed all the old complications including making the new tool use this same script
 # galaxyxml now generates the tool xml https://github.com/hexylena/galaxyxml
 # No support for automatic HTML file creation from arbitrary outputs
-# TODO: add option to run that code as a post execution hook
-# TODO: add additional history input parameters - currently only one
+# essential problem is to create two command lines - one for the tool xml and a different
+# one to run the executable with the supplied test data and settings
+# Be simpler to write the tool, then run it with planemo and soak up the test outputs.
+
 
 
 import argparse
@@ -249,6 +251,8 @@
         )
         art = "%s.%s" % (self.tool_name, self.args.interpreter_name)
         artifact = open(art, "wb")
+        if self.args.interpreter_name == "python":
+            artifact.write(bytes("#!/usr/bin/env python\n", "utf8"))
         artifact.write(bytes(self.script, "utf8"))
         artifact.close()
         aCL(self.args.interpreter_name)
@@ -541,7 +545,8 @@
         )
         self.tool.add_comment("Source in git at: %s" % (toolFactoryURL))
         self.tool.add_comment(
-            "Cite: Creating re-usable tools from scripts doi: 10.1093/bioinformatics/bts573"
+            "Cite: Creating re-usable tools from scripts doi: \
+            10.1093/bioinformatics/bts573"
         )
         exml = self.tool.export()
         xf = open('%s.xml' % self.tool_name, "w")