f0b12c9e7b7a5311f66cce4a76aeac3837003ecd
hiram
  Mon Jul 15 11:31:47 2024 -0700
correctly compare database version numbers refs #33720

diff --git src/hg/hubApi/genomePriority.py src/hg/hubApi/genomePriority.py
index 6279bd4..33de658 100755
--- src/hg/hubApi/genomePriority.py
+++ src/hg/hubApi/genomePriority.py
@@ -428,31 +428,31 @@
     highestVersion = {}	# key is dbDb name without number version extension,
 			# value is the full dbDb name for the highest version
                         # of this dbDb name
     allDbDbNames = {}	# key is the full dbDb name, value is its version
 
     itemCount = 0
     # scanning the dbDb entries, figure out the highest version number
     #    of each name
     for item in dbDb:
         dbDbName = item['name']
         splitMatch = re.match("([a-zA-Z]+)(\d+)", dbDbName)
         if splitMatch:
             allDbDbNames[dbDbName] = splitMatch.group(2)
             itemCount += 1
             if splitMatch.group(1) in versionScan:
-                if splitMatch.group(2) > versionScan[splitMatch.group(1)]:
+                if float(splitMatch.group(2)) > float(versionScan[splitMatch.group(1)]):
                     versionScan[splitMatch.group(1)] = splitMatch.group(2)
                     highestVersion[splitMatch.group(1)] = dbDbName
             else:
                 versionScan[splitMatch.group(1)] = splitMatch.group(2)
                 highestVersion[splitMatch.group(1)] = dbDbName
         else:
             print("### dbDb name does not split: ", dbDbName)
             allDbDbNames[dbDbName] = 0
             itemCount += 1
 
     dbDbLen = len(dbDb)
 
     # second priority are the highest versioned database primates
     # but not homo sapiens since we already have hg38 in topPriorities
     itemCount = 0