Source

bx-python / lib / bx / align / _epo.pyx

Diff from to

lib/bx/align/_epo.pyx

 
 
-import logging
+import logging, gzip
 from collections import namedtuple
 import numpy
 cimport numpy
 
 def fastLoadChain(fname, hf):
     data = []
-    with open(fname) as fd:
+    open_f = (fname.endswith(".gz") and gzip.open or open)
+    with open_f(fname) as fd:
         while True:
             line = fd.readline()
             if line == "":