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.h src/hg/hgTracks/mafTrack.h index a5fe740..6923123 100644 --- src/hg/hgTracks/mafTrack.h +++ src/hg/hgTracks/mafTrack.h @@ -7,31 +7,39 @@ #define MAFTRACK_H #ifndef MAF_H #include "maf.h" #endif struct mafPriv { void *list; struct customTrack *ct; }; struct mafPriv *getMafPriv(struct track *track); /* zoom level where summary file is used */ -#define MAF_SUMMARY_VIEW 1000000 +static inline boolean inSummaryMode(struct cart *cart, struct trackDb *tdb, int winSize) +{ +char *snpTable = trackDbSetting(tdb, "snpTable"); + +boolean windowBigEnough = (winSize > 1000000); +boolean doSnpMode = (snpTable != NULL) && cartOrTdbBoolean(cart, tdb, MAF_SHOW_SNP,FALSE); +return windowBigEnough && !doSnpMode; +} + /* zoom level that displays synteny breaks and nesting brackets */ #define MAF_DETAIL_VIEW 30000 void drawMafRegionDetails(struct mafAli *mafList, int height, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, Color altColor, enum trackVisibility vis, boolean isAxt, boolean chainBreaks, boolean doSnpMode); /* Draw wiggle/density plot based on scoring things on the fly. */ void drawMafChain(struct hvGfx *hvg, int xOff, int yOff, int width, int height, boolean isDouble); /* draw single or double chain line between alignments in MAF display */