DNA

The Genetic Code for the HP48G Series


Software Version 2.2
Documentation (dna.htm) Version 1.0



© 2001 by Burkhard R. Baader







Contents


Contact Address


1.  Copyright and Disclaimer

    

1.1  Copyright
1.2  No warranty


2.  Introduction

 

2.1  About this documentation
2.2  Purpose of the library DNA.2.2
2.3  Developmental history
2.4  Changes since version 2.0
2.5  I need your help!
2.6  Hinweis für deutschsprachige Benutzer


3.  Installing / Uninstalling

 

3.1  Installing the library
3.2  Uninstalling the library
3.3  Remarks for HP48S users


4.  DNA.2.2: Commands Available

 

4.1  ABOUT
4.2    DNA
4.3  ->DNA
4.4  ->RNA
4.5   R->A
4.6  A->A3
4.7  A3->A
4.8   SEQN


5.  Acknowledgements





1.

Copyright and Disclaimer

1.1

Copyright

All files in the DNA.zip package are copyrighted
© 2001 by Burkhard R. Baader
–all rights reserved–

My contact address is as follows:

Burkhard R. Baader
  Perthesweg 64
D-20535 Hamburg
GERMANY
  mail@baadernet.de
http://www.baadernet.de
  Phone: (++49(0)40) 20 13 86


The software contained in the package DNA.zip (called ‘package’) is provided as free of charge. It can be freely copied and distributed with two restrictions:
1.  
The whole and unchanged original package as released here has to be included in any copy or distribution. The package includes the following two files:
a)  DNA.LIB (the library, also called ‘software’ in this text) and
b)  dna.htm (this documentation)
2.
Neither the software nor this documentation is for resale. It is strictly prohibited to copy or to distribute the package or it’s contents taking any money for it. (Although national or international laws may probably allow an exception, called ‘nominal copying fees’, I think it’s a most foolish thing to take a penny for making a copy ... if you payed anything for this package, please tell the distributor he’s a fool.)

1.2

No warranty

The software and the whole package DNA.zip is provided ‘as is’ and therefore free of charge. I give no warranty of any kind on neither the software, nor this documentation. Whenever you use the package, the software or the information given in this text, be aware that you do it on your own risk and responsibility.
If the package or it’s contents causes any harm (including memory loss and hardware damage) to either
–  
your calculator on which you used the software
–  
your computer you used for unpacking the package and for transferring the software to your calculator
–  
yourself and your environment
you can’t blame me for that.

Should the software prove defective, giving a false output (i.e. false transcription or translation of the nucleic acid sequences you typed in), this is not my problem, but yours. If you loose time and money in scientific research because you trusted this software, I guess the time and the money are definitely lost forever.

All right! Let’s start!


2.

Introduction

2.1

About this documentation

This documentation is quite big for such a small library. You can skip most of the paragraphs thereof if you’re already familiar with the HP48G and library installation.
First, read the Copyright and Disclaimer (and agree to it), then backup your memory and install the library to your HP48G/GX and check it out! It’s very easy to use.
DO NOT INSTALL IT TO AN HP48S/SX!!! Instead read installation guide below (Remarks for HP48S users). In any case, please read the I need your help paragraph first. Thanx.

2.2

Purpose of the library DNA.2.2

The software is made for easy handling of the genetic code without the need of codon tables or other utilities. It’s quick and easy to use. You should know how the genetic code works to use the commands provided in the library.

The so-called ‘dogma’ of genetics says that DNA is transcribed to RNA and RNA is translated to a polypeptide chain. And not reversely. As we all know, the retroviral reverse transcriptases break this ‘dogma’ partly, because they are able to transcribe RNA to DNA.
The DNA.LIB library is, seen from this viewpoint, a collection of enzymes with all the possibilities of real enzymes—and with all their restrictions: The commands are flexible tools to convert anything to anything else, but I havn’t broken the ‘dogma’ a second time by implementing a reverse translatase yet.
DNA.LIB is, however, a little bit more than Enzymes, because of some additional features:

