73bc761688e8dc33888081e7e9198d3f214c90b8 braney Fri Aug 7 14:21:33 2015 -0700 some tweaks to introduce mafSnp mode to hg38 100way #14277 diff --git src/hg/hgTracks/mafTrack.c src/hg/hgTracks/mafTrack.c index 5c4104f..cd6fb0b 100644 --- src/hg/hgTracks/mafTrack.c +++ src/hg/hgTracks/mafTrack.c @@ -226,31 +226,31 @@ * the zoom level and the display density. */ { struct mafItem *miList = NULL; int scoreHeight = tl.fontHeight; /* Create item list and set height depending * on display type. */ if (tg->visibility == tvFull) scoreHeight *= 4; if (zoomedToBaseLevel) { miList = mafItems(tg, scoreHeight, zoomedToBaseLevel, isAxt); } else { - if (tg->visibility == tvFull && winBaseCount < MAF_SUMMARY_VIEW) + if (tg->visibility == tvFull && !inSummaryMode(cart, tg->tdb, winBaseCount)) { /* currently implemented only for medium zoom out */ miList = mafItems(tg, scoreHeight, FALSE, isAxt); } else { AllocVar(miList); miList->name = cloneString(tg->shortLabel); miList->height = scoreHeight; } } tg->items = miList; } static void mafLoad(struct track *tg) @@ -757,31 +757,31 @@ color, tg->ixAltColor, tvDense, isAxt, FALSE, doSnpMode); yOff += mi->height + 1; mafAliFreeList(&mafList); } } hFreeConn(&conn); } static void mafDrawGraphic(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis, boolean isAxt) /* Draw wiggle or density plot, not base-by-base. */ { int seqSize = seqEnd - seqStart; -if (seqSize >= MAF_SUMMARY_VIEW) +if (inSummaryMode(cart, tg->tdb, seqSize)) { mafDrawOverview(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis); } else { mafDrawDetails(tg, seqStart, seqEnd, hvg, xOff, yOff, width, font, color, vis, isAxt); } // density gradient of blastz's // mafDrawPairwise(tg, seqStart, seqEnd, hvg, xOff, yOff, font, width, color, vis); } static void mafDrawBases(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width,