a30c400ad09e9ae41fbbf7636deed814a86e1edd
braney
  Thu Jul 28 17:34:22 2022 -0700
Build hub and genome stanzas for curated hubs from dbDb.   Don't show
curated assemblies as hubs on hgGateway or hgHubConnect.

diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js
index a942dfb..a83eeac 100644
--- src/hg/js/hgGateway.js
+++ src/hg/js/hgGateway.js
@@ -293,45 +293,52 @@
         var text = svgCreateEl('text', { x: cfg.labelRightX, y: y,
                                          textContent: label,
                                          id: 'textEl_' + hub.name,
                                          name: 'textEl_' + hub.name,
                                          title: hub.longLabel
 				     });
 	text.onclick = function() {hgGateway.onClickHubName(hub.hubUrl, hub.taxId, hub.defaultDb, hub.name);};
         svg.appendChild(text);
     }
 
     function drawHubs(svg, hubList, yIn) {
         // Add a label for each hub in hubList, with a separator line below and
         // "Hub Genomes" link instead of a tree.
         var y = yIn;
         var hub, i, textX, textY, lineX1, lineY, lineX2;
+        var countNonCurated = 0;
         if (hubList && hubList.length) {
             for (i = 0;  i < hubList.length;  i++) {
                 hub = hubList[i];
+                // is this a curated assembly hub? If so, don't list it
+                if (!hub.hubUrl.startsWith("/gbdb")) {
                     addHubLabel(svg, hub, y);
                     y += cfg.labelLineHeight;
+                    countNonCurated++;
                 }
+            }
+            if (countNonCurated) {
                 textX = cfg.labelRightX + cfg.speciesLineOffsetX;
                 textY = (yIn + y - cfg.labelLineHeight) / 2;
                 addTrackHubsLink(svg, textX, textY);
                 lineX1 = cfg.hubLineOffset;
                 lineY = y - cfg.halfTextHeight;
                 lineX2 = cfg.containerWidth - cfg.speciesLineOffsetX;
                 addLine(svg, lineX1, lineY, lineX2, lineY);
                 y += cfg.labelLineHeight;
             }
+        }
         return y;
     }
 
     function draw(svg, dbDbTree, hubList, cfgOverrides) {
         // dbDbTree is the root node of a phylogenetic tree that we render in svg.
         // cfgOverrides should be used to provide (names of) meaningful onclick functions
         // and track hub URL.
         // Return the width and height of the tree, the top offset of the tree (below hubs
         // if any), and an object with the top coords of each label/leaf.
         // Instead of tacking a bunch of children directly onto svg, make a <g> (group)
         // and append that to svg when done.
         // First see if there's already something there that we will replace:
         var oldG = svg.getElementById('hubsAndTree');
         var newG = svgCreateEl('g', { id: 'hubsAndTree' });
         // y offsets of tops of species labels (leaves of dbDbTree), filled in by drawNode.