ed9b1b634b3a82da19b321b50dcba73c9889843c
angie
  Fri Sep 19 11:21:01 2014 -0700
Use vcfGenotype's isHaploid field instead of comparing chrom to chrY (that was messing up display of ebola which is haploid).
diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c
index 07203bb9..a6d41d5 100644
--- src/hg/hgTracks/vcfTrack.c
+++ src/hg/hgTracks/vcfTrack.c
@@ -516,50 +516,53 @@
     }
 }
 
 INLINE void gtSummaryString(struct vcfRecord *rec, struct dyString *dy)
 // Make pgSnp-like mouseover text, but with genotype counts instead of allele counts.
 {
 if (isNotEmpty(rec->name) && !sameString(rec->name, "."))
     dyStringPrintf(dy, "%s: ", rec->name);
 if (rec->alleleCount < 2)
     {
     dyStringAppendC(dy, '?');
     return;
     }
 const struct vcfFile *vcff = rec->file;
 int gtRefRefCount = 0, gtRefAltCount = 0, gtAltAltCount = 0, gtUnkCount = 0, gtOtherCount = 0;
+boolean allHaploid = TRUE;
 int i;
 for (i=0;  i < vcff->genotypeCount;  i++)
     {
     struct vcfGenotype *gt = &(rec->genotypes[i]);
+    if (! gt->isHaploid)
+        allHaploid = FALSE;
     if (gt->hapIxA == 0 && gt->hapIxB == 0)
 	gtRefRefCount++;
     else if (gt->hapIxA == 1 && gt->hapIxB == 1)
 	gtAltAltCount++;
     else if ((gt->hapIxA == 0 && gt->hapIxB == 1) || (gt->hapIxA == 1 && gt->hapIxB == 0))
 	gtRefAltCount++;
     else if (gt->hapIxA < 0 || gt->hapIxB < 0)
 	gtUnkCount++;
     else
 	gtOtherCount++;
     }
 char refAl[16];
 abbrevAndHandleRC(refAl, sizeof(refAl), rec->alleles[0]);
 char altAl1[16];
 abbrevAndHandleRC(altAl1, sizeof(altAl1), rec->alleles[1]);
-if (sameString(chromName, "chrY"))
+if (allHaploid)
     dyStringPrintf(dy, "%s:%d %s:%d",
 		   refAl, gtRefRefCount, altAl1, gtRefAltCount);
 else
     dyStringPrintf(dy, "%s/%s:%d %s/%s:%d %s/%s:%d", refAl, refAl, gtRefRefCount,
 		   refAl, altAl1, gtRefAltCount, altAl1, altAl1, gtAltAltCount);
 if (gtUnkCount > 0)
     dyStringPrintf(dy, " unknown:%d", gtUnkCount);
 if (gtOtherCount > 0)
     dyStringPrintf(dy, " other:%d", gtOtherCount);
 }
 
 void mapBoxForCenterVariant(struct vcfRecord *rec, struct hvGfx *hvg, struct track *tg,
 			    int xOff, int yOff, int width)
 /* Special mouseover for center variant */
 {