3904cbc6353d7d6d09d7615bfddf7449456588f5 kent Tue Apr 19 16:54:41 2011 -0700 Making autoscale work as you'd hope for multiWigs - where all the wigs have a common scale. diff --git src/hg/hgTracks/wigCommon.h src/hg/hgTracks/wigCommon.h index 4c43fc2..c35c56d 100644 --- src/hg/hgTracks/wigCommon.h +++ src/hg/hgTracks/wigCommon.h @@ -30,30 +30,31 @@ boolean isMultiWig; /* If true it's a multi-wig. */ boolean overlay; /* Overlay multiple wigs on top of each other? */ }; struct wigCartOptions *wigCartOptionsNew(struct cart *cart, struct trackDb *tdb, int wordCount, char *words[]); /* Create a wigCartOptions from cart contents and tdb. */ struct preDrawContainer /* A list of preDraws */ { struct preDrawContainer *next; struct preDrawElement *preDraw; int preDrawSize; /* Size of preDraw */ int preDrawZero; /* Offset from start of predraw array to data requested. We * get more because of smoothing */ + int width; /* Passed in width, number of pixels to display without smooth */ }; struct preDrawElement { double max; /* maximum value seen for this point */ double min; /* minimum value seen for this point */ unsigned long long count; /* number of datum at this point */ double sumData; /* sum of all values at this point */ double sumSquares; /* sum of (values squared) at this point */ double plotValue; /* raw data to plot */ double smooth; /* smooth data values */ }; struct bedGraphItem /* A bedGraph track item. */ @@ -130,21 +131,24 @@ /* find upper and lower limits of graphed items (wigItem) */ void wigDrawPredraw(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, MgFont *font, Color color, enum trackVisibility vis, struct preDrawContainer *preDrawContainer, int preDrawZero, int preDrawSize, double *retGraphUpperLimit, double *retGraphLowerLimit); /* Draw once we've figured out predraw. */ void wigLeftAxisLabels(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, int xOff, int yOff, int width, int height, boolean withCenterLabels, MgFont *font, Color color, enum trackVisibility vis, char *shortLabel, double graphUpperLimit, double graphLowerLimit, boolean showNumbers); /* Draw labels on left for a wiggle-type track. */ +double wiggleLogish(double x); +/* Return log-like transform without singularity at 0. */ + /****************** in source file bedGraph.c ************************/ void wigBedGraphFindItemLimits(void *items, double *graphUpperLimit, double *graphLowerLimit); /* find upper and lower limits of graphed items (bedGraphItem) */ #endif /* WIGCOMMON_H */