Subject: | Bug in treecluster |
I found some errant warning messages when trying to run Algorithm::Cluster::treecluster. I was invoking a call to tree cluster as follows:
my %params = (
applyscale => 0,
transpose => 0,
method => 'a',
dist => 'e',
data => \@distance,
mask => '',
weight => '',
);
Running the code produced several warning messages. I eventually traced the messages to validity tests for mask and weight. The mask message is located on about line 192:
module_warn("Parameter 'mask' is not a valid matrix, ignoring it.");
There was a similar warning for the weight validity test. I corrected the problem by wrapping the weight and mask validity tests with an 'unless':
unless ($param->{mask} eq '' )
{