last-dotplot: fix bug in annotation names limit
authorMartin C. Frith
Fri Jul 31 15:53:49 2020 +0900 (11 days ago)
changeset 10795aaae537a930
parent 1078 579d74b5066f
child 1080 de7890c559b8
last-dotplot: fix bug in annotation names limit
scripts/last-dotplot
     1.1 --- a/scripts/last-dotplot	Fri Jul 31 15:26:58 2020 +0900
     1.2 +++ b/scripts/last-dotplot	Fri Jul 31 15:53:49 2020 +0900
     1.3 @@ -696,8 +696,8 @@
     1.4          else:
     1.5              yield 2000, opts.unbridged_color, seqName, beg, end, ""
     1.6  
     1.7 -def bedBoxes(beds, rangeDict, edge, isTop, bpPerPix, textSizes):
     1.8 -    cover = [(edge, edge)]
     1.9 +def bedBoxes(beds, rangeDict, limit, isTop, bpPerPix, textSizes):
    1.10 +    cover = [(limit, limit)]
    1.11      for layer, color, seqName, bedBeg, bedEnd, name in reversed(beds):
    1.12          for rangeBeg, rangeEnd, isReverseRange, origin in rangeDict[seqName]:
    1.13              beg = max(bedBeg, rangeBeg)
    1.14 @@ -971,9 +971,9 @@
    1.15      rangeDict1 = expandedSeqDict(rangeDict1)
    1.16      rangeDict2 = expandedSeqDict(rangeDict2)
    1.17  
    1.18 -    boxes1 = list(bedBoxes(annots1, rangeDict1, bMarginBeg, True, bpPerPix,
    1.19 +    boxes1 = list(bedBoxes(annots1, rangeDict1, rMarginBeg, True, bpPerPix,
    1.20                             annoTextSizes1))
    1.21 -    boxes2 = list(bedBoxes(annots2, rangeDict2, rMarginBeg, False, bpPerPix,
    1.22 +    boxes2 = list(bedBoxes(annots2, rangeDict2, bMarginBeg, False, bpPerPix,
    1.23                             annoTextSizes2))
    1.24      boxes = sorted(itertools.chain(boxes1, boxes2))
    1.25