e92495a7ffb311c5b7b4dd8d9520bac66e25dfc0
angie
Thu Jan 24 11:45:39 2013 -0800
Feature #6152 (Variant Annotation Integrator): remove an asObj tweak that was causing pgSnp load problem in annoGratorGpVar.Also get the trackDb for the selected subtrack, which is not the behavior of trackDbForTrack -- it returns composite tdb.
Implement "mustOverlap" grator behavior.
diff --git src/hg/lib/hdb.c src/hg/lib/hdb.c
index fc6fe7d..096cd0d 100644
--- src/hg/lib/hdb.c
+++ src/hg/lib/hdb.c
@@ -3649,30 +3649,37 @@
/* Look "to the sky" in parents of root generation as well. */
if (level == 0)
{
for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
{
struct trackDb *p = tdb->parent;
if (p != NULL && sameString(track, p->track))
return p;
}
}
return NULL;
}
+struct trackDb *findSubtrackByName(struct trackDb *ancestorTdb, char *track)
+/* Given a tdb for a composite, return the subtrack tdb for track or NULL. */
+{
+// start at level 1 instead of 0, to avoid getting ancestor of track back again.
+return rFindTrack(1, ancestorTdb, track);
+}
+
#ifdef DEBUG
static void dumpFlagStatus(struct trackDb *tdbList, char *tableName, char *label)
/* Look for tdbList for track matching tableName. Print out info on it starting with label. */
{
struct trackDb *tdb = rFindTrack(0, tdbList, tableName);
if (tdb == NULL)
printf("%s: nil
\n", label);
else
printf("%s: treeNodeType %d, composite? %d, supertrack ? %d
\n", label, tdb->treeNodeType, COMPOSITE_NODE(tdb->treeNodeType), SUPERTRACK_NODE(tdb->treeNodeType));
}
#endif /* DEBUG */
static void addChildRefsToParents(struct trackDb *tdbList)
/* Go through tdbList and set up the ->children field in parents with references
* to their children. */