in reply to Re: Re: how can I speed up this perl??
in thread how can I speed up this perl??

It's a hash. If you encounter "aa", it'll add 1 to its "aa" entry. If you encounter "cg", it'll add 1 to its "cg" entry, etc.

Abigail

Replies are listed 'Best First'.
Re: Re: how can I speed up this perl??
by Anonymous Monk on Nov 24, 2003 at 11:34 UTC
    so how do I access the frequency of each pair using your code?

      You access the data by supplying the hash key. so print $counts{tt}; would print the frequency of tt occurences.

        thanks for your patience moxliukas, but this is what i have been doing, and I dont get a total count, I get a list of presence / absence numbers instead e.g. 00000000000100000000000000010000000000000000001000000000001
      Do you know what a hash is?

      Abigail

        yes! bur I tried this: and i just get a list of 1's: 11111111111111 I dont get the actual count
        $tt = $freq{tt}; print " tt $tt\n";