diff gops_join.py @ 4:a10f49d9218a draft

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/gops/join commit cae3e05d02e60f595bb8b6d77a84f030e9bd1689
author devteam
date Thu, 22 Jun 2017 18:52:36 -0400
parents ffbd1de29c28
children
line wrap: on
line diff
--- a/gops_join.py	Wed Nov 11 12:48:58 2015 -0500
+++ b/gops_join.py	Thu Jun 22 18:52:36 2017 -0400
@@ -8,11 +8,14 @@
     -m, --mincols=N: Require this much overlap (default 1bp)
     -f, --fill=N: none, right, left, both
 """
+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.join import join
-from bx.cookbook import doc_optparse
 from bx.tabular.io import ParseError
 from galaxy.tools.util.galaxyops import fail, parse_cols_arg, skipped
 
@@ -61,7 +64,7 @@
                 out_file.write( "%s\n" % "\t".join( outfields ) )
             else:
                 out_file.write( "%s\n" % outfields )
-    except ParseError, exc:
+    except ParseError as exc:
         out_file.close()
         fail( "Invalid file format: %s" % str( exc ) )
     except MemoryError:
@@ -71,9 +74,10 @@
     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()