[Biopython-dev] SearchIO.parse HMMER3 issue

João Rodrigues anaryin at gmail.com
Thu Apr 24 23:27:29 UTC 2014


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'




More information about the Biopython-dev mailing list