# HG changeset patch # User pablocarb # Date 1556806892 14400 # Node ID 6572347b3e1af21b7ab47acc880c1025305e2843 # Parent e328a5f60135c5e1d8d45ff62e35b5886574e7c5 planemo upload commit 6a252d04f4b2f79606ab6679b6a91f957e33da7b-dirty diff -r e328a5f60135 -r 6572347b3e1a optbiodes.xml --- a/optbiodes.xml Thu May 02 09:27:23 2019 -0400 +++ b/optbiodes.xml Thu May 02 10:21:32 2019 -0400 @@ -7,7 +7,7 @@ python $__tool_directory__/toolOptBioDes.py $input1 $input2 $output1 $output2 -server $server ]]> - + diff -r e328a5f60135 -r 6572347b3e1a toolOptBioDes.py --- a/toolOptBioDes.py Thu May 02 09:27:23 2019 -0400 +++ b/toolOptBioDes.py Thu May 02 10:21:32 2019 -0400 @@ -16,7 +16,7 @@ def arguments(): parser = argparse.ArgumentParser(description='toolOptBioDes: Optimal SynBio Design. Pablo Carbonell, SYNBIOCHEM, 2019') parser.add_argument('infile', - help='Input xlsx file (DoE specificiations).') + help='Input csv file (DoE specificiations).') parser.add_argument('size', help='Library size.') parser.add_argument('outfile', @@ -34,7 +34,7 @@ def sheetUpload(doefile, size, outfile, diagfile, url): files = { 'file': open(doefile, 'rb' ) } - values = {'size': int(size)} + values = {'size': int(size), 'format': 'csv'} r = requests.post( os.path.join(url, 'Query' ), files=files, data=values ) res = json.loads( r.content.decode('utf-8') ) M = res['data']['M'] @@ -43,6 +43,10 @@ cw.writerow( res['data']['names'] ) for row in M: cw.writerow( row ) + with open(diagfile. 'w') as h: + cw = csv.writer(h) + cw.writerow( ['Size', 'Efficiency'] ) + cw.writerow( [res['data']['libsize'], res['data']['J']] ) print( 'Size:', res['data']['libsize'], 'Efficiency:', res['data']['J'] )