Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.

by suchetana
on Feb 13, 2013 at 20:10 UTC ( #1018622=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
in thread Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.

can i please get a corrected code? please? instead of wasting time in arguing, please could you get me the full code? i tried several others, to no avail


Comment on Re^4: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
Re^5: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
by tmharish (Friar) on Feb 14, 2013 at 14:18 UTC
    suchetana
    Basically I need to find the ORFs in the thread in three reading frames. and then translate.

    I have no idea what ORFs or frames are. I dont know what this translate is ... and I dont really want to.

    What I do know is Perl ... So if you gave a chunk of input and corresponding output you expect that will help.

    suppose TATGCATGGCATATATATACGTACGTATGCATATATATGCTAA. I want to find the substring that has ATG......TAA while reading from the first T Then I want it to start reading from the second alphabet and find the substring having ATG...TAA and again then the same thing from T to get ATG....TAA.

    I dont get that completely but here is ( a simplified version of ) something that can do it:

    use strict; use warnings ; my $string = 'TATGCATGGCATATATATACGTACGTATGCATATATATGCTAA' ; my %found_strings ; for( my $start = 0; $start < length( $string ); $start++ ) { my $string_to_check = substr( $string, $start ) ; if( $string_to_check =~ /(ATG.*?TAA)/ ) { $found_strings{ $1 } = 1 ; } } my @found = keys %found_strings ; foreach my $found ( @found ) { print "$found\n"; } exit() ;

    And the output

    ATGCATATATATGCTAA ATGGCATATATATACGTACGTATGCATATATATGCTAA ATGCTAA ATGCATGGCATATATATACGTACGTATGCATATATATGCTAA

    I have no idea what the rest of that means:

    Also, I then need to store these three substrings in three different scalars/arrays. Then I need to translate them, like if the first three are ATG it should return say M, then it reads the next 3 characters of that substring and say it is CAT. Then it will return X say. Likewise. How do I go about? Please please help

    Except of course the please please part that does not help at all ... So if you explain what you want that will help us give you something.

    And finally - You have been told several times about use strict; so whats with not adding it?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018622]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2014-07-30 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (235 votes), past polls