I can not see anything wrong with that part of the code, unless some other more Monks can see something wrong.
So, let's see what happens at the root of the problem. Can you also do this change in same file:
for my $oligo_indice ( 0 .. $#{ $self->{oligo_ref} } ) {
# INSERT debug code below - this must be around line 474 :
for my $j (0 .. $#{ $self->{hd_matrix_ref}->[$oligo_indice] }
+){
die "problem with hd_matrix_ref index '$oligo_indice/$j'"
+unless defined $self->{hd_matrix_ref}->[$oligo_indice][$j];
}
# END insert debug code
$hd_sum[$oligo_indice] =
List::Util::sum( @{ $self->{hd_matrix_ref}->[$oligo_indice
+] } );
}
EDIT: for clearer output, for the moment, can you edit the PREVIOUS debug code to comment-out all print statements? But leave the die there. It should now be:
for my $oligo_indice ( 0 .. $#{ $self->{oligo_ref} } ) {
#print "index: $oligo_indice (";
for my $count_indice ( 0 .. $#{ $self->{count_matrix_ref} } ) {
if( ! defined $hd_matrix[$oligo_indice][$count_indice] ){ die "prob
+lem at [$oligo_indice][$count_indice]" }
#print $hd_matrix[$oligo_indice][$count_indice].","
}
#print "\n";
}
Can you please edit your last 2 posts and wrap the info you provided within code tags c and /c (i.e. the long output lines and error messages) in <readmore> </readmore> tags.