7394a1ece57186bb619c6baa9a501fe960f18c59
angie
  Mon Jun 17 16:49:44 2013 -0700
Last-minute bugfixes and wording tweaks.  refs #6152
diff --git src/hg/hgVai/hgVai.c src/hg/hgVai/hgVai.c
index 7504d90..779a76b 100644
--- src/hg/hgVai/hgVai.c
+++ src/hg/hgVai/hgVai.c
@@ -234,34 +234,36 @@
 //#*** ------------------ end verbatim ---------------
 
 printf("<div class='sectionLiteHeader noReorderRemove'>"
        "Select Genome Assembly and Region</div>\n");
 
 /* Print clade, genome and assembly line. */
 hgGatewayCladeGenomeDb();
 
 //#*** No longer ending form here...
 }
 
 void askUserForVariantCustomTrack()
 /* Tell the user that we need a custom track of variants to work on. */
 {
 puts("<BR>");
-printf("<div class='sectionLiteHeader'>Upload Variants as Custom Track</div>\n");
-printf("Please create a custom track containing your variants of interest, using either "
+printf("<div class='sectionLiteHeader'>Upload Variants</div>\n");
+printf("Please provide a set of variant calls to annotate, as either a custom track in "
        "<A HREF='../FAQ/FAQformat.html#format10' TARGET=_BLANK>pgSnp</A> or "
-       "<A HREF='../goldenPath/help/vcf.html' TARGET=_BLANK>VCF</A> format:<BR>\n");
+       "<A HREF='../goldenPath/help/vcf.html' TARGET=_BLANK>VCF</A> format, "
+       "or a VCF track on your "
+       "<A HREF='../goldenPath/help/hgTrackHubHelp.html' TARGET=_BLANK>track hub</A>:<BR>\n");
 printCtAndHubButtons();
 puts("<BR>");
 }
 
 typedef boolean TdbFilterFunction(struct trackDb *tdb, void *filterData);
 /* Return TRUE if tdb passes filter criteria. */
 
 void rFilterTrackList(struct trackDb *trackList, struct slRef **pPassingRefs,
 		      TdbFilterFunction *filterFunc, void *filterData)
 /* Recursively apply filterFunc and filterData to all tracks in fullTrackList and
  * their subtracks. Add an slRef to pPassingRefs for each track/subtrack that passes.
  * Caller should slReverse(pPassingRefs) when recursion is all done. */
 {
 struct trackDb *tdb;
 for (tdb = trackList;  tdb != NULL;  tdb = tdb->next)
@@ -307,34 +309,34 @@
     *retGroupRefList = groupRefList;
     }
 }
 
 boolean isVariantCustomTrack(struct trackDb *tdb, void *filterData)
 /* This is a TdbFilterFunction to get custom or hub tracks with type pgSnp or vcfTabix. */
 {
 return ((sameString(tdb->grp, "user") || isHubTrack(tdb->track)) &&
 	(sameString(tdb->type, "pgSnp") || sameString(tdb->type, "vcfTabix")));
 }
 
 void selectVariants(struct slRef *varGroupList, struct slRef *varTrackList)
 /* Offer selection of user's variant custom tracks. */
 {
 printf("<div class='sectionLiteHeader'>Select Variants</div>\n");
-printf("If you have more than one custom track in "
+printf("If you have more than one custom track or hub track in "
        "<A HREF='../FAQ/FAQformat.html#format10' TARGET=_BLANK>pgSnp</A> or "
        "<A HREF='../goldenPath/help/vcf.html' TARGET=_BLANK>VCF</A> format, "
-       "please select the one you wish to annotate.<BR>\n");
+       "please select the one you wish to annotate:<BR>\n");
 printf("<B>variants: </B>");
 printf("<SELECT ID='hgva_variantTrack' NAME='hgva_variantTrack'>\n");
 char *selected = cartUsualString(cart, "hgva_variantTrack", "");
 struct slRef *ref;
 for (ref = varTrackList;  ref != NULL;  ref = ref->next)
     {
     struct trackDb *tdb = ref->val;
     printOption(tdb->track, selected, tdb->longLabel);
     }
 printf("</SELECT><BR>\n");
 printf("<B>maximum number of variants to be processed:</B>\n");
 char *curLimit = cartUsualString(cart, "hgva_variantLimit", "10000");
 char *limitLabels[] = { "10", "100", "1,000", "10,000", "100,000" };
 char *limitValues[] = { "10", "100", "1000", "10000", "100000" };
 cgiMakeDropListWithVals("hgva_variantLimit", limitLabels, limitValues, ArraySize(limitLabels),
@@ -657,37 +659,38 @@
 printf("exon of non-coding gene<BR>\n");
 puts("<BR>");
 endCollapsibleSection();
 }
 
 void selectFiltersKnownVar()
 /* Options to restrict output based on overlap with known variants. */
 {
 boolean gotCommon = findSnpBed4("Common", NULL, NULL);
 boolean gotMult = findSnpBed4("Mult", NULL, NULL);
 if (!gotCommon && !gotMult)
     return;
 startCollapsibleSection("filtersVar", "Known variation", FALSE);
 if (gotMult)
     {
-    cartMakeCheckBox(cart, "hgva_exclude_snpMult", FALSE);
-    printf("Exclude variants mapped to multiple genomic locations by dbSNP<BR>\n");
+    cartMakeCheckBox(cart, "hgva_include_snpMult", TRUE);
+    printf("Include variants even if they are co-located with variants that have been mapped to "
+	   "multiple genomic locations by dbSNP<BR>\n");
     }
 if (gotCommon)
     {
-    cartMakeCheckBox(cart, "hgva_exclude_snpCommon", FALSE);
-    printf("Exclude \"common\" variants "
+    cartMakeCheckBox(cart, "hgva_include_snpCommon", TRUE);
+    printf("Include variants even if they are co-located with \"common\" variants "
 	   "(uniquely mapped variants with global minor allele frequency (MAF) "
 	   "of at least 1%% according to dbSNP)<BR>\n");
     }
 puts("<BR>");
 endCollapsibleSection();
 }
 
 void selectFiltersCons()
 /* Options to restrict output based on overlap with conserved elements. */
 {
 struct slRef *elTrackRefList = NULL;
 tdbFilterGroupTrack(fullTrackList, fullGroupList, isConsElTrack, NULL, NULL, &elTrackRefList);
 if (elTrackRefList == NULL)
     return;
 startCollapsibleSection("filtersCons", "Conservation", FALSE);
@@ -733,31 +736,31 @@
 puts("</TABLE>");
 }
 
 void selectOutput()
 /* Just VEP text for now... should also have VEP HTML with limited # lines too.
  * Next: custom track with same subset of info as we would stuff in VEP */
 {
 puts("<BR>");
 printf("<div class='sectionLiteHeader'>Configure Output</div>\n");
 printf("<B>output format: </B>");
 char *selected = cartUsualString(cart, "hgva_outFormat", "vepTab");
 printf("<SELECT ID='hgva_outFormat' NAME='hgva_outFormat'>\n");
 printOption("vepTab", selected, "Variant Effect Predictor (tab-separated text)");
 printOption("vepHtml", selected, "Variant Effect Predictor (HTML)");
 printf("</SELECT><BR>\n");
-char *compressType = cartUsualString(cart, "hgva_compressType", textOutCompressGzip);
+char *compressType = cartUsualString(cart, "hgva_compressType", textOutCompressNone);
 char *fileName = cartUsualString(cart, "hgva_outFile", "");
 printf("<B>output file:</B>&nbsp;");
 cgiMakeTextVar("hgva_outFile", fileName, 29);
 printf("&nbsp;(leave blank to keep output in browser)<BR>\n");
 printf("<B>file type returned:&nbsp;</B>");
 cgiMakeRadioButton("hgva_compressType", textOutCompressNone,
 		   sameWord(textOutCompressNone, compressType));
 printf("&nbsp;plain text&nbsp&nbsp");
 cgiMakeRadioButton("hgva_compressType", textOutCompressGzip,
 		   sameWord(textOutCompressGzip, compressType));
 printf("&nbsp;gzip compressed (ignored if output file is blank)");
 puts("<BR>");
 }
 
 void submitAndDisclaimer()
@@ -1087,38 +1090,38 @@
 		if (asColumnFind(grator->streamer.asObj, "name") != NULL)
 		    column = "name";
 	    description = tdb->longLabel;
 	    }
 	}
     updateGratorListAndVepExtra(grator, pGratorList, vepOut, subset, column, description);
     if (grator != NULL)
 	hashAdd(gratorsByName, trackName, grator);
     }
 }
 
 void addFilterTracks(struct annoGrator **pGratorList, struct hash *gratorsByName,
 		     struct annoAssembly *assembly, char *chrom)
 // Add grators for filters (not added to vepOut):
 {
-if (cartUsualBoolean(cart, "hgva_exclude_snpCommon", FALSE))
+if (!cartUsualBoolean(cart, "hgva_include_snpCommon", TRUE))
     {
     struct annoGrator *grator = gratorForSnpBed4(gratorsByName, "Common", assembly, chrom,
 						 agoMustNotOverlap, NULL);
     updateGratorList(grator, pGratorList);
     }
 
-if (cartUsualBoolean(cart, "hgva_exclude_snpMult", FALSE))
+if (!cartUsualBoolean(cart, "hgva_include_snpMult", TRUE))
     {
     struct annoGrator *grator = gratorForSnpBed4(gratorsByName, "Mult", assembly, chrom,
 						 agoMustNotOverlap, NULL);
     updateGratorList(grator, pGratorList);
     }
 
 if (cartUsualBoolean(cart, "hgva_require_consEl", FALSE))
     {
     char *consElTrack = cartString(cart, "hgva_require_consEl_track");
     struct annoGrator *grator = hashFindVal(gratorsByName, consElTrack);
     if (grator == NULL)
 	{
 	struct trackDb *tdb = tdbForTrack(database, consElTrack, &fullTrackList);
 	if (tdb != NULL)
 	    grator = gratorFromTrackDb(assembly, tdb->table, tdb, chrom, NO_MAXROWS, NULL,