diff emboss_format_corrector.py @ 11:0e2484b6829b draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/emboss_5 commit b583bbeb8fc90cd4b1e987a56982e7cf4aed1a68
author iuc
date Mon, 30 Jan 2017 13:27:40 -0500
parents 9b98d3d903c6
children c2228166c035
line wrap: on
line diff
--- a/emboss_format_corrector.py	Fri Aug 12 19:17:10 2016 -0400
+++ b/emboss_format_corrector.py	Mon Jan 30 13:27:40 2017 -0500
@@ -1,21 +1,18 @@
-#EMBOSS format corrector
-
+# EMBOSS format corrector
 import operator
 
-#Properly set file formats before job run
+
+# Properly set file formats before job run
 def exec_before_job( app, inp_data=None, out_data=None, tool=None, param_dict=None ):
-    #why isn't items an ordered list?
+    # why isn't items an ordered list?
     items = out_data.items()
-    #lets sort it ourselves....
     items = sorted(items, key=operator.itemgetter(0))
-    #items is now sorted...
-    
-    #normal filetype correction
-    data_count=1
+
+    # normal filetype correction
+    data_count = 1
     for name, data in items:
-        outputType = param_dict.get( 'out_format'+str(data_count), None )
-        #print "data_count",data_count, "name", name, "outputType", outputType
-        if outputType !=None:
+        outputType = param_dict.get( 'out_format' + str(data_count), None )
+        if outputType is not None:
             if outputType == 'ncbi':
                 outputType = "fasta"
             elif outputType == 'excel':
@@ -25,26 +22,26 @@
             data = app.datatypes_registry.change_datatype(data, outputType)
             app.model.context.add( data )
             app.model.context.flush()
-        data_count+=1
-    
-    #html filetype correction
-    data_count=1
+        data_count += 1
+
+    # html filetype correction
+    data_count = 1
     for name, data in items:
-        wants_plot = param_dict.get( 'html_out'+str(data_count), None )
+        wants_plot = param_dict.get( 'html_out' + str(data_count), None )
         ext = "html"
         if wants_plot == "yes":
             data = app.datatypes_registry.change_datatype(data, ext)
             app.model.context.add( data )
             app.model.context.flush()
-        data_count+=1
-    
-    #png file correction
-    data_count=1
+        data_count += 1
+
+    # png file correction
+    data_count = 1
     for name, data in items:
-        wants_plot = param_dict.get( 'plot'+str(data_count), None )
+        wants_plot = param_dict.get( 'plot' + str(data_count), None )
         ext = "png"
         if wants_plot == "yes":
             data = app.datatypes_registry.change_datatype(data, ext)
             app.model.context.add( data )
             app.model.context.flush()
-        data_count+=1
+        data_count += 1