diff test-data/runme.py @ 26:db35d39e1de9 draft

Passes planemo test Uses galaxyxml to generate new tool. More outputs will be added...
author fubar
date Thu, 30 Jul 2020 06:48:45 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/runme.py	Thu Jul 30 06:48:45 2020 -0400
@@ -0,0 +1,19 @@
+# reverse order of columns in a tabular file
+import argparse
+parser = argparse.ArgumentParser()
+a = parser.add_argument
+a('--infile',default='')
+a('--outfile',default=None)
+a('--prefix',default=None)
+args = parser.parse_args()
+inp = args.infile
+outp = args.outfile
+i = open(inp,'r').readlines()
+o = open(outp,'w')
+for row in i:
+	rs = row.rstrip()
+	rs = list(rs)
+	rs.reverse()
+	o.write('%s:%s' % (args.prefix,''.join(rs)))
+	o.write('\n')
+o.close()