[Biopython-dev] Parser problem with blastpgp v. 2.0.13?
Jeffrey Chang
jchang at SMI.Stanford.EDU
Mon Oct 2 00:16:20 EDT 2000
Hi Iddo,
Yes, there's definitely a bug here. The problem is that the master-slave
alignment code wasn't built with PSI-BLAST in mind. When it encounters a
master-slave alignment, it keeps on parsing until it finds the database
section. Unfortunately, this breaks with PSI-BLAST, since it generates
many alignments in a single run.
The fix, as Brad noted, is to allow the masterslave code to recognize
psi-blast output. This has been checked in and will go into the next
developmental release.
Thanks for the report and the fix!
Jeff
On 1 Oct 2000, Brad Chapman wrote:
> Iddo wrote:
> > I already submitted a bug report (#16). Basically, i cannot seem to
> > work the NCBIStandalone parser with the output I get. I did run it on
> > similar btXXX files, and that seemed to go well.
> >
> > I am using blastpgp V 2.0.13
>
> Hmmm... I took a quick look at this, and I think this is the problem. It
> looks from the comments that Jeff has only tested this with v 2.0.10 and
> v 2.0.11 so it looks like the output has changed somewhat (of course!).
>
> I think the problem is that _scan_masterslave_alignment isn't figuring
> out that it should stop reading alignments, so it is trying to convert
> '....' into an integer, which obviously didn't work so hot.
>
> The new break between between rounds is a Searching.... line, instead of
> the Database line that _scan_masterslave_alignment is looking for, so if
> you add a check to break on finding Searching..., then the parse seems to
> complete okay.
>
> I was playing with this to look at the results, and it also looks like
> the record isn't giving up the data from the multiple alignments, so I
> also had a quick patch to fix this.
>
> Here are the patches, against CVS, that seem to make things look okay for
> me. Jeff is the master of Blast, so it is up to him to approve these (or
> let me know where I went wrong :-). Hope this helps.
>
> Brad
>
> *** NCBIStandalone.py.orig Sun Oct 1 18:36:01 2000
> --- NCBIStandalone.py Sun Oct 1 19:47:27 2000
> ***************
> *** 329,335 ****
> consumer.start_alignment()
> while 1:
> line = safe_readline(uhandle)
> ! if line[:10] == ' Database':
> uhandle.saveline(line)
> break
> elif is_blank_line(line):
> --- 329,340 ----
> consumer.start_alignment()
> while 1:
> line = safe_readline(uhandle)
> ! # PSIBlast 2.0.13 appears to have a Searching... line after
> ! # rounds instead of a Database line
> ! if line[:9] == 'Searching':
> ! uhandle.saveline(line)
> ! break
> ! elif line[:10] == ' Database':
> uhandle.saveline(line)
> break
> elif is_blank_line(line):
> ***************
> *** 1178,1184 ****
> _AlignmentConsumer.end_alignment(self)
> if self._alignment is not None:
> self._round.alignments.append(self._alignment)
> ! elif self._multiple_alignment is not None:
> self._round.multiple_alignment = self._multiple_alignment
>
> def end_hsp(self):
> --- 1183,1189 ----
> _AlignmentConsumer.end_alignment(self)
> if self._alignment is not None:
> self._round.alignments.append(self._alignment)
> ! if self._multiple_alignment is not None:
> self._round.multiple_alignment = self._multiple_alignment
>
> def end_hsp(self):
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev
>
More information about the Biopython-dev
mailing list