commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/ce8cabd05c3b/ changeset: ce8cabd05c3b user: dan date: 2012-10-24 18:33:34 summary: Enhance GenomeSpace import tool to display a better history item name for additional primary datasets. affected #: 1 file diff -r 3fe486853787d10c2ba6f0b79f82aa59aaed8790 -r ce8cabd05c3b5cb4d441eac42beaebaeb048aa9a tools/genomespace/genomespace_importer.py --- a/tools/genomespace/genomespace_importer.py +++ b/tools/genomespace/genomespace_importer.py @@ -100,7 +100,7 @@ datasource_params = json_params.get( 'param_dict' ) assert None not in [ username, token ], "Missing GenomeSpace username or token." output_filename = datasource_params.get( "output_file1", None ) - dataset_id = json_params['output_data'][0]['dataset_id'] + dataset_id = base_dataset_id = json_params['output_data'][0]['dataset_id'] hda_id = json_params['output_data'][0]['hda_id'] url_opener = get_cookie_opener( username, token ) #load and set genomespace format ids to galaxy exts @@ -182,12 +182,18 @@ name = "GenomeSpace importer on %s" % ( filename ) ) ) ) #if using tmp file, move the file to the new file path dir to get scooped up later if using_temp_file: + original_filename = filename filename = ''.join( c in VALID_CHARS and c or '-' for c in filename ) while filename in used_filenames: filename = "-%s" % filename used_filenames.append( filename ) - shutil.move( output_filename, os.path.join( datasource_params['__new_file_path__'], 'primary_%i_%s_visible_%s' % ( hda_id, filename, file_type ) ) ) - + target_output_filename = os.path.join( datasource_params['__new_file_path__'], 'primary_%i_%s_visible_%s' % ( hda_id, filename, file_type ) ) + shutil.move( output_filename, target_output_filename ) + metadata_parameter_file.write( "%s\n" % simplejson.dumps( dict( type = 'new_primary_dataset', + base_dataset_id = base_dataset_id, + ext = file_type, + filename = target_output_filename, + name = "GenomeSpace importer on %s" % ( original_filename ) ) ) ) dataset_id = None #only one primary dataset available output_filename = None #only have one filename available metadata_parameter_file.close() https://bitbucket.org/galaxy/galaxy-central/changeset/87e6251af95f/ changeset: 87e6251af95f user: dan date: 2012-10-24 18:33:34 summary: Enhance GenomeSpace filebrowser importer to display a better history item name for additional primary datasets. affected #: 1 file diff -r ce8cabd05c3b5cb4d441eac42beaebaeb048aa9a -r 87e6251af95f57e4fa24d6e0c9eaefec6016025d tools/genomespace/genomespace_file_browser.py --- a/tools/genomespace/genomespace_file_browser.py +++ b/tools/genomespace/genomespace_file_browser.py @@ -140,11 +140,17 @@ if not filename: filename = download_url if output_filename is None: + original_filename = filename filename = ''.join( c in VALID_CHARS and c or '-' for c in filename ) while filename in used_filenames: filename = "-%s" % filename used_filenames.append( filename ) output_filename = os.path.join( datasource_params['__new_file_path__'], 'primary_%i_%s_visible_%s' % ( hda_id, filename, galaxy_ext ) ) + metadata_parameter_file.write( "%s\n" % simplejson.dumps( dict( type = 'new_primary_dataset', + base_dataset_id = dataset_id, + ext = galaxy_ext, + filename = output_filename, + name = "GenomeSpace import on %s" % ( original_filename ) ) ) ) else: if dataset_id is not None: metadata_parameter_file.write( "%s\n" % simplejson.dumps( dict( type = 'dataset', 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