Transcribing (DNA->DNA, DNA->RNA, RNA->RNA, RNA->DNA):
–  
The input hasn’t necessarily to be DNA or RNA, it can also contain ‘T’ and ‘U’ at the same time (both are transcribed to ‘A’)
–  
The input can also contain other characters than the five nucleotides used by enzymes ... any other character will be transcribed to ‘N’. So you can leave space for unknown (or unimportant) nucleotides.
Translating (RNA -> polypeptide chain):
–  
The input can contain undefined characters, too (unknown or unimportant nucleotides). They will be transcribed to the undefined amino acid ‘x’.

Nature uses amino acids to make a polypeptide chain. Humans instead have three letter notation (e.g. ‘Glu’ for glutamic acid) and single letter notation (e.g. ‘E’ for glutamic acid). That complicates everything a little bit.
Three letter notation is more convenient, because it’s easy to guess the full name of the corresponding amino acid if the code is given (Glu -> Glutamic acid). For displaying long polypeptide chains on a small screen it is much more practicable to use single letter notation. And storing ‘Glu’ is much more memory-spoiling then storing an ‘E’. That’s why I decided to give single characters as output for each amino acid.
Since nothing points to glutamic acid when you see an ‘E’ on the screen (except you know it by heart), I wrote a routine to convert single letter notation to three letter notation vice versa. So you can store your results in a memory-saving manner and transform it easily to a bigger thing if you really need to.

2.3

Developmental history

Some time ago I found a program (i.e. a directory containing several programs) called ‘DNA’, written by Luka Crnkovic-Dodig, on the great site http://www.hpcalc.org whereto I submitted this package, too.
As I’m studying biochemistry and molecular biology, I explored these programs. And I found a bug: the four codons beginning with ‘CG’ (i.e. ‘CGU’, ‘CGC’, ‘CGA’ and ‘CGG’) are wrongly translated. They should encode Arginine rather than Leucine. There was no response to my e-mail...

I tried to find out how these programs work, because I wanted to modify them, but I was too lazy and, anyway, I had a lot of spare time left ... so I wrote the stuff entirely new, developing my own algorithm.
The result was good: more features and only a very few bytes larger than Luka's ‘DNA’! So I stored it in one of my ports and stopped thinking about it. That was in 1999.
In 2000 I started to use Detlef Müller’s wonderful D->LIB library creator (also downloaded from http://www.hpcalc.org). I revised my ‘DNA’ (it was still called version 1.0, although I had modified it several times and sent a more user-friendly version to a guy somewhere in the net) and, before creating a library, I re-wrote the algorithm and made some modifications. The result is as follows:
1.   Now it’s version 2.x
2. It’s a library
3. It’s much quicker than before (simpler program structure)
4. It’s much smaller than before (same reason...)
Luka’s DNA and my old version is something about 2800 bytes, now I have reduced it to round about 2200 bytes!

2.4

Changes since version 2.0

Version 2.2 is 6.5 bytes smaller than Version 2.0. That is a change of -0,3%. So I suggest you can forget about it.

More important are two changes in the way of defining amino acids:

Changes in A->A3 and A3->A:
B   Asx   asparagine or aspartic acid
Z   Glx   glutamine or glutamic acid
The corresponding codons are not implemented in R->A. And I’m sure they will never be ... just look at any codon table to find out why I do think so).
 
Changes in R->A
There are 32 highly degenerated codons (i.e. the third base of each of these codons has no effect on translation). The codon CCN for example encodes proline—no matter what “N” exactly means. In DNA 2.2 the resulting eight simplified codons are valid arguments for R->A, too. They are:
GGN G Gly
GCN A Ala
GUN V Val
ACN T Thr
CGN R Arg
CCN P Pro
CUN L Leu
UCN S Ser

2.5

I need your help!

Hi. DNA 2.2 is for free. I will never ask you to pay anything for it. (Although, if you really like to I will not forbid you to send me some money.)
So there’s no reason to be shy. Please send me an e-mail and tell me about your opinions. Especially I’d like to get some suggestions how to improve DNA 2.2 and this documentation.

Thanx! I’d really like to hear from you.

2.6

Hinweis für deutschsprachige Benutzer

