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

So you want (?):
$data{HG00554}[162] = (0 0, 0 0, ... , 0 0 )
I'm hoping you've come to understand why you don't want to use the shift in:
$data{$individual}[ [ shift @snp_bins ] ] = $snp;
Assuming so, you could do something like:
for my $index ( 0 .. $#snp_bins ){ push( @{$data{HG00554}[$snp_bins[$index]]}, $snps[$index] ); }
I hope this is helpful, I'm still not convinced I'm understanding what exactly you're needing.

Replies are listed 'Best First'.
Re^3: Population of HoAoA based on file contents
by iangibson (Scribe) on May 11, 2012 at 17:27 UTC

    I think I'm on the right track now. I can see what was wrong with my original code, and I think that the structure you show above should be what I'm looking for.

    Let me work on it some more (and re-read more carefully the relevant Perl documentation), then if I still have problems I'll either add another comment below or start a fresh post (I won't have much time to work on it until next week, however). Thanks for all your help.