Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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

by suchetana
on Feb 13, 2013 at 19:52 UTC ( #1018615=note: print w/replies, xml ) Need Help??

in reply to Re: 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.

didn't work that code
  • Comment on Re^2: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.

Replies are listed 'Best First'.
Re^3: Urgent help required. Need a code to translate a given nucleotide sequence into proteins using codon table.
by thundergnat (Deacon) on Feb 13, 2013 at 20:08 UTC
    didn't work that code

    Doesn't work this code either.... Not a surprise. It's the SAME code.

      please could you stop arguing and help me with the full program? please?

        I will happily provide you with the full program. You can expect delivery once you pay me for my services.

        #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

        I believe we are stumbling over a cultural issue here.

        suchetana, PerlMonks is a website that has mostly Westerners as users. The culture here is to ask for help with something specific: "Here's my program that I want to do X, but it's doing Y. How do I fix it?" If this is the approach you use -- and you seem to be making efforts to fix your code yourself with help from the other users -- then very often people will pitch in to help you solve your problem (learning by doing), sometimes even writing a whole program to demonstrate something: but only when they've seen you doing your work of trying to make your own program work first.

        Many of us have been taken advantage of by unscrupulous people who want to have us do work for them without either helping or paying us back, so when someone says "This is my program and it doesn't work, can you fix it?", we very often say "no" even though technically we could do the programming because it breaks the implicit social contract: that people come to Perlmonks to learn how to solve their own problems.

        When we help fix very broken programs, it's because people bringing them make it clear how hard they're working to fix the program and take our advice. (We try to give advice first, because if you solve one problem, the next one gets easier - this is why math is taught by doing lots of problems).

        When you seem to ignore advice (e.g., "try adding 'use strict' to your program"), and say "please fix it", we get the impression that you are not doing the work to learn, but instead just want someone to do your work for free. When people ask you to clarify things and give examples of how the program is supposed to work, they are trying to get you back on the "helping yourself" track. If you don't respond to those questions by trying to do as the poster asks, this strengthens the impression that you're not trying to solve your own problem.

        So I'm recommending you try some of the hints that were made and let us know how they worked; if 'use strict' tells you that there are things to fix, try fixing them before coming back - and be ready to post in detail the things you tried when trying to fix problems. If we know you're trying to fix it, we're much more likely to pitch in and help you fix things.

        If I'm reading the signs right, you're trying to be respectful and not claim knowledge that you do not have in front of experts. We understand that, and we know you're not trying to pretend you're a big-time Perl programmer; what we're trying to do is help you learn what you need to know by making suggestions leading you to find the solution yourself (a modified version of the Socratic method).

        It's OK to not know this either - cultures are complex. This is my attempt to show you how this one works so you can participate in it effectively.

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


        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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018615]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (1)
As of 2017-01-18 05:12 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (160 votes). Check out past polls.