Dear Monks

I am a perl beginner and I have to model some quite complicated domain knowledge and with my limited perl knowledge the best I can come up with is lots of nested hashes. Here it is:

A snp is something in biology which can be associated with a specific set of genes. Each gene in turn can be associated with a specific set of transcripts. Each transcript also has a set of associated properties that we care about in relation to the original snp. This was my data model

A 'snp hash'. The key is the snp id, the value is a ref to a 'gene has +h'. Each key in this hash is a gene id and the value is a ref to a transcr +ipt hash. Each key is a transcript id and the return value is a hash ref to a pr +operties hash. The hash has one key per property of the transcript
i would like to compare the entire 'data tree' generated from one source of data one source to another 'data tree' from what should be equivalent source of data to make sure they are the same. So any solution should aid comparision. I think this nested hash structure allows me to compare, say, the genes of the same snp as I can compare the keys of the corresponding gene hash ref.

Any comments welecomed

In reply to can i avoid all these nested hashes by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.