diff gops_complement.py @ 4:38c8bb402872 draft

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:40:33 -0400
parents e0a23ab32d7f
children
line wrap: on
line diff
--- a/gops_complement.py	Wed Nov 11 12:47:38 2015 -0500
+++ b/gops_complement.py	Thu Jun 22 18:40:33 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()