Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Reverse complement

by Marshall (Canon)
on Oct 31, 2011 at 17:00 UTC ( [id://934921]=note: print w/replies, xml ) Need Help??


in reply to Reverse complement

Hi bluray!

It looks to me like you paid attention to the suggestions in the previous post! I don't see anything glaring wrong here. If this does what you want functionally, I don't see a reason to keep tweaking. (well, I would spiff up the indenting) - but structurally, you have sound code.

If you are asking if

my $revcomp=reverse($1); $revcomp=~tr/ACGTacgt/TGCAtgca/;
is fine, it is. reverse() is fast and tr is much faster than any other way to do a one->one character mapping. If you want to convert to all uppercase at the same time, $revcomp =~ tr/ACGTacgt/TGCATGCA/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-19 11:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found