[Bioperl-l] Re: blast.pl parsing

Steve Chervitz sac@bioperl.org
Wed, 30 Jan 2002 02:09:12 -0800 (PST)


Seth,

I noticed you are calling seq_inds('sbjct', 'id') on the HSP object, which returns a
list of all of all positions in the sbjct sequence that have an identical match to
the query. Is this really what you want, or do you simply want the start, end range
on the sbjct sequence? If the start, end will do, you can use BPlite, as Jason
suggests. Otherwise, BPlite does not provide anything equivalent to the seq_inds()
method of Bio::Tools::Blast::HSP, so you'll have to stick with it for the time
being.

Incidentally, the reason why you're only getting one HSP is because you're calling
the hsp() method on the hit instead of iterating over all HSPs using the hsps()
method. hsp() returns just the top HSP.

Steve 

Steve Chervitz
sac@bioperl.org

--- Seth Redmond <seth_redmond@hotmail.com> wrote:
> I'm trying to parse from an NCBI blast file such that I can get the 
> positions of hsp's on the subject strand.
> 
>       $blast = Bio::Tools::Blast->new('-file'   => $infile,
> 	     					'-signif' => 1e-5,
> 	     						'-parse'  => 1,
> 							     '-stats'  => 1,
> 							     '-check_all_hits' => 1, );
> 
> 	     $num_hits =  $blast->num_hits;
> 	     for ($j=0; $j<=($num_hits-1); $j++)
> 	     			{
> 				     @matches = $hits[$j]->hsp->seq_inds('sbjct', 'id');
>          ...etc
> 
> Although I can get to each hit (that is, each different matching strand in 
> my database) I am having problems where there is more than one match on the 
> same sequence, in that the script only parses out the first match.
> 
> any advice would be much appreciated.
> 
> Seth Redmond
> 
> 
> 
> _________________________________________________________________
> Join the world’s largest e-mail service with MSN Hotmail. 
> http://www.hotmail.com
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com