I am not sure what you mean by 'pseudocode'. I often start a small project such as this by writing a Perl program that is valid, but lacks important details. Here is a sample.
use strict; use warnings; sub mean {...} my @genes = ( #'GeneName E1 E2 E3 E4', 'ATA1 12 44 45 33', 'OSA2 100 79 85 83', 'DUA5 66 65 64 67', 'AXANT 4 4 6 2', ); foreach (@genes) { my ($name, @values) = split; print $name, mean(@values); }

It needs an implementation of the 'mean' function. It uses a hard coded array of strings rather than input. The output is unformatted. The default arguments of 'split' may not work as intended. Clearly, the highest priority is the function. I am not ashamed to use a module to do the heavy work.

use List::Util qw(sum); ... sub mean { return sum(@_)/@_ }

Now you should have a working program. Add input and output details until it meets your requirements. As a final step, you may want to replace the module with your own sum function.

Bill

In reply to Re: Pseudocode for table data by BillKSmith
in thread Pseudocode for table data by shabird

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.