e8a86f15b747412c363679ddefed5df4fd3d7f73 braney Tue Sep 19 16:38:29 2017 -0700 fix a bug in how saved sessions remaps cart variables. Also, make sure priority settings apply to views diff --git src/hg/hgCollection/hgCollection.c src/hg/hgCollection/hgCollection.c index 5aa1300..6201768 100644 --- src/hg/hgCollection/hgCollection.c +++ src/hg/hgCollection/hgCollection.c @@ -477,55 +477,56 @@ if (numTabs == 2) tabs = "\t\t"; if (bigDataUrl == NULL) { if (startsWith("bigWig", tdb->type)) dataUrl = getSqlBigWig(conn, db, tdb); } struct hashCookie cookie = hashFirst(tdb->settingsHash); struct hashEl *hel; fprintf(f, "%strack %s\n",tabs, makeUnique(collectionNameHash, name)); fprintf(f, "%sshortLabel %s\n",tabs, track->shortLabel); fprintf(f, "%slongLabel %s\n",tabs, track->longLabel); while ((hel = hashNext(&cookie)) != NULL) { - if (differentString(hel->name, "parent") && differentString(hel->name, "polished")&& differentString(hel->name, "shortLabel")&& differentString(hel->name, "longLabel")&& differentString(hel->name, "color")&& differentString(hel->name, "visibility")&& differentString(hel->name, "track")&& differentString(hel->name, "trackNames")&& differentString(hel->name, "superTrack")&& differentString(hel->name, "priority")) + if (differentString(hel->name, "parent") && differentString(hel->name, "polished")&& differentString(hel->name, "shortLabel")&& differentString(hel->name, "longLabel")&& differentString(hel->name, "color")&& differentString(hel->name, "visibility")&& differentString(hel->name, "track")&& differentString(hel->name, "trackNames")&& differentString(hel->name, "superTrack")&& differentString(hel->name, "priority")&& differentString(hel->name, "group")) fprintf(f, "%s%s %s\n", tabs,hel->name, (char *)hel->val); } if (bigDataUrl == NULL) { if (dataUrl != NULL) fprintf(f, "%sbigDataUrl %s\n", tabs,dataUrl); } fprintf(f, "%sparent %s\n",tabs,parent); fprintf(f, "%scolor %d,%d,%d\n", tabs,(color >> 16) & 0xff,(color >> 8) & 0xff,color & 0xff); fprintf(f, "%svisibility %s\n",tabs,visibility); fprintf(f, "%spriority %d\n",tabs,priority); fprintf(f, "\n"); } static void outComposite(FILE *f, struct track *collection) // output a composite header for user composite { char *parent = collection->name; char *shortLabel = collection->shortLabel; char *longLabel = collection->longLabel; fprintf(f,"track %s\n\ shortLabel %s\n\ compositeTrack on\n\ aggregate none\n\ +autoScale on\n\ longLabel %s\n\ %s on\n\ color %ld,%ld,%ld \n\ type wig \n\ visibility full\n\n", parent, shortLabel, longLabel, CUSTOM_COMPOSITE_SETTING, 0xff& (collection->color >> 16),0xff& (collection->color >> 8),0xff& (collection->color)); } int snakePalette2[] = { 0x1f77b4, 0xaec7e8, 0xff7f0e, 0xffbb78, 0x2ca02c, 0x98df8a, 0xd62728, 0xff9896, 0x9467bd, 0xc5b0d5, 0x8c564b, 0xc49c94, 0xe377c2, 0xf7b6d2, 0x7f7f7f, 0xc7c7c7, 0xbcbd22, 0xdbdb8d, 0x17becf, 0x9edae5 }; static char *skipColl(char *str) @@ -534,32 +535,33 @@ return &str[5]; return str; } static int outView(FILE *f, struct sqlConnection *conn, char *db, struct track *view, char *parent, struct hash *nameHash, struct hash *collectionNameHash, int priority) // output a view to a trackhub { fprintf(f,"\ttrack %s\n\ \tshortLabel %s\n\ \tlongLabel %s\n\ \tview %s \n\ \tcontainer mathWig\n\ \tautoScale on \n\ \tparent %s \n\ \tcolor %ld,%ld,%ld \n\ +\tpriority %d\n\ \tviewFunc %s \n\ -\tvisibility %s\n", view->name, view->shortLabel, view->longLabel, view->name, parent, 0xff& (view->color >> 16),0xff& (view->color >> 8),0xff& (view->color), view->viewFunc, view->visibility); +\tvisibility %s\n", view->name, view->shortLabel, view->longLabel, view->name, parent, 0xff& (view->color >> 16),0xff& (view->color >> 8),0xff& (view->color), priority++, view->viewFunc, view->visibility); //fprintf(f,"\tequation +\n"); fprintf(f, "\n"); //int useColor = 0; struct track *track = view->trackList; for(; track; track = track->next) { struct trackDb *tdb = hashMustFindVal(nameHash, skipColl(track->name)); outTdb(conn, db, f, skipColl(track->name),tdb, view->name, track->visibility, track->color, track, nameHash, collectionNameHash, 2, priority++); //useColor++; } return priority; }