Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192.

by roarce92 (Acolyte)
on May 25, 2020 at 15:15 UTC ( [id://11117236]=note: print w/replies, xml ) Need Help??


in reply to Re: Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192.
in thread Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192.

Hi Bliako, sorry for the delay of time. I tried your suggestion and it did not work. Could you help me with other solution to that? I'd appreciate so much. Rocío

  • Comment on Re^2: Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192.

Replies are listed 'Best First'.
Re^3: Use of uninitialized value in subroutine entry at /home/roarce/perl5/perlbrew/perls/perl-5.28.0/lib/site_perl/5.28.0/Seeder/Finder.pm line 476, <IN> line 8192.
by bliako (Monsignor) on May 25, 2020 at 16:25 UTC

    Hi Rocio, start by inserting the above print statements I suggested to the relevant Perl file and report the output. Only you can sort this out because you have the data files and you can run them to see what the debugging messages report. One of those debugging messages will cause the program to exit if there are undefined values. So watch out for that too. See also if you can run it successfully with some datafiles and if yes, what's the difference between failed and successful data files. If you could also reduce the data files to the absolute minimum it would make debugging easier. Anyway, start by inserting those debug messages, run it and let us know.

      Thanks Bliako for your suggestions. I corrected the code as you said and it worked. Could you help me to understand the results? I have two similar files. For an input file which worked well, the output is:

      While another file which does not work generates this output:

      Both files have some different titles with the same length after them (1000 digits) What it means? Thank you in advance!

      2020-06-01 Athanasius added <code> tags.

        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.

        there seem to be extra spaces in the pasted string $ # {$ self -> {oligo_ref}} compared to the original $#{ $self->{oligo_ref} }

        If you click on the [download] link under debug code you will be able to copy-paste safely.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11117236]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-25 10:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found