A quick visit to CPAN and a search on DNA gave 6 pages of modules where people have coded stuff to work with DNA base sequences and similar.

I've not looked deeply as although my degree is in Biochemistry I never really enjoyed genetics that much.

Why not have a quick snoop over there and see if someone already has solved this problem?

Not saying that there won't be those who sniff at the danger and love the challenge to develop new ways to do it better, that's partly what perl is all about.

Update It seems some folk don't like this post. I guess that's what lifes about here in the monastery.

It's just that I have noticed a fair few questions that appear to be about DNA bases and initially was going to suggest collecting some of the best responces and putting in a module. There are already plenty of DNA modules though hence the suggestion to check CPAN.

The code solutions provided illustrate the latter point that TMTOWTDI is alive and well.


In reply to Re: Position Weight Matrix of Set of Strings by tweetiepooh
in thread Position Weight Matrix of Set of Strings by monkfan

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.