[BioPython] BLAST/Tutorial more problems

Aaron Zschau aaron at ocelot-atroxen.dyndns.org
Fri Jul 30 14:41:14 EDT 2004


I'm still having some trouble making a section of my code copied from 
the tutorial work properly with the latest version of biopython. From 
this piece of code, I get the following error when executing the 
f_record = f_iterator.next() line



Traceback (most recent call last):
   File "cluster-debug.py", line 111, in ?
     f_record = f_iterator.next()
   File 
"/root/biopython-1.30/build/lib.linux-i586-2.2/Bio/Fasta/__init__.py", 
line 72, in next
     result = self._iterator.next()
   File 
"/root/biopython-1.30/build/lib.linux-i586-2.2/Martel/IterParser.py", 
line 152, in iterateFile
     self.header_parser.parseString(rec)
   File 
"/root/biopython-1.30/build/lib.linux-i586-2.2/Martel/Parser.py", line 
361, in parseString
     self._err_handler.fatalError(ParserIncompleteException(pos))
   File "/usr/lib/python2.2/site-packages/_xmlplus/sax/handler.py", line 
38, in fatalError
     raise exception
Martel.Parser.ParserIncompleteException: error parsing at or beyond 
character 0 (unparsed text remains)


#-----------------------------------------------------------------------
gi_list = GenBank.search_for("vhl")
ncbi_dict = GenBank.NCBIDictionary("nucleotide", "genbank")

gb_record = ncbi_dict["6273291"]
record_parser = GenBank.FeatureParser()

ncbi_dict = GenBank.NCBIDictionary("nucleotide", "genbank", parser = 
record_parser)

gb_seqrecord = ncbi_dict["6273291"]

genbank_file = open(data_path_prefix + file_unique_id + 'fasta', 'w')
genbank_file.write(gb_record)
genbank_file.close()

sys.stdout.flush()

file_for_blast = open('/var/www/html/data/a12345.fasta','r')

f_iterator = Fasta.Iterator(file_for_blast)
print "iterator created"
sys.stdout.flush()

f_record = f_iterator.next()
print "f_record created"
sys.stdout.flush()

file_for_blast.close()
#-----------------------------------------------------------------------
There seems to be a problem somewhere in the parsing of the FASTA file 
generated by the genbank lookup, however when I look at the contents of 
the fasta file, it looks fine and the formatting is the same as what I 
used in version 1.24


does anyone know what might be going on here?

thanks

Aaron Zschau



More information about the BioPython mailing list