Want to write function/macro for DNA reverse-complement

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

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 spreadsheet 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 spreadsheet.

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     |
+====================================================================+


Relevant Pages

  • Re: PLEASE HELP: Programming formulas in embedded spreadsheets
    ... but here's a stab at it... ... To put the data into a cell in a spreadsheet use: ... And use the reverse to reload them (probably in your UserForm_Activate ...
    (microsoft.public.excel.programming)
  • Re: Diodes for Li coin cell protection
    ... > allow an RTC to be powered by both a Li coin cell and the power rail. ... > Diodes are the right idea, but primary Li cells have a very low ... > tolerance for reverse current. ...
    (comp.arch.embedded)
  • Re: NimH AAA to 5V, suggestions?
    ... discharge is fine--damage comes from reverse charging the cell. ... and the power conversion circuit will keep running and consuming some power of its own. ... A fully-charged cell measures 1.4?1.45 V, ...
    (sci.electronics.design)
  • Re: reverse biased Ni-Cad cells
    ... A voltage reversed NiCd is typically due to a weaker cell ... burn out the reverse section. ... can continue until a new battery pack is obtained. ... failure - battery pack was permitted to discharge well beyond ...
    (sci.electronics.components)
  • Re: reverse biased Ni-Cad cells
    ... A voltage reversed NiCd is typically due to a weaker cell ... burn out the reverse section. ... can continue until a new battery pack is obtained. ... failure - battery pack was permitted to discharge well beyond ...
    (sci.electronics.design)