commit/galaxy-central: kanwei: trackster: tweak resolution, fix LineTrack data bug
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/c0e7ba8bfd57/ changeset: r5558:c0e7ba8bfd57 user: kanwei date: 2011-05-13 22:49:43 summary: trackster: tweak resolution, fix LineTrack data bug affected #: 2 files (67 bytes) --- a/lib/galaxy/visualization/tracks/data_providers.py Fri May 13 10:02:28 2011 -0400 +++ b/lib/galaxy/visualization/tracks/data_providers.py Fri May 13 16:49:43 2011 -0400 @@ -332,10 +332,11 @@ # The first zoom level for BBI files is 640. If too much is requested, it will look at each block instead # of summaries. The calculation done is: zoom <> (end-start)/num_points/2. # Thus, the optimal number of points is (end-start)/num_points/2 = 640 - # num_points = (end-start) / 1280 + # num_points = (end-start) / 1280 num_points = (end-start) / 1280 - if (end - start) < num_points: + if num_points < 1: num_points = end - start + num_points = max(num_points, 10) data = bbi.query(chrom, start, end, num_points) f.close() --- a/static/scripts/trackster.js Fri May 13 10:02:28 2011 -0400 +++ b/static/scripts/trackster.js Fri May 13 16:49:43 2011 -0400 @@ -181,6 +181,7 @@ // Other constants. DENSITY = 200, + RESOLUTION = 5, FEATURE_LEVELS = 10, DEFAULT_DATA_QUERY_WAIT = 5000, // Maximum number of chromosomes that are selectable at any one time. @@ -762,7 +763,7 @@ this.high = Math.ceil(high); // 10^log10(range / DENSITY) Close approximation for browser window, assuming DENSITY = window width - this.resolution = Math.pow( 10, Math.ceil( Math.log( (this.high - this.low) / DENSITY ) / Math.LN10 ) ); + this.resolution = Math.pow( RESOLUTION, Math.ceil( Math.log( (this.high - this.low) / DENSITY ) / Math.log(RESOLUTION) ) ); this.zoom_res = Math.pow( FEATURE_LEVELS, Math.max(0,Math.ceil( Math.log( this.resolution, FEATURE_LEVELS ) / Math.log(FEATURE_LEVELS) ))); // Overview Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket