Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^3: Create the reverse complement DNA sequence without pattern matching and reverse built-in function?

by BrowserUk (Patriarch)
on Feb 19, 2014 at 19:07 UTC ( [id://1075506]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Create the reverse complement DNA sequence without pattern matching and reverse built-in function?
in thread Create the reverse complement DNA sequence without pattern matching and reverse built-in function?

I tried to alert the OP to this issue in my post:

Sorry. I missed that.

your tr/// method missed reversing the string afterwards, but that won't change the fact that the tr/// approach is the way to go.

Right on both counts. And it make's more of a difference than I was expecting, but still 80x faster than the next best:

tr => q[ ( my $revcmp = reverse $seq ) =~ tr[ACGTacgt][tgcaTGCA]; ], C:\test>junk60 Rate hdb atcroft davido tr hdb 9827/s -- -36% -71% -100% atcroft 15292/s 56% -- -55% -99% davido 33822/s 244% 121% -- -99% tr 2640400/s 26770% 17167% 7707% --

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
  • Comment on Re^3: Create the reverse complement DNA sequence without pattern matching and reverse built-in function?
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2024-04-24 06:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found