1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/2ce01d5a691a/
changeset: 2ce01d5a691a
user: jgoecks
date: 2012-07-19 16:59:20
summary: Viz framework: bigwig fixes and remove unnecessary type casting.
affected #: 3 files
diff -r a38ed0d641983a29642857ff8eed5915e42bb341 -r 2ce01d5a691a9e04eb5f597c4a8cfa519236c822 lib/galaxy/visualization/tracks/data_providers.py
--- a/lib/galaxy/visualization/tracks/data_providers.py
+++ b/lib/galaxy/visualization/tracks/data_providers.py
@@ -465,8 +465,8 @@
feature_start = int( feature[1] )
feature_end = int( feature[2] )
if ( chrom is not None and feature_chrom != chrom ) \
- or ( start is not None and feature_start > int( end ) ) \
- or ( end is not None and feature_end < int( start ) ):
+ or ( start is not None and feature_start > end ) \
+ or ( end is not None and feature_end < start ):
continue
yield line
return line_filter_iter()
@@ -599,7 +599,7 @@
if len( alt ) > longest_alt:
longest_alt = len( alt )
variant_end = variant_start + abs( len( ref ) - longest_alt )
- if variant_chrom != chrom or variant_start > int( end ) or variant_end < int( start ):
+ if variant_chrom != chrom or variant_start > end or variant_end < start:
continue
yield line
return line_filter_iter()
@@ -898,16 +898,16 @@
return all_dat is not None
def get_data( self, chrom, start, end, start_val=0, max_vals=None, **kwargs ):
- # Bigwig has the possibility of it being a standalone bigwig file, in which case we use
- # original_dataset, or coming from wig->bigwig conversion in which we use converted_dataset
+ # Bigwig can be a standalone bigwig file, in which case we use
+ # original_dataset, or coming from wig->bigwig conversion in
+ # which we use converted_dataset
f, bbi = self._get_dataset()
- # If the stats kwarg was provide, we compute overall summary data for
- # the entire chromosome, but no reduced data -- currently only
- # providing values used by trackster to determine the default range
+ # If the stats kwarg was provide, we compute overall summary data for the
+ # range defined by start and end but no reduced data. This is currently
+ # used by client to determine the default range.
if 'stats' in kwargs:
- # FIXME: use actual chromosome size
- summary = bbi.summarize( chrom, 0, 214783647, 1 )
+ summary = bbi.summarize( chrom, start, end, 1 )
f.close()
if summary is None:
return None
@@ -927,9 +927,6 @@
return dict( data=dict( min=summary.min_val[0], max=summary.max_val[0], mean=mean, sd=sd ) )
- start = int(start)
- end = int(end)
-
# The following seems not to work very well, for example it will only return one
# data point if the tile is 1280px wide. Not sure what the intent is.
@@ -943,13 +940,22 @@
#else:
# num_points = min(num_points, 500)
- # For now, we'll do 1000 data points by default However, the summaries
+ # For now, we'll do 1000 data points by default. However, the summaries
# don't seem to work when a summary pixel corresponds to less than one
# datapoint, so we prevent that.
- # FIXME: need to switch over to using the full data at high levels of
- # detail.
+
+ # FIXME: need to choose the number of points to maximize coverage of the area.
+ # It appears that BBI calculates points using intervals of
+ # floor( num_points / end - start )
+ # In some cases, this prevents sampling near the end of the interval,
+ # especially when (a) the total interval is small ( < 20-30Kb) and (b) the
+ # computed interval size has a large fraction, e.g. 14.7 or 35.8
num_points = min( 1000, end - start )
+ # HACK to address the FIXME above; should generalize.
+ if end - start <= 2000:
+ num_points = end - start
+
summary = bbi.summarize( chrom, start, end, num_points )
f.close()
@@ -958,7 +964,6 @@
if summary:
#mean = summary.sum_data / summary.valid_count
-
## Standard deviation by bin, not yet used
## var = summary.sum_squares - mean
## var /= minimum( valid_count - 1, 1 )
@@ -968,7 +973,7 @@
step_size = (end - start) / num_points
for i in range( num_points ):
- result.append( (pos, float_nan( summary.sum_data[i] ) ) )
+ result.append( (pos, float_nan( summary.sum_data[i] / summary.valid_count[i] ) ) )
pos += step_size
return { 'data': result }
@@ -1078,7 +1083,6 @@
Returns an iterator that provides data in the region chrom:start-end as well as
a file offset.
"""
- start, end = int( start ), int( end )
source = open( self.original_dataset.file_name )
def features_in_region_iter():
diff -r a38ed0d641983a29642857ff8eed5915e42bb341 -r 2ce01d5a691a9e04eb5f597c4a8cfa519236c822 lib/galaxy/web/controllers/tracks.py
--- a/lib/galaxy/web/controllers/tracks.py
+++ b/lib/galaxy/web/controllers/tracks.py
@@ -267,6 +267,8 @@
msg = self.check_dataset_state( trans, dataset )
if msg:
return msg
+
+ low, high = int( low ), int( high )
# Return data.
data = None
@@ -402,7 +404,7 @@
data_provider = data_provider_class( converted_dataset=converted_dataset, original_dataset=dataset, dependencies=deps )
# Get and return data from data_provider.
- result = data_provider.get_data( chrom, low, high, int( start_val ), int( max_vals ), **kwargs )
+ result = data_provider.get_data( chrom, int( low ), int( high ), int( start_val ), int( max_vals ), **kwargs )
result.update( { 'dataset_type': tracks_dataset_type, 'extra_info': extra_info } )
return result
diff -r a38ed0d641983a29642857ff8eed5915e42bb341 -r 2ce01d5a691a9e04eb5f597c4a8cfa519236c822 static/scripts/viz/trackster.js
--- a/static/scripts/viz/trackster.js
+++ b/static/scripts/viz/trackster.js
@@ -4266,9 +4266,8 @@
},
predraw_init: function() {
var track = this;
-
track.vertical_range = undefined;
- return $.getJSON( track.data_url, { stats: true, chrom: track.view.chrom, low: null, high: null,
+ return $.getJSON( track.data_url, { stats: true, chrom: track.view.chrom, low: 0, high: track.view.max_high,
hda_ldda: track.hda_ldda, dataset_id: track.dataset_id }, function(result) {
track.container_div.addClass( "line-track" );
var data = result.data;
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a38ed0d64198/
changeset: a38ed0d64198
user: jgoecks
date: 2012-07-19 15:45:48
summary: Do not use route memory for dataset save URLs because it introduces harmful parameters.
affected #: 1 file
diff -r 891dd09be1614b2138f61d83b4d3feb86cc8f6c7 -r a38ed0d641983a29642857ff8eed5915e42bb341 templates/root/history_common.mako
--- a/templates/root/history_common.mako
+++ b/templates/root/history_common.mako
@@ -19,7 +19,7 @@
</div><div style="float:left;" class="menubutton split popup" id="dataset-${dataset_id}-popup">
%endif
- <a href="${h.url_for( controller='dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title='${_("Download")}' class="icon-button disk tooltip"></a>
+ <a href="${h.url_for( controller='/dataset', action='display', dataset_id=dataset_id, to_ext=data.ext )}" title='${_("Download")}' class="icon-button disk tooltip"></a>
%if meta_files:
</div>
%endif
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/891dd09be161/
changeset: 891dd09be161
user: jgoecks
date: 2012-07-18 23:52:54
summary: Reintroduce directionality indication to single-block features as it is again compatible with current code.
affected #: 1 file
diff -r ec29ce8e27a1d0feaed049e43b91e1e898b42bf4 -r 891dd09be1614b2138f61d83b4d3feb86cc8f6c7 static/scripts/viz/trackster.js
--- a/static/scripts/viz/trackster.js
+++ b/static/scripts/viz/trackster.js
@@ -5642,10 +5642,6 @@
var block_thick_start = Math.max(block_start, thick_start),
block_thick_end = Math.min(block_end, thick_end);
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height);
- // FIXME: for GFF datasets, only one block of many may be fetched, so it is not possible to
- // determine if feature has only one block. Hence, Ffr now, do not use b/c color is used to encoding
- // strand.
- /*
if ( feature_blocks.length === 1 && mode === "Pack") {
// Exactly one block means we have no introns, but do have a distinct "thick" region,
// draw arrows over it if in pack mode.
@@ -5661,7 +5657,6 @@
}
ctx.fillRect(block_thick_start, y_center + 1, block_thick_end - block_thick_start, thick_height);
}
- */
}
// Draw individual connectors if required
if ( this.draw_individual_connectors && last_block_start ) {
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/ec29ce8e27a1/
changeset: ec29ce8e27a1
user: jgoecks
date: 2012-07-18 21:50:37
summary: Encode dataset id for dataset returned when rerunning tools.
affected #: 1 file
diff -r 0378dd041c6051dc5156c3e15a28ae091fd370a4 -r ec29ce8e27a1d0feaed049e43b91e1e898b42bf4 lib/galaxy/web/api/tools.py
--- a/lib/galaxy/web/api/tools.py
+++ b/lib/galaxy/web/api/tools.py
@@ -388,5 +388,6 @@
output_dataset = joda.dataset
dataset_dict = output_dataset.get_api_value()
+ dataset_dict[ 'id' ] = trans.security.encode_id( dataset_dict[ 'id' ] )
dataset_dict[ 'track_config' ] = self.get_new_track_config( trans, output_dataset );
return dataset_dict
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.