abims-sbr / galaxy-blastvisu

Visualisation for Blast XML outputs under Galaxy
http://abims.sb-roscoff.fr/
0 stars 1 forks source link

'NoneType' Error from mako file #3

Open MatthewRalston opened 7 years ago

MatthewRalston commented 7 years ago

I encountered the following after uploading a blast+ 2.2.28 XML file.

Module weberror.evalexception.middleware:364 in respond          view
>>  app_iter = self.application(environ, detect_start_response)
Module paste.recursive:84 in __call__          view
>>  return self.application(environ, start_response)
Module galaxy.web.framework.middleware.remoteuser:148 in __call__          view
>>  return self.app( environ, start_response )
Module paste.httpexceptions:633 in __call__          view
>>  return self.application(environ, start_response)
Module galaxy.web.framework.base:133 in __call__          view
>>  return self.handle_request( environ, start_response )
Module galaxy.web.framework.base:191 in handle_request          view
>>  body = method( trans, **kwargs )
Module galaxy.web.framework.decorators:68 in decorator          view
>>  return func( self, trans, *args, **kwargs )
Module galaxy.webapps.galaxy.controllers.visualization:751 in render          view
>>  self._handle_plugin_error( trans, visualization_name, exception )
Module galaxy.webapps.galaxy.controllers.visualization:749 in render          view
>>  return plugin.render( trans=trans, embedded=embedded, **kwargs )
Module galaxy.visualization.plugins.plugin:138 in render          view
>>  return self._render( render_vars, trans=trans, embedded=embedded )
Module galaxy.visualization.plugins.plugin:237 in _render          view
>>  return trans.fill_template( template_filename, template_lookup=self.template_lookup, **render_vars )
Module galaxy.web.framework.webapp:811 in fill_template          view
>>  return self.fill_template_mako( filename, **kwargs )
Module galaxy.web.framework.webapp:825 in fill_template_mako          view
>>  return template.render( **data )
Module mako.template:296 in render          view
>>  return runtime._render(self, self.callable_, args, data)
Module mako.runtime:660 in _render          view
>>  **_kwargs_for_callable(callable_, data))
Module mako.runtime:692 in _render_context          view
>>  _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
Module mako.runtime:718 in _exec_template          view
>>  callable_(context, *args, **kwargs)
Module blastvisu_mako:323 in render_body          view
>>  TABD[Name] += descri(hsp,Seq,hit_id,Db,Name,end,start)
Module blastvisu_mako:218 in descri          view
>>  SeqN,h_id,ID,hit_cmd = sequenceName(Seq,hit_id,Db)
Module blastvisu_mako:126 in sequenceName          view
>>  IDs = re.search("\([A-Za-z0-9\.]*\)", Seq).group(0).strip()
AttributeError: 'NoneType' object has no attribute 'group'
MatthewRalston commented 7 years ago

Even with the blast+ 2_5_0 Galaxy package, peterjc's blast wrappers, and a successful install of blastvisu, I cannot get the Nonetype error to resolve. @bgruening can you recommend a solution?

MatthewRalston commented 7 years ago

After inspection of the mako file, it seems that this is do to highly specific regex parsing of the hit_def. It would be very useful if the "else" branch of sequenceName were more permissive. This does not work with non-uniprot blast query hits since the regex can fail so easily.

bgruening commented 7 years ago

@MatthewRalston anything I can help here? It really seems like a to strict parsing rule.

MatthewRalston commented 7 years ago

I have forked this repo and worked on the parsing.