Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
where LB2241-RCC is a sample, which can have around 60 -89 similar rs6557634 (called snp-ids) and each of them in turn have the the three keys, plex, gt, file. I would like to print them in this format:$VAR1 = { 'LB2241-RCC' => { 'rs6557634' => { 'plex' => 'W30467', 'gt' => 'T', 'file' => ' file1.csv' }, 'rs1032807' => { 'plex' => 'W30569', 'gt' => 'G', 'file' => ' file1.csv' },
In simple words, I have to get all the snps-ids->gt foreach of the sample and their plex. The same sample could be seen with a different snp-ids and a different 'gt'. Any help in how to print them ? Thanks in advance, your help is much appreciated.W30467,LB2241-RCC,T,T,T,C,CA,GT,T,GA,C,A,G,CT,T,T,CA,AG,TC,G,GA,C,TC,C +T,AG,AG,C,GT,GA,G,GA,T W30469,LB2241-RCC,G,T,T,C,CA,GT,T,GA,C,A,G,CT,T,T,CA,AG,TC,G,GA,C,TC,C +T,AG,AG,C,GT,GA,G,GA,T
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fetching from a hash
by GrandFather (Saint) on May 07, 2011 at 11:59 UTC | |
|
Re: fetching from a hash
by JavaFan (Canon) on May 07, 2011 at 14:05 UTC | |
|
Re: fetching from a hash
by CountZero (Bishop) on May 07, 2011 at 15:06 UTC | |
|
Re: fetching from a hash
by tchrist (Pilgrim) on May 08, 2011 at 00:48 UTC |