[hg] galaxy 3334: Update GeneTrack to provide tool_id as part of...
details: http://www.bx.psu.edu/hg/galaxy/rev/51a1369fdf96 changeset: 3334:51a1369fdf96 user: Dan Blankenberg <dan@bx.psu.edu> date: Fri Feb 05 09:23:19 2010 -0500 description: Update GeneTrack to provide tool_id as part of GALAXY_URL and rename provided 'id' to destination name of 'input'. diffstat: lib/galaxy/datatypes/tracks.py | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diffs (33 lines): diff -r 7af418485514 -r 51a1369fdf96 lib/galaxy/datatypes/tracks.py --- a/lib/galaxy/datatypes/tracks.py Thu Feb 04 17:00:46 2010 -0500 +++ b/lib/galaxy/datatypes/tracks.py Fri Feb 05 09:23:19 2010 -0500 @@ -6,7 +6,7 @@ from galaxy import util from galaxy.web import url_for from galaxy.util.hash_util import hmac_new -import urllib +from urllib import quote_plus log = logging.getLogger(__name__) @@ -23,15 +23,14 @@ if hda.has_data: # Get the disk file name and data id file_name = hda.dataset.get_file_name() - data_id = urllib.quote_plus( str( hda.id ) ) #can we name this 'input' in the passed params instead of 'id' to prevent GT from having to map 'id' to 'input'? - galaxy_url = urllib.quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner' ) ) ) - tool_id = urllib.quote_plus( 'predict2genetrack' ) + data_id = quote_plus( str( hda.id ) ) + galaxy_url = quote_plus( "%s%s" % ( base_url, url_for( controller = 'tool_runner', tool_id='predict2genetrack' ) ) ) # Make it secure - hashkey = urllib.quote_plus( hmac_new( app.config.tool_secret, file_name ) ) - encoded = urllib.quote_plus( binascii.hexlify( file_name ) ) + hashkey = quote_plus( hmac_new( app.config.tool_secret, file_name ) ) + encoded = quote_plus( binascii.hexlify( file_name ) ) for name, url in util.get_genetrack_sites(): if name.lower() in app.config.genetrack_display_sites: # send both parameters filename and hashkey - link = "%s?filename=%s&hashkey=%s&id=%s&GALAXY_URL=%s&tool_id=%s" % ( url, encoded, hashkey, data_id, galaxy_url, tool_id ) + link = "%s?filename=%s&hashkey=%s&input=%s&GALAXY_URL=%s" % ( url, encoded, hashkey, data_id, galaxy_url ) ret_val.append( ( name, link ) ) return ret_val
participants (1)
-
Greg Von Kuster