commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/fa23454cb097/ Changeset: fa23454cb097 User: jgoecks Date: 2013-03-25 14:37:17 Summary: Trackster: more flexible parsing of location string. Affected #: 1 file diff -r f6743b36ce0a54e49acf06d09e03d01584d55514 -r fa23454cb09791cf1765d314dac07668b765795a static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -1276,7 +1276,7 @@ view.reference_track.init(); } } - if (low !== undefined && high !== undefined) { + if (low && high) { view.low = Math.max(low, 0); view.high = Math.min(high, view.max_high); } @@ -1289,34 +1289,49 @@ view.request_redraw(); } }, + + /** + * Change viewing region to that denoted by string. General format of string is: + * + * <chrom>[ {separator}<start>[-<end>] ] + * + * where separator can be whitespace or a colon. Examples: + * + * chr22 + * chr1:100-200 + * chr7 89999 + * chr8 90000 990000 + */ go_to: function(str) { - // Preprocess str to remove spaces and commas. - str = str.replace(/ |,/g, ""); - - // Go to new location. - var view = this, - new_low, - new_high, - chrom_pos = str.split(":"), + // Remove commas. + str = str.replace(/,/g, ''); + + // Replace colons and hyphens with space for easy parsing. + str = str.replace(/:|\-/g, ' '); + + // Parse new location. + var chrom_pos = str.split(/\s+/), chrom = chrom_pos[0], - pos = chrom_pos[1]; - - if (pos !== undefined) { - try { - var pos_split = pos.split("-"); - new_low = parseInt(pos_split[0], 10); - new_high = parseInt(pos_split[1], 10); - } catch (e) { - return false; - } + new_low = (chrom_pos[1] ? parseInt(chrom_pos[1], 10) : null), + new_high = (chrom_pos[2] ? parseInt(chrom_pos[2], 10) : null); + + // If no new high, new_low is the position of focus, so adjust low, high + // accordingly. + if (!new_high) { + // HACK: max resolution is 30 bases,so adjust low, high accordingly. + new_low = new_low - 15; + new_high = new_low + 15; } - view.change_chrom(chrom, new_low, new_high); + + this.change_chrom(chrom, new_low, new_high); }, + move_fraction: function(fraction) { var view = this; var span = view.high - view.low; this.move_delta(fraction * span); }, + move_delta: function(delta_chrom) { // Update low, high. var view = this; https://bitbucket.org/galaxy/galaxy-central/commits/48ff47731eba/ Changeset: 48ff47731eba User: jgoecks Date: 2013-03-25 14:37:48 Summary: Automated merge. Affected #: 1 file diff -r fa23454cb09791cf1765d314dac07668b765795a -r 48ff47731eba48aededf1c608d7dd1e03dcd7d1f test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -454,9 +454,10 @@ def fill_review_form( self, review_contents_dict, strings_displayed=[], strings_not_displayed=[] ): kwd = dict() + changed = False for label, contents in review_contents_dict.items(): - strings_displayed.append( label ) if contents: + changed = True kwd[ '%s__ESEP__comment' % label ] = contents[ 'comment' ] kwd[ '%s__ESEP__rating' % label ] = contents[ 'rating' ] if 'private' in contents: @@ -464,8 +465,10 @@ kwd[ '%s__ESEP__approved' % label ] = contents[ 'approved' ] else: kwd[ '%s__ESEP__approved' % label ] = 'not_applicable' + self.check_for_strings( strings_displayed, strings_not_displayed ) self.submit_form( 1, 'Workflows__ESEP__review_button', **kwd ) - strings_displayed.append( 'Reviews were saved' ) + if changed: + strings_displayed.append( 'Reviews were saved' ) self.check_for_strings( strings_displayed, strings_not_displayed ) def galaxy_login( self, email='test@bx.psu.edu', password='testuser', username='admin-user', redirect='' ): 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)
-
commits-noreply@bitbucket.org