Mercurial > repos > fubar > tool_factory_2
view 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 source
# 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()