80ab15c036bf35894b59df383c03c51cbeff30be chmalee Thu May 14 10:29:53 2026 -0700 Stop myVariants from clobbering regular custom tracks by giving it its own cart variable (mvCtfile_) instead of overloading ctfile_, refs #37553 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index d366fad0368..3d74acb19fa 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -6821,42 +6821,40 @@ tg->hasUi = TRUE; tg->customTrack = TRUE;// Explicitly declare this a custom track for flatTrack ordering freez(&typeDupe); return tg; } char *getPositionFromCustomTracks() /* Parses custom track data to get the position variable * return - The first chromosome position variable found in the * custom track data. */ { char *pos = NULL; struct slName *bl = NULL; -// If the user has myVariants data for this database, write a custom track -// stub file and set the ctfile_ cart variable so customTracksParseCart picks -// it up. This handles fresh carts and also refreshes after edits/deletes -// done via jsCommandDispatch. If the backing table no longer exists (e.g. -// the user or an admin dropped it), remove the stale cart variable so the -// custom track system doesn't try to load a non-existent table. +// If the user has myVariants data for this database, refresh the on-disk +// ctfile and point the mvCtfile_ cart variable at it. customTracksParseCart +// reads that variable independently of ctfile_, so regular custom tracks +// are unaffected. if (cfgOptionBooleanDefault("doMyVariants", FALSE)) { char *userName = getUserName(); char *ctFile = myVariantsWriteCtFile(userName, database, cart); char mvVarName[256]; - safef(mvVarName, sizeof mvVarName, CT_FILE_VAR_PREFIX "%s", database); + safef(mvVarName, sizeof mvVarName, MYVARIANTS_FILE_VAR_PREFIX "%s", database); if (isNotEmpty(ctFile)) cartSetString(cart, mvVarName, ctFile); else cartRemove(cart, mvVarName); } ctList = customTracksParseCart(database, cart, &browserLines, &ctFileName); for (bl = browserLines; bl != NULL; bl = bl->next) { char *words[96]; int wordCount; char *dupe = cloneString(bl->name); wordCount = chopLine(dupe, words);