Hallo lieber Leser, hier also die englischsprachige Version von DNA 2.2 nebst zugehöriger Dokumentation. Eine deutsche Version gibt es nicht und ist auch nicht geplant.
Wenn Sie, Du oder Deine Freunde lieber eine deutsche Version verwenden möchten, kann ich selbige anfertigen, obwohl mir die Arbeit unnütz erscheint...

Hier mein Vorschlag: Sie, Du oder Deine Freunde schicken mir DM 10,- bzw. den entsprechenden Betrag in Euro, wenn der mal rauskommt (5,- Euro), sowie den Namen und die e-mail-Adresse, an die ich das Softwarepaket senden soll. Ich kann dann schöne Lizenzen verschicken; wird bestimmt ein Heidenspaß, hier sowas zu entwerfen...
Jeder Benutzer muss sein eigenes Paket erwerben.
OK. Danke für die Mitarbeit und für die Unterstützung eines armen Studenten!

PS:   Bitte angeben, ob Programm, Dokumentation oder beides übersetzt werden soll! Kann bei der ersten Bestellung etwas dauern, weil ich vorm Versenden noch rasch übersetzen muss!
PPS:   Und bitte auch sagen, was am Programm übersetzt werden soll - da ist ja eigentlich gar kein Englisch dran...

Cheers.


3.

Installing / Uninstalling

3.1

Installing the library

First of all: BACKUP YOUR MEMORY!
Download DNA.LIB in binary mode to your HP48G/GX calculator. Recall it to the stack. Execute [BYTES] command in MEMORY menu. The result should look like one of the following examples:

 

OK ... I’m not going to translate it to binaries. Download DNA.LIB again if the checksum differs.

Recall the library to the stack again and store it in any port.

Enter this:

  & [STO]

where ‘&’ is the appropriate port number (it works from all ports). Perform a warmstart with [ON]+[C] or turn the HP48 off and on again. The library attaches itself to the HOME directory; so all commands are accessible system-wide.
You may delete the downloaded DNA.LIB file. It just consumes memory. If you’re short on memory, you’ve to delete it in an earlier step, anyway.

3.2

Uninstalling the library

Go to the HOME directory.
Enter

  :&: 1112 [DUP]

Execute [DETACH] command in LIBRARY menu or type it...

And throw it away:

  :&: 1112 [PURGE]

(You know what ‘&’ means ... the port where you’ve stored the lib.)

Please read your HP48 manual if you don’t know anything about installing / uninstalling libraries! Or write me an e-mail for getting a more detailed single-step description.

3.3

Remarks for HP48S users

DNA.LIB was created on my HP48GX ROM revision R. I have never seen it running on any other calculator. I don’t know much about the 48S and I don’t know anybody who’s using one, so I have no idea whether DNA.LIB can work on such a device. But I’ve had a 28S some years ago and as far as I know anything about the development of these RPL calculators, I assume DNA.LIB will run on the S series, too. The library creator D->LIB which I used is for G series and S series as well.
However, I STRICTLY FORBID you to install DNA.LIB on any other calculator than HP48G/GX!!! If you’re going to ignore this warning, please be sure to make a memory backup, first, and then tell me whether installation was successful or not. Thanks for your cooperation.


4.

DNA.2.2: Commands Available

4.1

ABOUT

OK. I guess every library includes an ABOUT command. That’s why I’ve got a nice variable in my HOME directory, called ABOUT. If anybody ever enters ABOUT, he won’t receive a message about one of these libraries, he will rather read to whom the HP48GX he found belongs ... Go to the DNA library menu and press the softkey [ABOUT]. That’s not very impressing, but makes an ugly noise, although I tried to keep it quite silent.

4.2

DNA

The start menu. Shows the ABOUT message (without BEEPing—so you can run it while using public transportation). The menu consists of six softkeys (the other DNA commands, except ABOUT):



Description of commands: See below.

4.3

->DNA

Arguments in level 1: string (nucleic acid sequence)
Output in level 1: string (complementary nucleic acid sequence)

   Example:
   "CCACTUTUGCTC" -> "GGTGAAAACGAG"


Things to notice:
–   ->DNA cleares user flags 1, 2 and 3, but it is not affected by the flag status
–   "A" is transcribed to "T"
–   "C" is transcribed to "G"
–   "G" is transcribed to "C"
–   "T" and "U" are transcribed to "A"
–   any other character or [space] (i.e. " ") is transcribed to "N"


