c2c780666cf30f764fe4eb81b7fad350b0a7391a
kate
  Thu Mar 8 15:56:39 2018 -0800
Add trackDb setting to indicate if there is a direction to the interaction (interactDirectional). refs #17512

diff --git src/hg/lib/trackHub.c src/hg/lib/trackHub.c
index 06ac8ef..972740a 100644
--- src/hg/lib/trackHub.c
+++ src/hg/lib/trackHub.c
@@ -36,30 +36,31 @@
 #include "hdb.h"
 #include "chromInfo.h"
 #include "grp.h"
 #include "twoBit.h"
 #include "dbDb.h"
 #include "net.h"
 #include "bbiFile.h"
 #include "bPlusTree.h"
 #include "hgFind.h"
 #include "hubConnect.h"
 #include "trix.h"
 #include "vcf.h"
 #include "htmshell.h"
 #include "bigBedFind.h"
 #include "customComposite.h"
+#include "interactUi.h"
 
 static struct hash *hubCladeHash;  // mapping of clade name to hub pointer
 static struct hash *hubAssemblyHash; // mapping of assembly name to genome struct
 static struct hash *hubOrgHash;   // mapping from organism name to hub pointer
 static struct trackHub *globalAssemblyHubList; // list of trackHubs in the user's cart
 static struct hash *trackHubHash;
 
 char *trackHubRelativeUrl(char *hubUrl, char *path)
 /* Return full path (in URL form if it's a remote hub) given
  * path possibly relative to hubUrl. Do a freeMem of result
  * when done. */
 {
 /* If path itself is a URL then just return a copy of it. */
 if (hasProtocol(path))
     return cloneString(path);
@@ -824,30 +825,33 @@
                   startsWithWord("bigNarrowPeak", type) ||
                   startsWithWord("bigChain", type) ||
                   startsWithWord("bigBarChart", type) ||
                   startsWithWord("bigInteract", type) ||
                   startsWithWord("bam", type)))
                     {
                     errAbort("Unsupported type '%s' in hub %s genome %s track %s", type,
                         hub->url, genome->name, tdb->track);
                     }
                 requiredSetting(hub, genome, tdb, "bigDataUrl");
                 }
             }
 
         if (sameString("barChart", type) || sameString("bigBarChart", type))
             requireBarChartBars(hub, genome, tdb);
+        // TODO: Consider removing requirement for this (default to no direction)
+        if (sameString("interact", type) || sameString("bigInteract", type))
+            requiredSetting(hub, genome, tdb, INTERACT_DIRECTIONAL);
         }
     }
 }
 
 static void markContainers( struct trackHub *hub, 
     struct trackHubGenome *genome, struct trackDb *tdbList)
 /* Mark containers that are parents, or have them. */
 {
 struct hash *hash = hashNew(0);
 struct trackDb *tdb;
 
 // add all the track names to a hash
 for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
     {
     if (hashLookup(hash, tdb->track))