Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^2: Population of HoAoA based on file contents

by state-o-dis-array (Hermit)
on May 11, 2012 at 14:11 UTC ( #970025=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970025]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2018-03-22 18:30 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (283 votes). Check out past polls.