Fw: [Bioperl-l] PBbl2seq Object

Jason Stajich jason@chg.mc.duke.edu
Tue, 17 Jul 2001 09:34:29 -0400 (EDT)


On Tue, 17 Jul 2001, Holger Tupath wrote:

> Hello Jason,
> thanx for answering!

> The file I want to parse with bl2seq contains multiple alignments in the 
> same report. It was created by simply running bl2seq with two input 
> FASTA sequences, that are similar to some degree.

> I´m running the standart distribution of bioperl version 0.7 .

okay, you'll have to upgrade to the current version of the code to really
do this or (sigh) wait for the developer's release to be out by end of
August.

BTW there is a bugfix release 0.7.2 that is out on the ftpsite
although not released to CPAN just yet because Ewan has been very busy.
It is essentially the same as the available 0.7.1 release except for 2 
minor bugfixes and some documentation updates.

It does not contain code to do the snippet below, but does have some
basic improvements to modules.

> It would be great if you can send me a script  to explain, how I can get 
> the other alignmnents from the report(using BPbl2seq), because so far I 
> have no idea how this could be accomplished .
> 

So an example:
(Peter S is a good person to ask too.)

If you wanted to just get all the HSPs, 
  my $report = Bio::Tools::BPbl2seq->new(-file => 't/bl2seq.out');
  $report->sbjctName;
  $report->sbjctLength;

 while( my $hsp = $res->next_feature )
 {
         $hsp->score;
         $hsp->bits;
         $hsp->percent;
         $hsp->P;
         $hsp->match;
         $hsp->positive;
         $hsp->length;
	 $hsp->querySeq;
	 $hsp->sbjctSeq;
	 $hsp->homologySeq;
	 $hsp->query->start;
	 $hsp->query->end;
	 $hsp->sbjct->start;
	 $hsp->sbjct->end;
	 $hsp->sbjct->seqname;
# $exon is some other feature initialized in a different part of the code
	 $hsp->sbjct->overlaps($exon);


 }

As for how to help you do this with the 0.7 branch of code, I'm not sure
how that could be done at this point.  Can have you drop in the current
version of the BPbl2seq module into your distro or show you how to
checkout the current version of the code.  

Others may have ideas?

> cu
> 
> Holger
> 
> 
> 
> 
> 
> Jason Stajich wrote:
> 
> >----- Original Message -----
> >From: "Jason Stajich" <jason@chg.mc.duke.edu>
> >To: <holger@tupath.de>; <'bioperl-l@bioperl.org'>
> >Sent: Monday, July 16, 2001 10:25 AM
> >Subject: Re: [Bioperl-l] PBbl2seq Object
> >
> >
> >>Is this 2 separate reports concatenated together or just multiple
> >>
> >alignments
> >
> >>for the same report?
> >>
> >>There is a reported bug (jitterbug #940) to handle multiple alignments in
> >>the same report.  We have fixed on the main trunk but the fix is not in
> >>
> >the
> >
> >>0.7 branch because it required an interface change.
> >>http://bio.perl.org/bioperl-bugs/Fixed-Bugs?id=940
> >>
> >>If you are running off bioperl-live main trunk code this may need to be a
> >>new bug submission as I don't see anything like this in the queue.
> >>
> >>In the meantime you'll probably want to write a little script that
> >>preprocesses the bl2seq data and creates a separate file/filehandle for
> >>
> >each
> >
> >>report.  Can show you how to do that if you aren't sure what to do.
> >>
> >>This will be something that I'll be sure and bring up at BOSC to see if we
> >>are handling correctly.
> >>
> >>-Jason
> >>
> >>----- Original Message -----
> >>From: "Holger Tupath" <holger@tupath.de>
> >>To: <'bioperl-l@bioperl.org'>; <ioperl-l@bioperl.org>
> >>Sent: Friday, July 13, 2001 6:13 AM
> >>Subject: [Bioperl-l] PBbl2seq Object
> >>
> >>
> >>>Hi,
> >>>I want to use the PBbl2seq Object to parse an output file from bl2seq.
> >>>The module works fine for the first entry in the output file, but how do
> >>>
> >I
> >
> >>>get the data for the next entry ?
> >>>
> >>>Does anybody have an example script ?
> >>>
> >>>
> >>>
> >>>
> >>>This code snippet prints all the data in the object, after creation from
> >>>
> >>the
> >>
> >>>output file. (prints the first entry in the file)
> >>>
> >>>#!/usr/bin/perl
> >>>
> >>>use Bio::Tools::BPbl2seq;
> >>>my $report = Bio::Tools::BPbl2seq->new(-file => 'blast_output');
> >>>
> >>>
> >>>print "match() -> ".$report->match()."\n";
> >>>print "P() -> ".$report->P()."\n";
> >>>print "percent() -> ".$report->percent()."\n";
> >>>print "positive() -> ".$report->positive()."\n";
> >>>print "score() -> ".$report->score()."\n";
> >>>print "bits() -> ".$report->bits()."\n";
> >>>print "query() -> ".$report->query()."\n";
> >>>
> >>>print "querySeq() -> ".$report->querySeq()."\n";
> >>>print "sbjctSeq() -> ".$report->sbjctSeq()."\n";
> >>>print "homologySeq() -> ".$report->homologySeq()."\n";
> >>>
> >>>print "qs() -> ".$report->qs()."\n";
> >>>print "ss() -> ".$report->ss()."\n";
> >>>print "hs() -> ".$report->hs()."\n";
> >>>
> >>>
> >>>thanx !
> >>>
> >>>
> >>>Holger
> >>>
> >>>_______________________________________________
> >>>Bioperl-l mailing list
> >>>Bioperl-l@bioperl.org
> >>>http://bioperl.org/mailman/listinfo/bioperl-l
> >>>
> >>
> >
> >_______________________________________________
> >Bioperl-l mailing list
> >Bioperl-l@bioperl.org
> >http://bioperl.org/mailman/listinfo/bioperl-l
> >
> 
> 
> 
> 

Jason Stajich
jason@chg.mc.duke.edu
Center for Human Genetics
Duke University Medical Center 
http://www.chg.duke.edu/