[Bioperl-l] Bio::SearchIO::XML::BlastHandler problems

Fields, Christopher J cjfields at illinois.edu
Fri Feb 17 19:11:48 UTC 2012


I'm not sure what you mean. Do you mean the installed assembler is using a specific version of BioPerl than what you have installed elsewhere (e.g. there are two local versions)?  

If so, it's possible the two versions are somehow getting mixed up (odd that it would happen, though).  You can probably add a 'use lib PATH' directive in the script to be more explicit.

BLAST XML parsing requires two different parsing mechanisms based upon the type of BLAST run (PSI-BLAST or normal BLAST); older versions of bioperl prior to 1.6 lacked this, though it's possible the last release in the 1.5 series did have it, not sure.

chris

On Feb 15, 2012, at 1:43 PM, Rondon Neto wrote:

> sorry, I didn't ask anything. So..
> 
> 
> Can anyone help me to solve it?
> 
> thanks again
> 
> Rondon
> 
> 
> 
> ________________________________
> De: Rondon Neto <rondonbio at yahoo.com.br>
> Para: "Bioperl-l at lists.open-bio.org" <Bioperl-l at lists.open-bio.org> 
> Enviadas: Quarta-feira, 15 de Fevereiro de 2012 16:59
> Assunto: [Bioperl-l] Bio::SearchIO::XML::BlastHandler problems
> 
> Hello everybody,
> unffortunally I'm having problems with Bio::SearchIO, that I wasn't having before. Perl is returning this to me:
> " Can't locate object method "_eventHandler" via package "Bio::SearchIO::XML::BlastHandler" at /usr/local/share/perl/5.10.1/Bio/SearchIO/blastxml.pm line 151. "
> 
> I believe it's happening because I installed a genome assembler that use a different version of Bio::SearchIO that I have before.
> 
> 
> thank you,
> 
> Rondon
> 
> the subroutine that use this module is above:
> 
> sub nucleotide_coverage{
> #Bio::SearchIO dependent
> #This subroutine returns a Hash and a file with nucleotide coverage
> #for each query in an blast alignment xlm file. The input is the
> #alignment file and the name of output (just the index).
> #USAGE:::  $ref = nucleotide_coverage("blast.xml",
> "gene_family");
> 
>         my ($alignment_file, $gene_family) = @_;
> 
> 
>         my $alignment = new Bio::SearchIO ( -format => 'blastxml',
>                                             -file   => $alignment_file );
> 
>         print "Parseando o resultado do BLAST\n";
>         my %positions;
>         my @used_reads;
>         open OUT, ">reads_per_CDS.txt";
>         while (my $result = $alignment->next_result) {
>                 my $query_name = $result->query_name();
>                 my $tam = $result -> query_length();
>                
> for (0..$tam-1){ ${$positions{$query_name}}[$_] = 0 }
>                 while (my $hit = $result->next_hit) {
>                         my $hit_name = $hit->name;
>                         LABEL:
>                         foreach my $read (@used_reads) {
>                                 if ( $read eq $hit_name ) {
>                                         next LABEL;
>                                 }
>                  
>       }
>                         print OUT "$query_name\t$hit_name\n";
>                         while (my $hsp = $hit->next_hsp) {
>                                 my $query_name = $result->query_name();
>                                 my @pos = $hsp->seq_inds('query','identical');
>                                 foreach my $num (@pos) {
>                                         ${$positions{$query_name}}[$num-1]++;
>            
>                     }
>                         }
>                 push (@used_reads, $hit_name);
>                 }
>         }
>         close OUT;
> 
>         my $outfile = "nucleotide_coverage.txt";
>         open OUT, ">$outfile" or die $!;
>         foreach my $key (keys %positions){
> 
>                 print OUT "$key\t@{$positions{$key}}\n";
>         }
> 
>         close OUT;
> 
>         return \%positions;
> 
> }
> 
> _______________________________________________
> 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