in reply to [SOLVED] Keeping track of substituted regions with a while loop
Based on your sample data, this seems more straightforward, and avoids the issue of substituting something that was already translated. Caveat: I'm guessing based on the sample data, so I may have missed something crucial.
my $protein; # split $rna into groups of 3 characters for ( unpack("(A3)*",$rna)) { if (exists($gencode{$_}) { $protein.=$gencode{$_}; } else { die "No mapping for [$_]\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Keeping track of substituted regions with a while loop
by kschwab (Vicar) on Nov 15, 2013 at 22:59 UTC | |
|
Re^2: Keeping track of substituted regions with a while loop
by enderk (Novice) on Nov 16, 2013 at 13:21 UTC |