[Bioperl-l] Can Bio::SearchIO::psl.pm parse BlastZ output?

Jason Stajich jason at cgt.duhs.duke.edu
Wed Dec 10 17:14:36 EST 2003


On Wed, 10 Dec 2003, Feng Sun wrote:

> Hi Folks,
>
> I am using Bioperl1.303 to parse BlastZ(blastz-2003-05-14.tar.gz) output.
> But it looks like the psl.pm treat blastz file as psl file.

I'm confused - you are using the psl format SearchIO module and you're
wondering why you need to pass in psl format data?

You need to run lavToPsl to turn the blastz output into psl, as we don't
make an effor to parse BLASTZ's lav natively.
(http://www.cse.ucsc.edu/~kent/src/unzipped/hg/mouseStuff/lavToPsl/)

The -program_name => 'BLASTZ' is a convience for the type of features that
are created (source_tag is getting filled with $program_name).

[From mail message where I introduced the SearchIO::psl module
http://portal.open-bio.org/pipermail/bioped-l/2003-August/000016.html]

[Bio::SearchIO]
Added some more SearchIO parsers.  Borrowing from Bala's Tools::Blat
impelementation I made a SearchIO::psl parser which can parse PSL output.
It needs to be tweaked a little more to skip the header lines if they are
produced but works for me for output from Jim's lav2Psl code.


>
> Here is how I create the SearchIO object:
>
> $searchin = new Bio::SearchIO( -file => $file,
>                                         -format => 'psl',
>                                         -program_name => 'BLASTZ'  );
>
> Here is the error message:
>
> Argument "" isn't numeric in addition (+) at
> /usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/psl.pm line 191, <GEN2> line
> 1.
> Argument "#:lav" isn't numeric in addition (+) at
> /usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/psl.pm line 191, <GEN2> line
> 1.
> Use of uninitialized value in addition (+) at
> /usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/psl.pm line 191, <GEN2> line
> 1.
> Use of uninitialized value in division (/) at
> /usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/psl.pm line 191, <GEN2> line
> 1.
> Illegal division by zero at
> /usr/lib/perl5/site_perl/5.6.1/Bio/SearchIO/psl.pm line 191, <GEN2> line
> 1.
>
> Here is line 191 in psl.pm:
>        my $score   = sprintf "%.2f", ( 100 * ( $matches + $mismatches +
> $rep_matches ) / $q_length );
>
> The "$matches", "$mismatches" and "$rep_matches" are all fields in psl
> files. Also, I can't find anything in psl.pm indicating that it use the
> "-program_name => 'BLASTZ'" information to treat BlastZ files differently.
>
> Has anyone used this module to parse BlastZ output correctly? If yes,
> which version of Bioperl are you using? Thanks for your help!
>
>

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


More information about the Bioperl-l mailing list