8c908f948b09826c6cb4452ee5b282aca41be85e galt Tue Dec 8 21:52:59 2015 -0800 Multi-region (exonMostly). This work allows people to look at virtual chromosomes from a list of regions and then navigate and perform all of the usual functions on it. diff --git src/hg/hgTracks/expRatioTracks.c src/hg/hgTracks/expRatioTracks.c index 0467e9f..e02fd5a 100644 --- src/hg/hgTracks/expRatioTracks.c +++ src/hg/hgTracks/expRatioTracks.c @@ -62,30 +62,31 @@ clinicalHash = getClinicalData(tableName); } boolean ucsfdemoMatch(char *thisER, char *thisPR) { if (sameString(erFilter, "no filter") && sameString(prFilter, "no filter")) return TRUE; if (sameString(erFilter, "no filter") && sameString(prFilter, thisPR)) return TRUE; if (sameString(erFilter, thisER) && sameString(prFilter, "no filter")) return TRUE; if (sameString(erFilter, thisER) && sameString(prFilter, thisPR)) return TRUE; return FALSE; } int packCountRowsUCSFDemo(struct track *tg, int maxCount, boolean withLabels, boolean allowOverflow) +// Stale, broken, hg17-only /* Return packed height. */ /* Cloned from packCountRowsOverflow() in hgTracks.c. */ { struct simpleClinical *clinicalItem; struct spaceSaver *ss; struct slList *item; MgFont *font = tl.font; int extraWidth = tl.mWidth * 2; long long start, end; double scale = (double)insideWidth/(winEnd - winStart); spaceSaverFree(&tg->ss); ss = tg->ss = spaceSaverNew(0, insideWidth, maxCount); loadFiltersAndHash("phenBreastTumors"); for (item = tg->items; item != NULL; item = item->next) { @@ -103,34 +104,36 @@ else start = round((double)(baseStart - winStart)*scale); if (!tg->drawName && withLabels) start -= mgFontStringWidth(font, tg->itemName(tg, item)) + extraWidth; if (baseEnd >= winEnd) end = insideWidth; else end = round((baseEnd - winStart)*scale); if (start < 0) start = 0; if (spaceSaverAddOverflow(ss, start, end, item, allowOverflow) == NULL) break; } } spaceSaverFinish(ss); + return ss->rowCount; } int ucsfdemoTotalHeight(struct track *tg, enum trackVisibility vis) +// Stale, broken, hg17-only { int rows = 0; double maxHeight = maximumTrackHeight(tg); loadFiltersAndHash("phenBreastTumors"); switch (vis) { case tvFull: { struct slList *item; struct simpleClinical *clinicalItem; for (item = tg->items; item != NULL; item = item->next) { char *name = tg->itemName(tg, item); @@ -1765,31 +1768,31 @@ void loweExpRatioMethods(struct track *tg) /* Set up methods for expRatio type tracks in general. */ { expRatioMethods(tg); tg->itemColor = loweRatioColor; } void expRatioMethodsFromDotRa(struct track *tg) /* Special methods for tracks using new microarrayGroups.ra files. */ { expRatioMethods(tg); tg->drawItems = expRatioDrawItems; tg->drawLeftLabels = expRatioDrawLeftLabels; tg->trackFilter = lfsFromExpRatio; -if (sameString(tg->table, "CGHBreastCancerUCSF")) +if (sameString(tg->table, "CGHBreastCancerUCSF")) // Stale, broken, hg17-only tg->totalHeight = ucsfdemoTotalHeight; } void expRatioMethodsFromCt(struct track *tg) /* Set up methods for expRatio type tracks from custom track. */ { expRatioMethods(tg); tg->drawItems = expRatioDrawItems; tg->drawLeftLabels = expRatioDrawLeftLabels; tg->loadItems = ctLoadMultScoresBed; tg->trackFilter = lfsFromExpRatio; } /* Probes tracks */