Skip to content

Commit

Permalink
Rename to_hda_agent to to_hda_representative
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Aug 1, 2016
1 parent bd194a8 commit 65328ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3299,7 +3299,7 @@ def type_id( cls ):
return (( type_coerce( cls.content_type, types.Unicode ) + u'-' +
type_coerce( cls.id, types.Unicode ) ).label( 'type_id' ))

def to_hda_agent( self, multiple=False ):
def to_hda_representative( self, multiple=False ):
rval = []
for dataset in self.collection.dataset_elements:
rval.append( dataset.dataset_instance )
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/tools/parameters/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ def get_column_list( self, trans, other_values ):
for dataset in util.listify( dataset ):
# Use representative dataset if a dataset collection is parsed
if isinstance( dataset, trans.app.model.HistoryDatasetCollectionAssociation ):
dataset = dataset.to_hda_agent()
dataset = dataset.to_hda_representative()

# Columns can only be identified if metadata is available
if not hasattr( dataset, 'metadata' ) or not hasattr( dataset.metadata, 'columns' ) or not dataset.metadata.columns:
Expand Down
4 changes: 2 additions & 2 deletions lib/galaxy/tools/parameters/dynamic_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def compare_meta_value( file_value, dataset_value ):
return file_value == dataset_value
ref = other_values.get( self.ref_name, None )
if isinstance( ref, HistoryDatasetCollectionAssociation ):
ref = ref.to_hda_agent( self.multiple )
ref = ref.to_hda_representative( self.multiple )
is_data = isinstance( ref, galaxy.tools.wrappers.DatasetFilenameWrapper )
is_data_list = isinstance( ref, galaxy.tools.wrappers.DatasetListWrapper ) or isinstance( ref, list )
is_data_or_data_list = is_data or is_data_list
Expand Down Expand Up @@ -401,7 +401,7 @@ def compare_value( option_value, filter_value ):
else:
data_ref = other_values.get( self.meta_ref )
if isinstance( data_ref, HistoryDatasetCollectionAssociation ):
data_ref = data_ref.to_hda_agent()
data_ref = data_ref.to_hda_representative()
if not isinstance( data_ref, HistoryDatasetAssociation ) and not isinstance( data_ref, galaxy.tools.wrappers.DatasetFilenameWrapper ):
return options # cannot modify options
value = data_ref.metadata.get( self.metadata_key, None )
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/workflow/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@ def callback( input, prefixed_name, context, **kwargs ):
output_inputs = output_step.module.get_runtime_inputs()
output_value = output_inputs[ 'input' ].get_initial_value( self.trans, context )
if isinstance( input, DataToolParameter ) and isinstance( output_value, self.trans.app.model.HistoryDatasetCollectionAssociation ):
output_value = output_value.to_hda_agent()
output_value = output_value.to_hda_representative()
return output_value
return RuntimeValue()
else:
Expand Down

0 comments on commit 65328ff

Please sign in to comment.