Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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.


Comment on Re^2: Population of HoAoA based on file contents
Select or Download Code
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?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2015-07-04 13:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls