Want to write function/macro for DNA reverse-complement

From: Bob Harris (plasticnitlion_at_wrappermindspring.com)
Date: 08/03/04


Date: Tue, 03 Aug 2004 12:43:44 GMT

Howdy,

(please excuse the cross-posting; did not know which group was appropriate)

I have a spread*** in which I need one cell to automatically get the
reverse-complement of a DNA string that's in another cell (details below).
I am an experienced programmer but have no experience in adding functions to
excel (maybe they are called macros). Am looking for guidance on how to
write such a function and install it in my spread***.

Have searched the web for a tutorial for how to write custom functions for
excel but I get a zillion hits telling me how to enter formulas into cells.
Is there a tutorial site somewhere?

What I would like to be able to do is to have one cell (say A5) contain the
DNA string, and then have another cell contain this: "=revcomp(A5)".
revcomp would be the function I need to write. It would accept a string and
produce a string.

What reverse-complement is... A DNA string contains a sequence of the
letters { A, C, G, T }. The reverse of the string is the characters read in
reverse. The complement replaces A with T, C with G, G with C, and T with
A. So the reverse complement of AGATTGGCCAAC is GTTGGCCAATCT.

Thanks very much for any help,
Bob H

-- 
-- Bob Harris =======================================================+
| To reply, carefully remove the plastic wrapper from my address     |
+====================================================================+

Loading