diff gops_complement.py @ 5:1377a23bc02a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/gops/complement commit cae3e05d02e60f595bb8b6d77a84f030e9bd1689
author devteam
date Thu, 22 Jun 2017 18:38:23 -0400
parents 48d2f6a56a90
children
line wrap: on
line diff
--- a/gops_complement.py	Fri Dec 18 19:37:08 2015 -0500
+++ b/gops_complement.py	Thu Jun 22 18:38:23 2017 -0400
@@ -7,13 +7,15 @@
     -l, --lengths=N: Filename of .len file for species (chromosome lengths)
     -a, --all: Complement all chromosomes (Genome-wide complement)
 """
+from __future__ import print_function
 
+import fileinput
 import sys
-import fileinput
+
+from bx.cookbook import doc_optparse
 from bx.intervals.io import GenomicInterval, GenomicIntervalReader, NiceReaderWrapper
 from bx.intervals.operations.complement import complement
 from bx.intervals.operations.subtract import subtract
-from bx.cookbook import doc_optparse
 from bx.tabular.io import ParseError
 from galaxy.tools.util.galaxyops import fail, parse_cols_arg, skipped
 
@@ -83,14 +85,15 @@
                 out_file.write( "%s\n" % "\t".join( interval ) )
             else:
                 out_file.write( "%s\n" % interval )
-    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="" )
+        print(skipped( g1, filedesc="" ))
+
 
 if __name__ == "__main__":
     main()