[BioPython] Genbank parser.

Cristian S. Rocha crocha at dc.uba.ar
Sat Aug 14 12:34:00 EDT 2004


hi,

Trying to parse genbank files with Martel parser I found with the
following problems:

1) The parser can't read files with white lines at the begin/end of the
file.
2) The parser can't read files with more than one record.

I'm using an updated source from the CVS.

To solve that problems I was change the file Bio/expressions/genbank.py
in the following way:

append before the format parser definition:

header_lines = Martel.Rep(
             Martel.ToEol() + \
	     Martel.AssertNot(Martel.Str("LOCUS "))
	     )

and change the format definition to:

format = Martel.HeaderFooter("genbank", {"format" : "genbank"},
		header_lines, RecordReader.Until, ("LOCUS ",),
                record, RecordReader.StartsWith, ("LOCUS ",),
		header_lines, RecordReader.Everything, ())

bye,
Cristian.

-- 
Lic. Cristian S. Rocha <crocha at dc.uba.ar>
Departamento de Computación,
Facultad de Ciencias Exactas y Naturales,
Universidad de Buenos Aires.



More information about the BioPython mailing list