ee1f8e9674b4c647936113dceb0a8113b622c22d
angie
  Mon Jul 28 15:16:21 2014 -0700
David pointed out how confusing it is to see the 'Haplotype sorting order' optionto change the central variant, when haplotype clustering is disabled.  So don't
show the option unless haplotype clustering is enabled.

diff --git src/hg/hgc/vcfClick.c src/hg/hgc/vcfClick.c
index be50782..b611796 100644
--- src/hg/hgc/vcfClick.c
+++ src/hg/hgc/vcfClick.c
@@ -345,36 +345,40 @@
 printf("<B>Name:</B> %s<BR>\n", rec->name);
 // Since these are variants, if it looks like a dbSNP or dbVar ID, provide a link:
 if (regexMatch(rec->name, "^rs[0-9]+$"))
     {
     printf("<B>dbSNP:</B> ");
     printDbSnpRsUrl(rec->name, "%s", rec->name);
     puts("<BR>");
     }
 else if (regexMatch(rec->name, "^[en]ss?v[0-9]+$"))
     {
     printf("<B>dbVar:</B> ");
     printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/dbvar/variants/%s/\" "
 	   "TARGET=_BLANK>%s</A><BR>\n", rec->name, rec->name);
     }
 printCustomUrl(tdb, rec->name, TRUE);
+boolean hapClustEnabled = cartOrTdbBoolean(cart, tdb, VCF_HAP_ENABLED_VAR, TRUE);
+if (hapClustEnabled)
+    {
     static char *formName = "vcfCfgHapCenter";
     printf("<FORM NAME=\"%s\" ACTION=\"%s\">\n", formName, hgTracksName());
     cartSaveSession(cart);
     vcfCfgHaplotypeCenter(cart, tdb, tdb->track, FALSE, rec->file, rec->name,
 			  seqName, rec->chromStart, formName);
     printf("</FORM>\n");
+    }
 char leftBase = rec->alleles[0][0];
 unsigned int vcfStart = vcfRecordTrimIndelLeftBase(rec);
 boolean showLeftBase = (rec->chromStart == vcfStart+1);
 (void)vcfRecordTrimAllelesRight(rec);
 char *displayAls[rec->alleleCount];
 makeDisplayAlleles(rec, showLeftBase, leftBase, 20, TRUE, FALSE, displayAls);
 printPosOnChrom(seqName, rec->chromStart, rec->chromEnd, NULL, FALSE, rec->name);
 printf("<B>Reference allele:</B> %s<BR>\n", displayAls[0]);
 vcfAltAlleleDetails(rec, displayAls);
 vcfQualDetails(rec);
 vcfFilterDetails(rec);
 vcfInfoDetails(rec);
 pgSnpCodingDetail(rec);
 makeDisplayAlleles(rec, showLeftBase, leftBase, 5, FALSE, TRUE, displayAls);
 vcfGenotypesDetails(rec, tdb->track, displayAls);