GMOD/Bio-Graphics — pull request #7 by tjparnell (2012-06-27 17:41:54+00:00)
Title: interval_method option for statistical summaries

These are the modifications that were discussed with Lincoln several weeks ago regarding adding an interval_method option when working with statistical_summaries from BigWig datasets when drawing wiggle_xyplots. This allows the user to report the mean, sum, minimum, or maximum score for each interval. The default is mean, the same as pre-existing behavior.

Changes have been made to wiggle_xyplot (wiggle_data), hybrid_plot, and vista_plot glyphs to support this. Documentation have been added to wiggle_xyplot.

Also included are fixes for bad behavior with sparse variableStep data from bigWig, most visible when using the line graph_type. The default return value for each interval in the data array was 0 when the statistical_summary reported a validCount of 0, resulting in the line bouncing from real values to 0, unlike the behavior with wib files, which draws a line from real value to next available real value.

The fix is to change the default return value to undef, and then toss those undefined values when preparing the parts for rendering.