Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (9)
As of 2024-03-28 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found