[Bioperl-l] Blast Parser Error
Lakshmi K Matukumalli
lmatukum at gmu.edu
Tue Sep 19 16:41:09 UTC 2006
Jason Stajich wrote:
> Forwarding your question to the bioperl mailing list where it can be
> answered. Please consider making your BLAST file available one a
> website - it is bad form to mail someone a very large email attachment
> unsolicited. If you do not have access to a website where you can
> make the report avaialble you can submit this a bug at
> http://bugzilla.open-bio.org and attached a report to the bug.
>
> it is possible the PARACEL BLAST format is not parseable with latest
> code - please let the list know what version of bioperl you are using
> etc. Please test your question against the latest code in CVS as well
> before you ask others to debug this problem.
>
> -jason
>
> On 9/19/06, *Lakshmi K Matukumalli* <lmatukum at gmu.edu
> <mailto:lmatukum at gmu.edu>> wrote:
>
> Hi Jason,
>
> I am unable to get correct results with the following blast file.
> My input sequence has a repeat element so it has a number of hits.
>
> But there is only one hit with complete identity across the length
> of query.
>
> The Bioperl parser is not giving me the correct result for the
> first hit
> and first hsp.
>
> Can you please look into this and let me know if I am doing something
> wrong or
> if you have to fix the script.
>
> I am attaching the input file I used along with the script I used to
> print out the top hit.
>
> Thank you,
>
> Lakshmi Kumar
>
>
>
>
> use strict;
> use Bio::SearchIO;
>
> my $searchio = Bio::SearchIO->new(-file => ' unmasked.blast',
> -format => 'blast');
>
> while ( my $result = $searchio->next_result() ) {
> my $query_name = $result->query_name;
> my ($str);
> while( my $hit = $result->next_hit ) {
> # process the Bio::Search::Hit::HitI object
> while( my $hsp = $hit->next_hsp ) {
> # process the Bio::Search::HSP::HSPI object
> my ($qs,$qe,$hs,$he) =
> ($hsp->query->start,$hsp->query->end,$hsp->subject->start,$hsp->subject->end);
>
> my ($chr,$Bts,$Bte) = ($hit->description =~ /Bos taurus
> chromosome (.*)-FRAG\[(\d+)\,(\d+)\]/);
> $str = $query_name."\t".$chr."\t".($Bts+$hs)."\t".($Bts+$he);
> last;
> }
> last;
> }
> print $str,"\n";
> }
>
>
>
> BLASTN 1.5.4-Paracel [2003-06-05]
>
> [SNIP]
>
>
> --
> Jason Stajich
> jason at bioperl.org <mailto:jason at bioperl.org>
> http://www.duke.edu/~jes12/ <http://www.duke.edu/%7Ejes12/>
Hi Jason,
Thank you for forwarding the email. I apologize for sending the large
attachment.
I have placed the blast file here.
http://mysite.verizon.net/lmatukum/blast/unmasked.blast
You can right click and save the blast file.
Thank you,
Lakshmi Kumar
More information about the Bioperl-l
mailing list