Dominic Rose | 22 Aug 15:32
Favicon

Bio::Align::DNAStatistics.pm

Hi,

just a short suggestion to improve the code:

in function

sub _build_nt_matrix()

one finds the following lines:

         my $ti_index = $NucleotideIndexes{$ti};
         my $tj_index = $NucleotideIndexes{$tj};

         if( ! defined $ti_index ) {
             print "ti_index not defined for $ti\n";
             next;
         }

However, it should be possible to stop/silence the printing of that 
error message. Many alignments contain N's what causes many many
"ti_index not defined for N" messages. That should be avoidable.

Thanks,
Dominic

--

-- 
Dominic Rose
Professur für Bioinformatik
Institut für Informatik
Universität Leipzig
(Continue reading)

Heikki Lehvaslaiho | 27 Aug 08:23

Re: Bio::Align::DNAStatistics.pm

Dominic,

You are absolutely right. 

I've changed 'print' into '$self->warn' in the SVN. Now it is possible to set 
$object->verbose(-1) to silence the warning or, if deemed necessary, set 
$object->verbose(2) and catch the error with an eval statement.

Thanks for reporting this,

    -Heikki

On Friday 22 August 2008 15:35:21 Dominic Rose wrote:
> Hi,
>
> just a short suggestion to improve the code:
>
> in function
>
> sub _build_nt_matrix()
>
> one finds the following lines:
>
>          my $ti_index = $NucleotideIndexes{$ti};
>          my $tj_index = $NucleotideIndexes{$tj};
>
>          if( ! defined $ti_index ) {
>              print "ti_index not defined for $ti\n";
>              next;
>          }
(Continue reading)


Gmane