68bec7571e8307853f5e9193503f8561a5eb4310
chmalee
  Mon Jun 22 17:14:18 2020 -0700
Adding hub support for vcfPhasedTrio track type, refs #18846

diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c
index a6d3b67..0b44455 100644
--- src/hg/hgTracks/vcfTrack.c
+++ src/hg/hgTracks/vcfTrack.c
@@ -2032,34 +2032,35 @@
 
 for (name = sampleNames, i = 0; name != NULL; name = name->next, i++)
     {
     y1 = yOff + yHap1 + (i * sampleHeight);
     y2 = yOff + yHap2 + (i * sampleHeight);
     retYOffsets[2*i] = y1;
     retYOffsets[(2*i) + 1] = y2;
     // make the background of every other lane light yellow, but only when NOT doing PDF/EPS output
     if ((hvg->pixelBased && i & 1))
         {
         hvGfxBox(hvg, xOff, y1-(track->lineHeight), width, (y2 + track->lineHeight) - (y1-track->lineHeight), transYellow);
         }
     hvGfxLine(hvg, xOff, y1, xOff+width, y1, MG_BLACK);
     hvGfxLine(hvg, xOff, y2, xOff+width, y2, MG_BLACK);
     struct dyString *label = dyStringNew(0);
+    boolean hasAlias = isNotEmpty((char *)name->val);
     dyStringPrintf(label, "%s%s%s",
         useDefaultLabel ? name->name : "",
-        useDefaultLabel && useAliasLabel ? "/" : "",
-        useAliasLabel ? (char *)name->val : "");
+        useDefaultLabel && useAliasLabel && hasAlias ? "/" : "",
+        useAliasLabel && hasAlias ? (char *)name->val : "");
     vcfPhasedAddLabel(track, hvg, label->string, yOff, round(((y1 + y2) / 2) - (track->lineHeight / 2)), font, MG_BLACK);
     }
 }
 
 static void vcfPhasedDrawItems(struct track *track, int seqStart, int seqEnd,
 			      struct hvGfx *hvg, int xOff, int yOff, int width,
 			      MgFont *font, Color color, enum trackVisibility vis)
 /* Split samples' chromosomes (haplotypes), cluster them by parents, and
  * draw them all along a line representing each chromosome*/
 {
 struct vcfFile *vcff = track->extraUiData;
 if (vcff->records == NULL)
     return;
 
 const double scale = scaleForPixels(width);