scripts/last-dotplot
changeset 875 592295375eb1
parent 866 5182d8528ce9
child 877 f5f93e51ef53
     1.1 --- a/scripts/last-dotplot	Thu Jun 15 13:42:42 2017 +0900
     1.2 +++ b/scripts/last-dotplot	Tue Sep 26 14:25:17 2017 +0900
     1.3 @@ -9,6 +9,7 @@
     1.4  # according to the number of aligned nt-pairs within it, but the
     1.5  # result is too faint.  How can this be done better?
     1.6  
     1.7 +import gzip
     1.8  import fnmatch, itertools, optparse, os, re, sys
     1.9  
    1.10  # Try to make PIL/PILLOW work:
    1.11 @@ -18,6 +19,8 @@
    1.12  def myOpen(fileName):  # faster than fileinput
    1.13      if fileName == "-":
    1.14          return sys.stdin
    1.15 +    if fileName.endswith(".gz"):
    1.16 +        return gzip.open(fileName)
    1.17      return open(fileName)
    1.18  
    1.19  def warn(message):