[Bioperl-l] PAML parser
Chris Fields
cjfields at uiuc.edu
Fri Jul 21 12:22:01 UTC 2006
Normally when you parse a report you use a loop to iterate through
results:
while (my $result = $parser->next_result) {
# do work here
}
So returning undef is necessary to end the loop. This type of loop
construct is common in BioPerl (and in Perl in general).
There is a HOWTO for PAML:
http://www.bioperl.org/wiki/HOWTO:PAML
Chris
On Jul 21, 2006, at 4:04 AM, Michael Han wrote:
> Hi,
>
> I have some questions about the PAML parser
> (Bio::Tools::Phylo::PAML in CVS HEAD). Maybe some of you could help.
>
> If you call next_result, $self->_parse_summary might be called,
> which loops over $self->_readline .
>
> Later in next_result when "while (defined ($_=$self->_readline))"
> is used isn't the filepointer/filehandle
> already at the end of the output file and should return undef
> breaking the parsing?
>
> I added a crude seek($self->{_filehandle},0,0) after the
> _parse_summary and it seemed to work, but I wonder if I missed
> something obvious.
>
> thanks,
>
> Mike
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
Christopher Fields
Postdoctoral Researcher
Lab of Dr. Robert Switzer
Dept of Biochemistry
University of Illinois Urbana-Champaign
More information about the Bioperl-l
mailing list