diff gops_coverage.py @ 4:ad25eb2c422d draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/gops/coverage commit cae3e05d02e60f595bb8b6d77a84f030e9bd1689
author devteam
date Thu, 22 Jun 2017 18:39:05 -0400
parents 7b226a8a6722
children
line wrap: on
line diff
--- a/gops_coverage.py	Fri Dec 18 19:37:38 2015 -0500
+++ b/gops_coverage.py	Thu Jun 22 18:39:05 2017 -0400
@@ -7,11 +7,14 @@
     -1, --cols1=N,N,N,N: Columns for start, end, strand in first file
     -2, --cols2=N,N,N,N: Columns for start, end, strand in second file
 """
+from __future__ import print_function
+
 import fileinput
 import sys
+
+from bx.cookbook import doc_optparse
 from bx.intervals.io import GenomicInterval, NiceReaderWrapper
 from bx.intervals.operations.coverage import coverage
-from bx.cookbook import doc_optparse
 from bx.tabular.io import ParseError
 from galaxy.tools.util.galaxyops import fail, parse_cols_arg, skipped
 
@@ -48,16 +51,17 @@
                 out_file.write( "%s\n" % "\t".join( line.fields ) )
             else:
                 out_file.write( "%s\n" % line )
-    except ParseError, exc:
+    except ParseError as exc:
         out_file.close()
         fail( "Invalid file format: %s" % str( exc ) )
 
     out_file.close()
 
     if g1.skipped > 0:
-        print skipped( g1, filedesc=" of 1st dataset" )
+        print(skipped( g1, filedesc=" of 1st dataset" ))
     if g2.skipped > 0:
-        print skipped( g2, filedesc=" of 2nd dataset" )
+        print(skipped( g2, filedesc=" of 2nd dataset" ))
+
 
 if __name__ == "__main__":
     main()