Perl References

Simon Prochnik, Lincoln Stein (From Steve Rozen, 2001)

Problem Set

  1. What kind of data structure could you use to represent the data in the table below?

    CDC245liver
    PLK134.2heart
    MCM49kidney


  2. Write a script to generate a data structure which represents the table above.


  3. The table below is the same as the table above, but has labels added as headings.

    Modify your script such that the data is now stored according to the labels, so that you can access the data using those labels. For example, if your data structure is called %hash, you should be able to look up the data related the CDC2 gene like this:

    $gene = 'CDC2';
    my $expression_for_gene = $hash{$gene}{'expression'};
    my $tissue_for_gene     = $hash{$gene}{'tissue'};
    

    geneexpressiontissue
    CDC245liver
    PLK134.2heart
    MCM49kidney


  4. Modify your script so that the data for MCM4 is printed out like this:
    gene     expression    tissue
    MCM4     9             kidney