[Biopython-dev] [Bug 2872] New: Genbank parser breaks on VectorNTI generated genbank file

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Mon Jul 6 18:55:52 EDT 2009


http://bugzilla.open-bio.org/show_bug.cgi?id=2872

           Summary: Genbank parser breaks on VectorNTI generated genbank
                    file
           Product: Biopython
           Version: 1.51b
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: tsham at lbl.gov


The GenBank parser dies while parsing VectorNTI generated genbank files.
VectorNTI *sometimes* generates a file with no date string at position 65,
which causes this. 

It is true that this is a non-standard genbank file, but since VectorNTI is a
commonly used program, it would be nice for BioPython to handle this case.

Sample session:
>>> import Bio
>>> Bio.__version__
'1.51b'
>>> fh = open("pBbA1a-RFP.gb")
>>> from Bio.GenBank import RecordParser
>>> rp = RecordParser()
>>> result = rp.parse(fh)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "Bio/GenBank/__init__.py", line 172, in parse
    self._scanner.feed(handle, self._consumer)
  File "Bio/GenBank/Scanner.py", line 370, in feed
    self._feed_first_line(consumer, self.line)
  File "Bio/GenBank/Scanner.py", line 820, in _feed_first_line
    'LOCUS line does not contain - at position 65 in date:\n' + line
AssertionError: LOCUS line does not contain - at position 65 in date:
LOCUS       pBbA1a-RFP   4252 bp    DNA   circular            

>>>


-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Biopython-dev mailing list