[Bioperl-l] strange behavior of Bio::Tools::Run::Alignment::StandAloneFasta

Aaron Mackey ajmackey at gmail.com
Wed Apr 14 18:52:27 UTC 2010


I also wouldn't be surprised if the BioPerl code doesn't play nicely with
the newer fasta 3.6 version you're using.

-Aaron

On Tue, Apr 13, 2010 at 11:34 PM, Chris Fields <cjfields at illinois.edu>wrote:

> You should file this as a bug.  My guess is something here is checking for
> boolean context instead of defined(), so is failing when set to 0.
>
> The other issue, setting of 'q', might be unimplemented.
>
> chris
>
> On Apr 13, 2010, at 10:02 PM, Dimitar Kenanov wrote:
>
> > Hello guys,
> > i found some strange behavior of the the module
> "Bio::Tools::Run::Alignment::StandAloneFasta". I am trying to run
> "ssearch36" or "fasta36" locally and parse the report. I want to get the
> hits name, e-values, and sequences out of the report and print them to
> another file which i can process further.
> >
> > Below is the code where - $fh_dbs=file with a list of fasta libraries;
> $line=my current fasta library; $seq=my query.
> >
> > my @arg=(
> >    'E' => '0.01',
> >    'd' => '0', #problem here
> >    'H' => '',
> >    'w' => '100',
> >    'O' => "$output",
> >    'program' => 'ssearch36',
> >    );
> >
> > my $line;
> > while($line=<$fh_dbs>){
> >    chomp($line);
> >    print "DB:$line:\n";
> >
> >
> >    my $factory=Bio::Tools::Run::Alignment::StandAloneFasta->new(@arg);
> >    $factory->library($line);
> >    my @fastreport=$factory->run($seq);
> >
> >    foreach  (@fastreport) {
> >    print "Parsed fasta report:\n";
> >    my $result = $_->next_result;
> >
> >        while( my $hit = $result->next_hit()) {
> >            print "\thit name: ", $hit->name();
> >            while( my $hsp = $hit->next_hsp()) {
> >                my $e_val=$hsp->evalue;
> >                my $qseq=$hsp->query_string;
> >                my $hseq=$hsp->hit_string;
> >                print "E:$e_val:\n",
> >                print "Q-SEQ:$qseq:\n";
> >                print "HIT-SEQ:$hseq:\n";
> >
> >
> >            }
> >        }
> >    }
> > }
> >
> > Now the weird thing is that if i mark the line 'd' => '0' then i can get
> the HIT and QUERY sequences but not the E-value and if its unmarked as i
> want it then i can get the E-value but not the sequences.
> > Its strange and i dont know how to solve that problem.
> > If someone has any idea how i can go around that i would be very
> thankful.
> >
> >
> > Thanks
> > Dimitar
> >
> > PS: Another problem i found is the "q" option. Even if i pass it through
> the @arg, its not working. I still see the output on my terminal.
> >
> > --
> > Dimitar Kenanov
> > Postdoctoral research fellow
> > Protein Sequence Analysis Group
> > Bioinformatics Institute
> > A*STAR, Singapore
> > email: dimitark at bii.a-star.edu.sg
> > tel: +65 6478 8514
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list