06620d160679a0d2e77dedbe35b35edeea08c517 chmalee Mon Jun 3 16:17:48 2019 -0700 Add checks to hubCheck and hgTrackUi for incorrect tag=val pairs in a subgroup line, refs #13428 diff --git src/hg/inc/hui.h src/hg/inc/hui.h index b065993..9960286 100644 --- src/hg/inc/hui.h +++ src/hg/inc/hui.h @@ -985,42 +985,69 @@ /* If metadata from metaTbl exists, create a link that will allow toggling it's display */ boolean superTrackDropDownWithExtra(struct cart *cart, struct trackDb *tdb, int visibleChild, struct slPair *events); /* Displays hide/show dropdown for supertrack. * Set visibleChild to indicate whether 'show' should be grayed * out to indicate that no supertrack members are visible: * 0 to gray out (no visible children) * 1 don't gray out (there are visible children) * -1 don't know (this function should determine) * If -1,i the subtracks field must be populated with the child trackDbs. * Returns false if not a supertrack */ #define superTrackDropDown(cart,tdb,visibleChild) \ superTrackDropDownWithExtra(cart,tdb,visibleChild,NULL) +typedef struct _dimensions + { + int count; + char**names; + char**subgroups; + char* setting; + } dimensions_t; + boolean dimensionsExist(struct trackDb *parentTdb); /* Does this parent track contain dimensions? */ typedef struct _membership { int count; char **subgroups; // Ary of Tags in parentTdb->subGroupN and in childTdb->subGroups (ie view) char **membership; // Ary of Tags of subGroups that child belongs to (ie PK) char **titles; // Ary of Titles of subGroups a child belongs to (ie Peak) char * setting; } membership_t; +typedef struct _membersForAll + { + int abcCount; + int dimMax; // Arrays of "members" structs will be ordered as + // [view][dimX][dimY][dimA]... with first 3 in fixed spots + // and rest as found (and non-empty) + boolean filters; // ABCs use filterComp boxes (as upposed to check boxes + dimensions_t *dimensions; // One struct describing "deimensions" setting" + // (e.g. dimX:cell dimY:antibody dimA:treatment) + members_t* members[27]; // One struct for each dimension describing groups in dimension + // (e.g. cell: GM12878,K562) + char* checkedTags[27]; // FIXME: Should move checkedTags into + // membersForAll->members[ix]->selected; + char letters[27]; + } membersForAll_t; + +membersForAll_t* membersForAllSubGroupsGet(struct trackDb *parentTdb, struct cart *cart); +// Returns all the parents subGroups and members + membership_t *subgroupMembershipGet(struct trackDb *childTdb); /* gets all the subgroup membership for a child track */ int subgroupCount(struct trackDb *parentTdb); /* How many subGroup setting does this parent have? */ char * subgroupSettingByTagOrName(struct trackDb *parentTdb, char *groupNameOrTag); /* look for a subGroup by name (ie subGroup1) or tag (ie view) and return an unallocated char* */ boolean subgroupingExists(struct trackDb *parentTdb, char *groupNameOrTag); /* Does this parent track contain a particular subgrouping? */ boolean subgroupFind(struct trackDb *childTrack, char *name,char **value); /* looks for a single tag in a childTrack's subGroups setting */