in reply to Bioinformatics coding question
This sounds suspiciously like homework...see this faq.
Edit: Maybe break the problem down a bit, and ask a more focused question, versus just dumping the assignment almost verbatim?