Python_Average_and_Standard_DeviationName00 /home/annyikha/Dropbox/Workflows/example.txt 2011-09-21 02:20:03.538 EDT Required: a filename, complete with path. 2011-09-21 02:19:35.547 EDT Output Provides standard deviation and average as an output. This essentially prints everything in the print command. 2011-09-21 02:20:32.906 EDT GetSTDEVandAVGname0STDOUT00net.sf.taverna.t2.activitiesexternal-tool-activity1.3net.sf.taverna.t2.activities.externaltool.ExternalToolActivity 789663B8-DA91-428A-9F7D-B3F3DA185FD4 default local <?xml version="1.0" encoding="UTF-8"?> <localInvocation><shellPrefix>/bin/sh -c</shellPrefix><linkCommand>/bin/ln -s %%PATH_TO_ORIGINAL%% %%TARGET_NAME%%</linkCommand></localInvocation> d984ab54-1831-4573-8128-80ce35df4633 HelloPython Python Simple workflow that uses a python script to say Hello ! python stde.py %%name%% 1200 1800 name stde.py true false false UTF-8 false import numpy import sys # Please change the location of this file # to correspond with its location on your own machine. # Because this is being done in Taverna, I don't want # to push my luck with user input in case it doesn't work. # AVERAGE TavernaInput = sys.argv[1] print "The file you have chosen is: '", TavernaInput, "'" f = open(TavernaInput, 'r') strlist = [line.strip() for line in f] numblist = [int(x) for x in strlist] # print numblist avgnumb = numpy.average(numblist) print "The average of the values in provided list is:", avgnumb # STANDARD DEVIATION stdevnumb = numpy.std(numblist) print "The standard deviation of the provided values is:", stdevnumb name name false false false UTF-8 false false false true true true 0 false net.sf.taverna.t2.coreworkflowmodel-impl1.3net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize 1 net.sf.taverna.t2.coreworkflowmodel-impl1.3net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBouncenet.sf.taverna.t2.coreworkflowmodel-impl1.3net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failovernet.sf.taverna.t2.coreworkflowmodel-impl1.3net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry 1.0 1000 5000 0 net.sf.taverna.t2.coreworkflowmodel-impl1.3net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.InvokeGetSTDEVandAVGnameNameOutputGetSTDEVandAVGSTDOUT This workflow uses a Python script to take a provided filename (or list of filenames) containing numbers (one per line) and return the standard deviation and average (or mean). 2011-09-21 02:48:30.796 EDT 3ed0d5c5-2446-4414-8706-8cb7b73e7665 2011-07-14 12:23:33.251 EDT c8f7a93d-b356-462e-858b-baa84915a62b 2011-07-14 12:29:03.917 EDT 2f26c0ba-1528-46d4-9eea-2feb5112d5cc 2011-07-14 12:21:50.51 EDT edf89b3a-23e0-4065-8915-a0f71141936a 2011-09-20 19:41:36.729 EDT 7befc925-4a8c-437c-ac5c-91add7da44c4 2011-07-14 13:02:45.169 EDT 33a7c587-fa40-44ba-90cf-2a7ffdff6eae 2011-07-14 12:13:47.391 EDT Kayleigh Ayn Bohémier 2011-09-21 02:47:21.665 EDT 858f6b4e-32f3-4291-913c-598ac99a3cfa 2011-09-21 02:48:31.6 EDT 33f20f4b-3c8f-49ed-9467-2f57ebb5496e 2011-07-14 13:06:47.919 EDT 62e053fa-ae11-4acc-aa4c-3eec252a164f 2011-07-14 12:31:39.507 EDT Python Average and Standard Deviation 2011-09-21 02:47:38.942 EDT aac7852c-12ed-4d82-abaa-da8086edb8a4 2011-07-14 12:27:31.975 EDT e6866cd0-fcb4-4c3d-9cc3-0917dde653ef 2011-09-21 02:23:55.8 EDT 2eb8a333-4c29-4eee-b90d-58b662a6eea3 2011-09-21 02:20:34.485 EDT 4d630857-027a-4569-8d86-89f8196b14f4 2011-07-14 12:32:46.711 EDT 34fa920a-7a62-4d39-a680-d6d176cf5fd2 2011-07-14 12:12:26.71 EDT 41abc123-91f0-4815-b972-6b6f877d3b02 2011-07-14 12:20:27.537 EDT 30c00933-6734-4dfa-89a8-1e91b9498860 2011-09-20 19:33:43.673 EDT