Hi Marius,

I hope you don't mind, but I went ahead and pulled your change in as https://github.com/galaxyproject/galaxy/pull/199, since there's a bit of backport-fixing required to get this applied correctly.

-Dannon

On Thu, Apr 30, 2015 at 2:37 PM Dannon Baker <dannon.baker@gmail.com> wrote:
Hi Marius,

It'd be great if you wanted to submit a PR for the json issue separately -- I can confirm that that's a working fix.  I'll let someone else speak to the tool change.

-Dannon

On Thu, Apr 30, 2015 at 2:30 PM Marius van den Beek <m.vandenbeek@gmail.com> wrote:
Hello all,

Not sure if the mailing list or trello would be appropriate for this.
I had a problem using the gff_filter_by_attribute tool, both locally and on usegalaxy.org.
Neither filtering for GTF or GFF were working. 

The error message was:
Traceback (most recent call last):
  File "/home/galaxy/galaxy-dist/lib/galaxy/jobs/runners/__init__.py", line 158, in prepare_job
    job_wrapper.prepare()
  File "/home/galaxy/galaxy-dist/lib/galaxy/jobs/__init__.py", line 832, in prepare
    self.command_line, self.extra_filenames = tool_evaluator.build()
  File "/home/galaxy/galaxy-dist/lib/galaxy/tools/evaluation.py", line 408, in build
    self.__build_command_line( )
  File "/home/galaxy/galaxy-dist/lib/galaxy/tools/evaluation.py", line 424, in __build_command_line
    command_line = fill_template( command, context=param_dict )
  File "/home/galaxy/galaxy-dist/lib/galaxy/util/template.py", line 9, in fill_template
    return str( Template( source=template_text, searchList=[context] ) )
  File "/home/galaxy/galaxy-dist/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Template.py", line 1004, in __str__
    return getattr(self, mainMethName)()
  File "DynamicallyCompiledCheetahTemplate.py", line 92, in respond
NotFound: cannot find 'attribute_types' while searching for 'input.metadata.attribute_types'

I could fix it by importing safe_dumps from galaxy.util.json, which apparently was not imported.
The next problem occurred because gff_filter_by_attribute expects GTF attribute name-value separators (" ") but allowed GFF input, which uses ("=") as separator. I added a logic to switch
between seperators based on the file extension. Everything works smoothly now,
the code changes are here:
Should I create a pull request?

--
Marius van den Beek, PhD

Drosophila Genetics and Epigenetics
Institut de Biologie Paris Seine
9, Quai St Bernard, Boîte courrier 24
75252 Paris Cedex 05
Tel +33 01 44 27 34 01


___________________________________________________________
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:
  https://lists.galaxyproject.org/

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