[Bioperl-l] Alignment Blast parser

Jason Stajich jason at cgt.duhs.duke.edu
Thu Jan 22 14:50:28 EST 2004


Every blast report is a result whether or not there are any hits found.

To test if you got any hits:

 if ( $result->num_hits > 0 )  {
 }


On Thu, 22 Jan 2004, Agrin, Nathan wrote:

> Another quick question.
>
> I have about 600 blast files that I need to parse.  Some of them
> produced a file with no homology.
>
> IE:
> No significant similarity found. For reasons why, click here.
>
> Is there a way to test the data stream for these?  I've been messing
> with the $result = $in->next_result, but even on data files that have no
> homologies, perl seems to think there is still a result. (I can't just
> say something like; if($result){do this}).
>
> Nathan Agrin
> Research Associate
> UMass Medical Center
> 55 Lake Ave. N.
> Worcester MA, 01655
> (508)-856-6018
> nathan.agrin at umassmed.edu
>
>
> -----Original Message-----
> From: Jason Stajich [mailto:jason at cgt.duhs.duke.edu]
> Sent: Thursday, January 22, 2004 2:33 PM
> To: Agrin, Nathan
> Cc: Brian Osborne;
> Subject: RE: [Bioperl-l] Alignment Blast parser
>
> The code to do it is in Bio::SearchIO::Writer::TextResultWriter
> but that recapitulates a whole report from a SearchIO object not just
> the
> HSP alignment part, you'll have to dig out the code which does
> the HSP printing or post process the returned string to clip out just
> the
> part you want.
>
> -jason
>
>
> On Thu, 22 Jan 2004, Agrin, Nathan wrote:
>
> > Yes exactly
> >
> > -Nate
> >
> > -----Original Message-----
> > From: Brian Osborne [mailto:brian_osborne at cognia.com]
> > Sent: Thursday, January 22, 2004 2:24 PM
> > To: Jason Stajich; Agrin, Nathan
> > Cc: bioperl-l at bioperl.org
> > Subject: RE: [Bioperl-l] Alignment Blast parser
> >
> > Jason,
> >
> > I think he wants to print out the exact same alignment as you see in
> the
> > BLAST report, which you can't do using AlignIO.
> >
> > Nathan, do you mean "exactly", with that "Query: 2" and "Subject: 2"
> > business as well?
> >
> > Brian O.
> >
> > -----Original Message-----
> > From: bioperl-l-bounces at portal.open-bio.org
> > [mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Jason
> Stajich
> > Sent: Thursday, January 22, 2004 2:14 PM
> > To: Agrin, Nathan
> > Cc: bioperl-l at portal.open-bio.org
> > Subject: Re: [Bioperl-l] Alignment Blast parser
> >
> > You want to retain it meaning what?
> >  Bio::SearchIO(-format => 'blast')
> > parses blast for you.
> >
> > -jason
> > On Thu, 22 Jan 2004, Agrin, Nathan wrote:
> >
> > > I need a way to retain the EXACT alignment found in a blast file.
> > > Ex-
> > >
> > >
> > > Query: 1
> > MAGRGK-GKTSGKKAVSRSAKAGLQFPVGRIARYLKKGKYAERIGAGAPVYLAAVLEYLT
> > > 59
> > >            M+GRGK G  +  KA SRS++AGLQFPVGR+ R L+KG
> > YAER+GAGAPVYLAAVLEYLT
> > > Sbjct: 1
> > MSGRGKQGGKARAKAKSRSSRAGLQFPVGRVHRLLRKGNYAERVGAGAPVYLAAVLEYLT
> > > 60
> > >
> > >
> > > Query: 60
> AEVLELAGNAARDNKKNRIVPRHIQLAIRNDEELGKLLGEVTIASGGVLPNIHAVLLP
> > > 117
> > >            AE+LELAGNAARDNKK RI+PRH+QLAIRNDEEL KLLG VTIA GGVLPNI
> AVLLP
> > > Sbjct: 61
> AEILELAGNAARDNKKTRIIPRHLQLAIRNDEELNKLLGRVTIAQGGVLPNIQAVLLP
> > > 118
> > >
> > > I have tried everything to no avail.  AlignIO almost works out, but
> > > instead of doing a typical blast alignment, the best it can do is a
> > > clustalw like alignment.
> > >
> > > Any help is much appreciated.
> > >
> > > -Nate
> > >
> > > Nathan Agrin
> > > Research Associate
> > > UMass Medical Center
> > > 55 Lake Ave. N.
> > > Worcester MA, 01655
> > > (508)-856-6018
> > > nathan.agrin at umassmed.edu
> > >
> > >
> >
> > --
> > Jason Stajich
> > Duke University
> > jason at cgt.mc.duke.edu
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l
> >
> >
>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
>

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


More information about the Bioperl-l mailing list