[Biopython-dev] SearchIO.parse HMMER3 issue

Wibowo Arindrarto w.arindrarto at gmail.com
Thu Apr 24 23:36:07 UTC 2014


Hi Joao,

Yes, this is a known issue with version 3.1b1. And indeed, the cause
is the '[ok]' line (just one last line in the file). I haven't
finished testing some cases (and I intended to add proper support for
3.1 ~ a.ka. nhmmer + nhmmscan ~ with the update), so my updates for
this has not been up (probably sometime next week, not guaranteeing
anything though..). But if you need a quick solution, removing the
'[ok]' line fixes the problems in my case.

Which reminds me, I think I need to properly track this issue in our
issue tracker :). There is an earlier post reporting this issue
(http://permalink.gmane.org/gmane.comp.python.bio.general/8027), but I
think we ended up emailing privately (where I mentioned this issue).

Anyway, thanks for the report.

Cheers,
Bow

On Fri, Apr 25, 2014 at 1:27 AM, João Rodrigues <anaryin at gmail.com> wrote:
> Hi all,
>
> I downloaded HMMER3.1b today and tried to use the SearchIO module to parse
> the results. I ran into a weird error, something to do with a regex.
>
> The problem seems to be that after the '//' line, there is another line
> with '[ok]' that breaks the parser. I'm running HMMER with pretty much
> default options so I guess something might have changed in the latest
> version or something weird is happening here with mine?
>
> Cheers,
>
> João
>
> Traceback (most recent call last):
>   File "do_hmmer.py", line 99, in <module>
>     results = SearchIO.read(ali_fname, 'hmmer3-text')
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/SearchIO/__init__.py",
> line 363, in read
>     second = next(generator)
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/SearchIO/__init__.py",
> line 316, in parse
>     yield qresult
>   File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
>     self.gen.throw(type, value, traceback)
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/File.py",
> line 77, in as_handle
>     yield fp
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/SearchIO/__init__.py",
> line 315, in parse
>     for qresult in generator:
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/SearchIO/HmmerIO/hmmer3_text.py",
> line 47, in __iter__
>     for qresult in self._parse_qresult():
>   File
> "/home/software/python-libs/lib64/python2.6/site-packages/Bio/SearchIO/HmmerIO/hmmer3_text.py",
> line 110, in _parse_qresult
>     qid = regx.group(1).strip()
> AttributeError: 'NoneType' object has no attribute 'group'
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev




More information about the Biopython-dev mailing list