scripts/last-dotplot
changeset 861 a75b439f0cf2
parent 860 6e8ff424ce2b
child 863 6a4915d5b5cb
     1.1 --- a/scripts/last-dotplot	Thu May 18 14:23:58 2017 +0900
     1.2 +++ b/scripts/last-dotplot	Thu May 18 14:46:45 2017 +0900
     1.3 @@ -276,11 +276,13 @@
     1.4  
     1.5  def expandedSeqDict(seqDict):
     1.6      '''Allow lookup by short sequence names, e.g. chr7 as well as hg19.chr7.'''
     1.7 -    newDict = {}
     1.8 +    newDict = seqDict.copy()
     1.9      for name, x in seqDict.items():
    1.10 -        base = name.split(".")[-1]
    1.11 -        newDict[name] = x
    1.12 -        newDict[base] = x
    1.13 +        if "." in name:
    1.14 +            base = name.split(".")[-1]
    1.15 +            if base in newDict:  # an ambiguous case was found:
    1.16 +                return seqDict   # so give up completely
    1.17 +            newDict[base] = x
    1.18      return newDict
    1.19  
    1.20  def readBed(fileName, seqLimits):