483716a7cd43a3c24c9b3273206f37021fe3f2d7
kent
  Tue Jan 11 17:58:48 2011 -0800
Adding hub support to hgc.
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index c88887b..0aab507 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -84,30 +84,32 @@
 #include "cnpSebat2.h"
 #include "cnpSharp.h"
 #include "cnpSharp2.h"
 #include "delHinds2.h"
 #include "delConrad2.h"
 #include "dgv.h"
 #include "tokenizer.h"
 #include "softberryHom.h"
 #include "borkPseudoHom.h"
 #include "sanger22extra.h"
 #include "refLink.h"
 #include "hgConfig.h"
 #include "estPair.h"
 #include "softPromoter.h"
 #include "customTrack.h"
+#include "trackHub.h"
+#include "hubConnect.h"
 #include "sage.h"
 #include "sageExp.h"
 #include "pslWScore.h"
 #include "lfs.h"
 #include "mcnBreakpoints.h"
 #include "fishClones.h"
 #include "featureBits.h"
 #include "web.h"
 #include "dbDb.h"
 #include "jaxOrtholog.h"
 #include "dnaProbe.h"
 #include "ancientRref.h"
 #include "jointalign.h"
 #include "gcPercent.h"
 #include "genMapDb.h"
@@ -22726,30 +22728,34 @@
 
 struct customTrack *ct = NULL;
 if (isCustomTrack(track))
     {
     struct customTrack *ctList = getCtList();
     for (ct = ctList; ct != NULL; ct = ct->next)
 	if (sameString(track, ct->tdb->track))
 	    break;
     }
 
 if ((!isCustomTrack(track) && dbIsFound)  ||
 	((ct!= NULL) && (ct->dbTrackType != NULL) &&
 	    sameString(ct->dbTrackType, "maf")))
     {
     trackHash = makeTrackHashWithComposites(database, seqName, TRUE);
+    if (isHubTrack(track))
+	{
+	hubConnectAddHubForTrackAndFindTdb(database, track, NULL, trackHash);
+	}
     if (parentWigMaf)
         {
         int wordCount, i;
         char *words[16];
         char *typeLine;
         char *wigType = needMem(128);
         tdb = hashFindVal(trackHash, parentWigMaf);
         if (!tdb)
             errAbort("can not find trackDb entry for parentWigMaf track %s.",
                     parentWigMaf);
         typeLine = cloneString(tdb->type);
         wordCount = chopLine(typeLine, words);
         if (wordCount < 1)
          errAbort("trackDb entry for parentWigMaf track %s has corrupt type line.",
                     parentWigMaf);