[Bioperl-l] parsing tblastn using BPlite

Jason Eric Stajich jason@cgt.mc.duke.edu
Wed, 24 Oct 2001 21:56:55 -0400 (EDT)


Pretty sure that some form of this bug is fixed in current versions - we
are trying to get 1.0 finished by the end of the year, you could
alternatively run off the CVS head or download a developer's release to
get a fix for  this.



On Thu, 25 Oct 2001, Christoffels Alan wrote:

> > Hmm, which version of bioperl/BPlite are you using?
>
> $Id: BPlite.pm,v 1.14.2.5 2001/04/08 21:28:44 lapp Exp $
>
>
> Alan
>
>
> >
> > % perldoc -m Bio::Tools::BPlite | grep Id
> >
> > Will help us diagnose if this is a new or old bug.
> >
> > -jason
> > On Wed, 24 Oct 2001, Christoffels Alan wrote:
> >
> > > Hi,
> > >
> > > I am using BPlite to parse a tblastn output file containing multiple
> > > tblastn reports (~30K query sequences).
> > >
> > > WHen I count the actually reports being read by the script, I only get
> > > about 16K. Can any tell me what I am doing wrong in this script?
> > >
> > > use Bio::Tools::BPlite;
> > > use strict;
> > > my $file = $ARGV[0];
> > > my $cutoff = $ARGV[1];
> > > my $total_rec = 0;
> > > open(BLAST, "$file");
> > > {
> > > my $report = new Bio::Tools::BPlite(-fh=>\*BLAST);
> > > $total_rec++;
> > > my $QUERY = $report->query;
> > > my $rec = 0;
> > > GG:
> > > while (my $sbjct = $report->nextSbjct) {
> > > 	$rec++;
> > > 	my $SUBJ = $sbjct->name;
> > > 	while (my $hsp = $sbjct->nextHSP) {
> > > 		my $HSP = $hsp->P;
> > > 		if ($HSP < $cutoff) {
> > > 		print "$QUERY\t$SUBJ\t$HSP\n";
> > > 		last;
> > > 		}
> > > 	}
> > > 	if ($rec ==1) {
> > > 		last GG;
> > > 	}
> > > }
> > > last if ($report->_parseHeader == -1);
> > > redo;
> > > }
> > > close(BLAST);
> > > print STDERR "total records .$total_rec.\n";
> > >
> > > Alan Christoffels
> > > Institute of Molecular and Cell Biology
> > > 30 Medical Drive
> > > Singapore
> > > 117609
> > > Tel: 65-8741489
> > >
> > >
> > >
> > > _______________________________________________
> > > Bioperl-l mailing list
> > > Bioperl-l@bioperl.org
> > > http://bioperl.org/mailman/listinfo/bioperl-l
> > >
> >
> > --
> > Jason Stajich
> > Duke University
> > jason@cgt.mc.duke.edu
> >
>
> Christoffels Alan
> Institute of Molecular and Cell Biology
> 30 Medical Drive
> Singapore
> 117609
> Tel: 65-8741489
>

-- 
Jason Stajich
Duke University
jason@cgt.mc.duke.edu