commit/galaxy-central: dan: Allow FromParamToolOutputActionOption and ParamValueToolOutputActionOptionFilter to access attributes of parameter values.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/be70b8497349/ changeset: r5156:be70b8497349 user: dan date: 2011-03-02 17:34:36 summary: Allow FromParamToolOutputActionOption and ParamValueToolOutputActionOptionFilter to access attributes of parameter values. affected #: 1 file (532 bytes) --- a/lib/galaxy/tools/parameters/output.py Wed Mar 02 11:34:03 2011 -0500 +++ b/lib/galaxy/tools/parameters/output.py Wed Mar 02 11:34:36 2011 -0500 @@ -179,11 +179,16 @@ self.column = int( self.column ) self.offset = elem.get( 'offset', -1 ) self.offset = int( self.offset ) + self.param_attribute = elem.get( 'param_attribute', [] ) + if self.param_attribute: + self.param_attribute = self.param_attribute.split( '.' ) def get_value( self, other_values ): value = other_values for ref_name in self.name: assert ref_name in value, "Required dependency '%s' not found in incoming values" % ref_name value = value.get( ref_name ) + for attr_name in self.param_attribute: + value = getattr( value, attr_name ) options = [ [ str( value ) ] ] for filter in self.filters: options = filter.filter_options( options, other_values ) @@ -276,6 +281,9 @@ self.keep = util.string_as_bool( elem.get( "keep", 'True' ) ) self.compare = parse_compare_type( elem.get( 'compare', None ) ) self.cast = parse_cast_attribute( elem.get( "cast", None ) ) + self.param_attribute = elem.get( 'param_attribute', [] ) + if self.param_attribute: + self.param_attribute = self.param_attribute.split( '.' ) def filter_options( self, options, other_values ): if self.ref: #find ref value @@ -283,6 +291,8 @@ for ref_name in self.ref: assert ref_name in value, "Required dependency '%s' not found in incoming values" % ref_name value = value.get( ref_name ) + for attr_name in self.param_attribute: + value = getattr( value, attr_name ) value = str( value ) else: value = self.value 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