diff gops_basecoverage.py @ 5:37652c34b3bf draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/gops/basecoverage commit cae3e05d02e60f595bb8b6d77a84f030e9bd1689
author devteam
date Thu, 22 Jun 2017 18:37:49 -0400
parents c929b6540d07
children 4d584cf5ced5
line wrap: on
line diff
--- a/gops_basecoverage.py	Fri Dec 18 19:36:36 2015 -0500
+++ b/gops_basecoverage.py	Thu Jun 22 18:37:49 2017 -0400
@@ -5,12 +5,14 @@
 usage: %prog in_file out_file
     -1, --cols1=N,N,N,N: Columns for start, end, strand in first file
 """
+from __future__ import print_function
 
 import fileinput
 import sys
+
+from bx.cookbook import doc_optparse
 from bx.intervals.io import NiceReaderWrapper
 from bx.intervals.operations.base_coverage import base_coverage
-from bx.cookbook import doc_optparse
 from bx.tabular.io import ParseError
 from galaxy.tools.util.galaxyops import fail, parse_cols_arg, skipped
 
@@ -34,13 +36,14 @@
 
     try:
         bases = base_coverage(g1)
-    except ParseError, exc:
+    except ParseError as exc:
         fail( "Invalid file format: %s" % str( exc ) )
     out_file = open( out_fname, "w" )
     out_file.write( "%s\n" % str( bases ) )
     out_file.close()
     if g1.skipped > 0:
-        print skipped( g1, filedesc="" )
+        print(skipped( g1, filedesc="" ))
+
 
 if __name__ == "__main__":
     main()