Perlmonks, This is the question I am having trouble answering

Use random DNA sequence generator as many times as you need to get the protein-coding region(s) (nucleotide triplets). Minimum sequence length is 500bp.

• Find all possible protein-coding regions in microbes (between start and stop codons, ATG – TAG|TGA|TAA).

• Using Standard Genetic Code table (Wikipedia or any other sources), create hash table for all amino acids ($amino{TTT} => "F", ...).

• Write found protein sequences into file with the next format:
   Position of 1st start codon: protein sequence [length of protein sequence]
   Position of 2nd start codon: ….

For example: 45: FLPQWCV [7]

I am sort of clueless and not sure where to start. To find the coding sequence I have generated a 5000bp random nucleotide but everytime i use the code below to find a coding region it returns nothing. Can anyone tell me what i am doing wrong?

@nucs=("A","C","G","T"); $size=5000; for ($i=0; $i<$size; $i++) { $seqR .= $nucs[int(rand(4))]; } print "Seq($size): $seqR\n"; if (/ATG([ACGT][ACGT][ACGT]){3,5000}(TAA|TAG|TGA)/) { print "This seq. might contain a coding region\n" } else{ print "This sequence most liklely does not contin a coding region\ +n" }

In reply to Bioinformatics coding question by charm

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.