[Biopython] Exonerate Parser Error

Zheng Ruan zruan1991 at gmail.com
Thu Mar 20 20:21:23 UTC 2014


Hi,

I'm trying to use Bio.SearchIO to parse a file generated by exonerate. It
is a pairwise alignment between a protein sequence and nucleotide sequence.
I notice that if I put the protein sequence first, SearchIO can happily
parse the file, but if the nucleotide sequence comes first, it will raise
an error.

Here is an example exonerate output that failed the parser:

Command line: [exonerate --showvulgar no --showalignment yes nuc.fa pro.fa]
Hostname: [localhost.localdomain]

C4 Alignment:
------------
         Query: dna
        Target: protein
         Model: ungapped:dna2protein
     Raw score: 214
   Query range: 2 -> 116
  Target range: 314 -> 352

   3 : CAGTCCGTTCCNAAAAGGCCCGCTGGCTCTGTGCAGAATCCTGTCTATCACAATCAGCCTCTGA :
 66
       GlnSerValProLysArgProAlaGlySerValGlnAsnProValTyrHisAsnGlnProLeuA
       ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 315 : GlnSerValProLysArgProAlaGlySerValGlnAsnProValTyrHisAsnGlnProLeuA :
336

  67 : ACCCCGCGCCCAGCAGAGACCCACACTACCAGGACCCCCACAGCACTGCA : 116
       snProAlaProSerArgAspProHisTyrGlnAspProHisSerThrAla
       ||||||||||||||||||||||||||||||||||||||||||||||||||
 337 : snProAlaProSerArgAspProHisTyrGlnAspProHisSerThrAla : 352

-- completed exonerate analysis


Here is the error I get:

>>> from Bio.SearchIO import read
/home/rz/code/biopython/Bio/SearchIO/__init__.py:213:
BiopythonExperimentalWarning: Bio.SearchIO is an experimental submodule
which may undergo significant changes prior to its future official release.
  BiopythonExperimentalWarning)
>>> p = read('nuc_pro.exn', 'exonerate-text')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rz/code/biopython/Bio/SearchIO/__init__.py", line 359, in read
    first = next(generator)
  File "/home/rz/code/biopython/Bio/SearchIO/__init__.py", line 316, in
parse
    for qresult in generator:
  File "/home/rz/code/biopython/Bio/SearchIO/ExonerateIO/_base.py", line
235, in __iter__
    for qresult in self._parse_qresult():
  File "/home/rz/code/biopython/Bio/SearchIO/ExonerateIO/_base.py", line
361, in _parse_qresult
    hsp = _create_hsp(prev_hid, prev_qid, prev['hsp'])
  File "/home/rz/code/biopython/Bio/SearchIO/ExonerateIO/_base.py", line
187, in _create_hsp
    frags = _adjust_aa_seq(frags)
  File "/home/rz/code/biopython/Bio/SearchIO/ExonerateIO/_base.py", line
41, in _adjust_aa_seq
    assert frag.query_strand == 0
AssertionError


Thanks,
Zheng Ruan



More information about the Biopython mailing list