Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Translation Substring Error

by toolic (Bishop)
on Nov 09, 2017 at 15:49 UTC ( #1203052=note: print w/replies, xml ) Need Help??


in reply to Translation Substring Error

The reason for the "substr outside of string" warning is that you assign the $seqarray variable to the empty string and you never assign it any other value. You are likely getting confused because you use the same name for two variables (an array and a scalar): $seqarray is a different variable from @seqarray. If you can specify what you want for output, you will get more specific help.

See also:

Replies are listed 'Best First'.
Re^2: Translation Substring Error
by FIJI42 (Acolyte) on Nov 09, 2017 at 16:06 UTC

    Basically, I was just trying to get a string for the translated amino acids:

    Example: MLVG

    If I have sequence like this: ATGGCGA, then I'd just like the translation: MA. The "A" from the end of "ATGGCGA" can be ignored/not output.

      This is what I'm getting with your program modified as in my earlier post below:
      $ perl dna.pl Sequence 1 Translation:MPV Sequence 2 Translation:ASQR

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2020-10-24 18:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (246 votes). Check out past polls.

    Notices?