branch merge

This commit is contained in:
Ross Lazarus
2011-05-13 17:12:44 -04:00
2 changed files with 5 additions and 3 deletions
@@ -332,10 +332,11 @@ class BBIDataProvider( TracksDataProvider ):
# 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()
+2 -1
View File
@@ -181,6 +181,7 @@ var
// 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 @@ extend( View.prototype, {
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