e58c87b6e9293ba9223e29cae4d21967b3d526a6
braney
  Mon Jun 23 12:42:40 2014 -0700
some changes in how a missing assembly hub database is announced.
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index 32ebc1d..076645c 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -2531,30 +2531,36 @@
 {
 struct sqlConnection *conn = hConnectCentral();
 boolean gotClade = hGotCladeConn(conn);
 hDisconnectCentral(&conn);
 return gotClade;
 }
 
 char *hClade(char *genome)
 /* If central database has clade tables, return the clade for the
  * given genome; otherwise return NULL. */
 {
 char *clade;
 if ((clade = trackHubAssemblyClade(genome)) != NULL)
     return clade;
 
+if (isHubTrack(genome))
+    {
+    warn("Current genome '%s' is supported by a hub that is no longer connected. Switching to default database.", trackHubSkipHubName(genome));
+    return cloneString("other");
+    }
+
 struct sqlConnection *conn = hConnectCentral();
 if (hGotCladeConn(conn))
     {
     char query[512];
     sqlSafef(query, sizeof(query),
 	  "select clade from genomeClade where genome = '%s'", genome);
     clade = sqlQuickString(conn, query);
     hDisconnectCentral(&conn);
     if (clade == NULL)
 	{
 	warn("Warning: central database genomeClade doesn't contain "
 	     "genome \"%s\"", genome);
 	return cloneString("other");
 	}
     else