scripts/last-dotplot
changeset 926 bc08832db1a1
parent 925 e1861f956f60
child 937 8a4fadbe6080
     1.1 --- a/scripts/last-dotplot	Mon Mar 05 12:06:48 2018 +0900
     1.2 +++ b/scripts/last-dotplot	Mon Mar 05 17:43:20 2018 +0900
     1.3 @@ -479,7 +479,7 @@
     1.4      if isReverseStrand:
     1.5          beg = -(beg + size)
     1.6      for rangeBeg, rangeEnd, isReverseRange, origin in ranges:
     1.7 -        if rangeEnd > beg:
     1.8 +        if rangeEnd > beg:  # assumes the ranges are sorted
     1.9              return (isReverseStrand != isReverseRange), origin
    1.10  
    1.11  def alignmentPixels(width, height, alignments, bp_per_pix,
    1.12 @@ -698,7 +698,7 @@
    1.13  def rangesPerSeq(sortedRanges, rangePixBegs, rangePixLens, bpPerPix):
    1.14      a = rangesWithOrigins(sortedRanges, rangePixBegs, rangePixLens, bpPerPix)
    1.15      for k, v in itertools.groupby(a, itemgetter(0)):
    1.16 -        yield k, [i[1] for i in v]
    1.17 +        yield k, sorted(i[1] for i in v)
    1.18  
    1.19  def getFont(opts):
    1.20      if opts.fontfile: