59589f49358d01d25b44d8b0c7370c6a778985e8 galt Fri Apr 15 11:25:39 2016 -0700 Fixing problem where tracks with data only on certain chroms could get filtered out if they do not match the chromName of the first window. Now it looks across all windows chromNames and only hides the track if it is not found on all chroms of all window regions. No RM issue. Discovered with custom regions with multiple different chroms and a bam custom track that only had data from chr21. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 92aca84..2126da9 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -7263,39 +7263,46 @@ char *jsCommand = cartCgiUsualString(cart, hgtJsCommand, ""); if (!isEmpty(jsCommand)) { cartRemove(cart, hgtJsCommand); jsCommandDispatch(jsCommand, trackList); } /* adjust visibility */ for (track = trackList; track != NULL; track = track->next) { /* adjust track visibility based on supertrack just before load loop */ if (tdbIsSuperTrackChild(track->tdb)) limitSuperTrackVis(track); - /* remove cart priority variables if they are set - to the default values in the trackDb */ - if (!hTrackOnChrom(track->tdb, chromName)) + /* hide tracks not on any windows chromNames */ + boolean hideIt = TRUE; + struct window *w; + for (w = windows; w; w=w->next) + { + if (hTrackOnChrom(track->tdb, w->chromName)) + hideIt = FALSE; + } + if (hideIt) { track->limitedVis = tvHide; track->limitedVisSet = TRUE; } } + if (sameString(cfgOptionDefault("trackLog", "off"), "on")) logTrackVisibilities(cartSessionId(cart), trackList); ///////////////// // NEED TO LOAD ALL WINDOWS NOW // // Need to load one window at a time! // // The use of the global values for a window // means that differerent threads cannot use different global window values. // Threads must run on just one window value at a time. // // Begin by making a copy of the track structure for visible tracks