Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970025]
help
Chatterbox?
[Eily]: that was a sneeze overpowering a cough
[choroba]: Czechs sneeze "Hep-cheek"
vrk adds gingerbread cookies to the platter on the sideboard.
[erix]: I'll give that a try next time
vrk takes a cookie from the platter on the sideboard.
[Eily]: French sneeze "Atchoum", because we close our mouth when we're done :P
[erix]: Hatshepsut (no sneezing audio there)
choroba wipes the saliva from the cookies
[LanX]: scary Le Pen + Melonchon had over 40% ...
[vrk]: One good word for it in Finnish is pärskäys. A very wet connotation.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2017-04-24 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.