use the compression handling auto-opener for our eland files
authorDiane Trout <diane@caltech.edu>
Fri, 13 Feb 2009 01:42:06 +0000 (01:42 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 13 Feb 2009 01:42:06 +0000 (01:42 +0000)
scripts/makebed

index 64ba518b1a91e54812938dce8fb813a51e38bf93..577b86891f098ab5c7cfeb6e2b4139814f1731a5 100755 (executable)
@@ -3,6 +3,7 @@ import optparse
 import sys
 import os
 
+from htsworkflow.util.opener import autoopen
 from htsworkflow.util.makebed import make_bed_from_eland_stream, make_bed_from_multi_eland_stream, make_description
 
 def make_parser():
@@ -61,7 +62,7 @@ def main(command_line=None):
   if options.inname == '-':
     instream = sys.stdin
   elif os.path.exists(options.inname):
-    instream = open(options.inname, 'r')
+    instream = autoopen(options.inname, 'r')
   else:
     parser.error('%s was not found' % (options.inname))
     return 1