2d3028934575643575ea1523ee3a3c0cd9d02430
angie
  Fri Oct 22 14:50:49 2010 -0700
Redmine Feature #1470 (create ability to not have a blat server for anassembly):
1. In hgBlat, if db does not have a blat server, search for an
alternate as hgPcr does: if there's a blat server for the same
organism, use that, otherwise just default to the db with a blat
server & the lowest dbDb.orderKey.  If we default to some other
db's blat server, notify the user.
2. In hgPcr, if we default to some other db's blat server, notify the user.
3. If db doesn't have a blat server, suppress the blat links in the
hot links bar in webStartWrapperDetailedInternal. (hgTracks.c's hot
links already did this).  Our static html hotlinks include Blat and
PCR links, so it is still necessary for hgBlat and hgPcr to handle
db's that don't have blat servers.
4. Also in webStartWrapperDetailedInternal, call getDbAndGenome (part
of uiState construction) *before* we test db for NULL and default
the local db variable to hDefaultDb.  When the defaulting happened
before getDbAndGenome (as in hgVisiGene which passes in NULL db),
db was hDefaultDb for a while and then the cart db, and the hot
links weren't constructed correctly.

diff --git src/hg/hgPcr/hgPcr.c src/hg/hgPcr/hgPcr.c
index e53dc8f..b9e42d2 100644
--- src/hg/hgPcr/hgPcr.c
+++ src/hg/hgPcr/hgPcr.c
@@ -311,8 +311,14 @@
 
 /* If no server for db, change db. */
 if (!gotDb)
+    {
+    if (differentString(db, orgServer->db))
+	printf("<HR><P><EM><B>Note:</B> In-Silico PCR is not available for %s %s; "
+	       "defaulting to %s %s</EM></P><HR>\n",
+	       hGenome(db), hFreezeDate(db), organism, hFreezeDate(orgServer->db));
     *pDb = db = orgServer->db;
 }
+}
 
 void doGetPrimers(char *db, char *organism, struct pcrServer *serverList,
 	char *fPrimer, char *rPrimer, int maxSize, int minPerfect, int minGood,