Messages:
Message in the first line:
DNA$ -> DNA if input was DNA (contained at least one "T", but no "U")
RNA$ -> DNA if input was RNA (contained at least one "U", but no "T")
NUC$ -> DNA if input contained neither "U" nor "T"
ERROR$ -> DNA if input contained at least one "U" and one "T" (this happens in the example above)
 
Message in the second line:
$ CONTAINS WRONG CHARS if input contained at least one character other than "G", "A", "C", "T" or "U" (transcribed to "N")

4.4

->RNA

Works like ->DNA, but the result is a RNA string. Difference to ->DNA:
"A" is transcribed to "U"

   Example:
   "CCACTUTUGCTC" -> "GGUGAAAACGAG"


The messages are very similar to messages displayed by ->DNA


Messages:
Message in the first line:
DNA$ -> RNA if input was DNA (contained at least one "T", but no "U")
RNA$ -> RNA if input was RNA (contained at least one "U", but no "T")
NUC$ -> RNA if input contained neither "U" nor "T"
ERROR$ -> RNA if input contained at least one "U" and one "T" (see example...)
 
Message in the second line:
$ CONTAINS WRONG CHARS if input contained at least one character other than "G", "A", "C", "T" or "U" (transcribed to "N")

4.5

R->A

Arguments in level 1: string (RNA sequence)
Output in level 1: string (amino acid sequence in single-character notation)


   Example (the resulting RNA string from last example):
   "GGUGAAAACGAG" -> "GENE"

As you can see, genetics is a very dumb tool for encrypting messages.


Things to notice:
–   R->A cleares user flag 1, but it is not affected by the flag status
–   translation: see any codon table...
–   any undefined codon (containing other characters than the four RNA bases) is translated to "x"
–   if no error occurs, no message will be displayed


Messages:
Message in the first line:
$ CONTAINS WRONG CODON –   at least one codon contained at least one non-RNA character (character other than G, A, C and U (codon translated to "x")
  –   3 is no divisor of the number of characters in the string, i.e. the last ‘codon’ is less than three characters in size. In this case an "x" is added after the last successfully translated amino acid, representing the incomplete codon.

4.6

A->A3

Arguments in level 1: string (amino acid sequence in single-character notation)
Output in level 1: string (amino acid sequence in three-character notation)

   Example:
   "GENE" -> "GlyGluAsnGlu"


Things to notice:
–   A->A3 cleares user flag 1, but it is not affected by the flag status
–   non-existing amino acids (such as "x") will be mapped to "Xxx"
–   if no error occurs, no message will be displayed


Messages:
Message in the first line:
$ CONTAINS WRONG AACID at least one amino acid is undefined ("x")

4.7

A3->A

Reverse function of A->A3. Gives back the single-character notation of the amino acid sequence.
Arguments in level 1: string (amino acid sequence in three-character notation)
Output in level 1: string (amino acid sequence in single-character notation)

   Example:
   "GlyGluAsnGlu" -> "GENE"


Things to notice:
–   A3->A cleares user flag 1, but it is not affected by the flag status
–   non-existing amino acids (such as "Xxx") will be mapped to "x"
–   if no error occurs, no message will be displayed


Messages:
Message in the first line:
$ CONTAINS WRONG AACID at least one amino acid is undefined ("Xxx")

4.8

SEQN

SEQN is a help menu for entering a nucleic acid string.
First page:

G  A  C  T  U  N

An empty string ("") is shown in level one. Pressing a softkey will add the appropriate character. To enter a second string, simply press [""] (put new delimiters in level 1) and add characters ... You can also type the sequence on your own, of course.
Second page:

 <-%    ->DNA    ->RNA    R->A    A->A3    A3->A

Only the first key needs an explanation. Not a big one, though: It deletes the last character of the string in level 1.


5.

Acknowledgements

  Thanks, Luka, for the idea of such a program.
Thanks, Detlev, for your wonderful D->LIB tool.
Thanks, Eric, for keeping http://www.hpcalc.org updated!






THE END



(July 15th 1)