I have not tested the patch, just read it, but won't this result in
dataset names like:

"Some operation on data 27 (Some operation on data 26 (Some other
operation on data 25 (...(...(...))))"

(avoiding this is why we came up with HIDs in the first place).

--
James Taylor, Associate Professor, Biology/CS, Emory University


On Mon, Nov 11, 2013 at 5:42 AM, Peter Cock <p.j.a.c...@googlemail.com> wrote:
> On Thu, Nov 7, 2013 at 3:50 PM, Peter Cock wrote:
>>
>> Getting back to my motivating example, since fasta_to_tabular.xml
>> does not give the output a label and depends on the default, the
>> small change to $on_string should result in the conversion of a
>> file named "My Genes" as "FASTA-to-Tabular on My Genes",
>> rather than "FASTA-to-Tabular on data 1" as now.
>>
>> Here's another variant to keep the "data 1" text in $on_string,
>> if people are attached to this functionality. That would result in
>> "FASTA-to-Tabular on data 1 (My Genes)".
>>
>> ...
>>
>> ------------------------------------------------------------------------------------------
>>
>> $ hg diff lib/galaxy/tools/actions/__init__.py
>> diff -r 77d58fdd1c2e lib/galaxy/tools/actions/__init__.py
>> --- a/lib/galaxy/tools/actions/__init__.py    Tue Oct 29 14:21:48 2013 -0400
>> +++ b/lib/galaxy/tools/actions/__init__.py    Thu Nov 07 15:49:15 2013 +0000
>> @@ -181,6 +181,7 @@
>>          input_names = []
>>          input_ext = 'data'
>>          input_dbkey = incoming.get( "dbkey", "?" )
>> +        on_text = ''
>>          for name, data in inp_data.items():
>>              if not data:
>>                  data = NoneDataset( datatypes_registry =
>> trans.app.datatypes_registry )
>> @@ -194,6 +195,8 @@
>>              else: # HDA
>>                  if data.hid:
>>                      input_names.append( 'data %s' % data.hid )
>> +                    #Will use this on_text if only one input dataset:
>> +                    on_text = "data %s (%s)" % (data.id, data.name)
>>              input_ext = data.ext
>>
>>              if data.dbkey not in [None, '?']:
>> @@ -230,7 +233,10 @@
>>              output_permissions =
>> trans.app.security_agent.history_get_default_permissions( history )
>>          # Build name for output datasets based on tool name and input names
>>          if len( input_names ) == 1:
>> -            on_text = input_names[0]
>> +            #We recorded the dataset name as on_text earlier...
>> +            if not on_text:
>> +                #Fall back on the shorter 'data %i' style:
>> +                on_text = input_names[0]
>>          elif len( input_names ) == 2:
>>              on_text = '%s and %s' % tuple(input_names[0:2])
>>          elif len( input_names ) == 3:
>>
>
> Would this patch be welcomed as a pull request? (Expanding
> $on_string to include the name as well as dataset number
> when there is only one input dataset)
>
> How about renaming the outputs of the conversion tools?
>
> Peter
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>   http://lists.bx.psu.edu/
>
> To search Galaxy mailing lists use the unified search at:
>   http://galaxyproject.org/search/mailinglists/
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to