示例#1
0
static void rPolish(struct trackDb *tdbList)
/* Call polisher on list and all children of list. */
{
struct trackDb *tdb;
for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
    {
    trackDbPolish(tdb);
    rPolish(tdb->subtracks);
    }
}
示例#2
0
static void polishSupers(struct trackDb *tdbList)
/* Run polish on supertracks. */
{
struct trackDb *tdb;
for (tdb = tdbList; tdb != NULL; tdb = tdb->next)
    {
    struct trackDb *parent = tdb->parent;
    if (parent != NULL)
	{
	trackDbFieldsFromSettings(parent);
	trackDbPolish(parent);
	}
    }
}
示例#3
0
文件: wikiTrack.c 项目: bowhan/kent
void addWikiTrack(struct track **pGroupList)
/* Add wiki track and append to group list. */
{
if (wikiTrackEnabled(database, NULL))
    {
    struct track *tg = trackNew();
    static char longLabel[80];
    struct trackDb *tdb;
    struct sqlConnection *wikiConn = wikiConnect();
    if (! sqlTableExists(wikiConn,WIKI_TRACK_TABLE))
	errAbort("loadWikiTrack configuration error, set wikiTrack.URL in hg.conf");

    linkedFeaturesMethods(tg);
    AllocVar(tdb);
    tg->track = WIKI_TRACK_TABLE;
    tg->table = WIKI_TRACK_TABLE;
    tg->canPack = TRUE;
    tg->visibility = tvHide;
    tg->hasUi = TRUE;
    tg->shortLabel = cloneString(WIKI_TRACK_LABEL);
    safef(longLabel, sizeof(longLabel), WIKI_TRACK_LONGLABEL);
    tg->longLabel = longLabel;
    tg->loadItems = wikiTrackLoadItems;
    tg->itemName = linkedFeaturesName;
    tg->mapItemName = wikiTrackMapItemName;
    tg->mapItem = wikiTrackMapItem;
    tg->priority = WIKI_TRACK_PRIORITY;
    tg->defaultPriority = WIKI_TRACK_PRIORITY;
    tg->groupName = cloneString("map");
    tg->defaultGroupName = cloneString("map");
    tg->exonArrows = TRUE;
    tg->nextItemButtonable = TRUE;
    tdb->track = cloneString(tg->track);
    tdb->canPack = tg->canPack;
    tdb->table = cloneString(tg->table);
    tdb->shortLabel = cloneString(tg->shortLabel);
    tdb->longLabel = cloneString(tg->longLabel);
    tdb->useScore = 1;
    tdb->grp = cloneString(tg->groupName);
    tdb->priority = tg->priority;
    trackDbPolish(tdb);
    tg->tdb = tdb;

    slAddHead(pGroupList, tg);
    wikiDisconnect(&wikiConn);
    }
}