in reply to Re^2: Population of HoAoA based on file contents
in thread Population of HoAoA based on file contents

Thanks for your further help on this. I feel like I'm almost there, but not quite.. I made the changes you suggested, but I'm still getting errors starting at the line

next unless scalar @{ $data{$id}[$window] } >= 2;

The error is:

Can't use an undefined value as an ARRAY reference

Is this referring to $window? Regarding the way I was using it above, was $window the outer array that holds all the smaller arrays? Even if this is true, I don't see why I'm getting the error messages I'm getting.

Replies are listed 'Best First'.
Re^4: Population of HoAoA based on file contents
by state-o-dis-array (Hermit) on May 25, 2012 at 14:35 UTC
    Hmm, based on your expectation for your data, I'm guessing what you probably need is to add:
    next unless ref( $data{$id}[$window] ) eq "ARRAY";
    just before the line getting the error.

      That appears to have fixed that problem. However, now I'm getting errors from the module:

      Can't call method "isa" on unblessed reference at /usr/local/share/per +l/5.14.2/Bio/PopGen/Statistics.pm line 901, <GEN0> line 182.

      I went back and re-ran my simpler code from earlier (i.e. where I just passed a file without building windows), and I'm now getting a similar error on this too, whereas before it successfully gave me output.

      This is very strange, so I'll have to investigate further to see how to proceed.

        Hi again. I don't know if anyone can give me suggestions on this. I've been trying to work out what's going on here.

        I'm getting the following error message.. :

        Can't call method "isa" on unblessed reference at /usr/local/share/per +l/5.14.2/Bio/PopGen/Statistics.pm line 901, <GEN0> line 182.

        ..when I re-run my earlier, smaller, no-windows script. I am 99% certain that I successfully ran this script earlier, and got some statistics back.

        When I run my new, larger script with the 100kb windows, that you guys helped me with, I get a different error:

        Can't call method "isa" without a package or object reference at /usr/local/share/perl/5.14.2/Bio/PopGen/Statistics.pm line 901.

        Is this a problem with my own code, or with the module that the errors are originating from?