[hg] galaxy 3770: work around for composite objects without a ba...
details: http://www.bx.psu.edu/hg/galaxy/rev/7232b61da6d3 changeset: 3770:7232b61da6d3 user: fubar/ross period lazarus at gmail d0t com date: Tue May 11 18:02:39 2010 -0400 description: work around for composite objects without a base_name in grouping.py removed artefacts from Manhattan plot example in the rgManQQ tool help diffstat: lib/galaxy/tools/parameters/grouping.py | 11 ++++++----- lib/galaxy/web/controllers/dataset.py | 1 - static/images/Armitagep_manhattan.png | 0 static/images/Armitagep_qqplot.png | 0 4 files changed, 6 insertions(+), 6 deletions(-) diffs (48 lines): diff -r 69e70e588a8e -r 7232b61da6d3 lib/galaxy/tools/parameters/grouping.py --- a/lib/galaxy/tools/parameters/grouping.py Tue May 11 13:25:39 2010 -0400 +++ b/lib/galaxy/tools/parameters/grouping.py Tue May 11 18:02:39 2010 -0400 @@ -100,8 +100,7 @@ self.file_type_to_ext = { 'auto':self.default_file_type } self.metadata_ref = 'files_metadata' def get_file_base_name( self, context ): - log.debug('### uploadDataset get base name context = %s' % str(context)) - fd = context.get('files_metadata|base_name','?') + fd = context.get('files_metadata|base_name','Galaxy_Composite_file') return fd def get_file_type( self, context ): return context.get( self.file_type_name, self.default_file_type ) @@ -295,14 +294,16 @@ temp_name, is_multi_byte = sniff.stream_to_file( StringIO.StringIO( d_type.generate_primary_file( dataset ) ), prefix='upload_auto_primary_file' ) dataset.primary_file = temp_name dataset.space_to_tab = False - dataset.precreated_name = dataset.name = dataset.metadata['base_name'] # was 'Uploaded Composite Dataset (%s)' % ( file_type ) + dsn = dataset.metadata.get('base_name','Uploaded Composite Dataset (%s)' % file_type) + dataset.precreated_name = dataset.name = dsn else: file_bunch, warnings = get_one_filename( groups_incoming[ 0 ] ) writable_files_offset = 1 dataset.primary_file = file_bunch.path dataset.space_to_tab = file_bunch.space_to_tab - dataset.precreated_name = dataset.metadata['base_name'] # file_bunch.precreated_name - dataset.name = file_bunch.precreated_name + dsn = dataset.metadata.get('base_name',file_bunch.precreated_name) + dataset.precreated_name = dsn + dataset.name = dsn dataset.warnings.extend( file_bunch.warnings ) if dataset.primary_file is None:#remove this before finish, this should create an empty dataset raise Exception( 'No primary dataset file was available for composite upload' ) diff -r 69e70e588a8e -r 7232b61da6d3 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py Tue May 11 13:25:39 2010 -0400 +++ b/lib/galaxy/web/controllers/dataset.py Tue May 11 18:02:39 2010 -0400 @@ -246,7 +246,6 @@ ext = data.extension path = data.file_name fname = os.path.split(path)[-1] - basename = data.metadata.base_name efp = data.extra_files_path htmlname = os.path.splitext(outfname)[0] if not htmlname.endswith(ext): diff -r 69e70e588a8e -r 7232b61da6d3 static/images/Armitagep_manhattan.png Binary file static/images/Armitagep_manhattan.png has changed diff -r 69e70e588a8e -r 7232b61da6d3 static/images/Armitagep_qqplot.png Binary file static/images/Armitagep_qqplot.png has changed
participants (1)
-
Nate Coraor