> -----Original Message-----
> From: Ben Doom [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 14, 2005 4:07 PM
> To: CF-Talk
> Subject: Re: reverse compliment a sequence
> 
> Jeff Congdon wrote:
> > The replace idea below will work as long as those temporary values don't
> > exist anywhere in the original string, which seems a risky assumption.
> > Not knowing the original values though,  I can't speak for that.
> 
> Since he's looking for a DNA sequence compliment, we know that the only
> chars present will be a,t,g,c -- the four types in DNA.  Maybe not
> common knowledge, though.

In this case I would probably use the digits 1-4 as placeholders - it makes
really clear which characters are placeholders and which aren't.

Of course a potentially confusing, potentially elegant solution is to
uppercase the original value, replace with lower case letters (which would
allow for only four replaces) and then uppercase the whole mess again.

Jim Davis





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209479
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to