**** * ***** *** * * ***** * * * * * * * * * * * * * * * * * * * * * * * * * * * *** * * * * * * * * * ***** * * Version 2.0 By Ramin Nakisa Usage ~~~~~ dotplot [sequence filename] [sequence filename] Oooooh, A New Program, I Want To Try It NOW! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For fast satisfaction, try using the following command which compares two neuronal nicotinic acetylcholine receptor subunit sequences from swissprot. dotplot a2 a3 Use option 1. Dotplot using score matrix. Use a window size of 10 and a threshold of 1. Once the dotplot is drawn you can either move the pointer around with the cursor keys or with the mouse, if you have one. As the pointer moves you can see the thirty amino acids surrounding the current pointer position for both sequences. Introduction ~~~~~~~~~~~~ This program fills a niche in the PC molecular biology freeware/shareware world. I decided to write it because dotplots are easily implemented on a PC, not being too CPU intensive (unless the sequences to be compared are large) and being fun to play around with if made interactive. The program owes a great deal to Dan Gilbert's amazingly good sequence reading/writing module UREADSEQ.C available from his equally amazing molecular biology server at Indiana. This module allows DOTPLOT to read the following formats: 1. IG/Stanford 8. Pearson/Fasta 2. GenBank/GB 9. Zuker 3. NBRF/PIR 10. Olsen 4. EMBL 11. Phylip3.4/Phylip 5. GCG 12. Phylip3.3/Interleaved 6. DNAStrider 13. Plain/Raw 7. Fitch The Section for Computer Bullies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I found that the score matrix was best dimensioned to a 20x32 matrix instead of a 20x20 matrix. This meant that the indexing in machine code was much faster, because, as any assembler speed-freak will tell you, what really slows up an 8088 is a multiply. You can save many clock cycles by using mov cl,5 shl ax,cl rather than multiplying by 20 to calculate the offset of the score for a particular pair of amino acids. I have speeded the program up by translating the entire dotplot calculation and drawing function into assembler. This turned out to be worthwhile because it gave a decrease in execution time of about 25%. Major speed savings were made by removing as many commands from the double-nested drawing loop, because each assembler command accounted for a couple of percent execution time. The assembler created by the C compiler was surprisingly inefficient. I made the calculation of scores even faster by calculating scores diagonal-by-diagonal rather than point-by-point. I created a local variable in which the running score for each diagonal was stored and then for each point on the diagonal added the new score from just beyond the window and subtracted the score from just before the window. In C, this was as follows sum -= aa_sim( sequence1[i+k-window], sequence2[k], score_table ); sum += aa_sim( sequence1[i+k+window+1], sequence2[k+win2+1], score_table ); This was a much more efficient way of doing the window averaging. You can play around with the PAM matrix if you like. By default it looks like X=0 C 12 S 0 2 T -2 1 3 P -3 1 0 6 A -2 1 1 1 2 G -3 1 0 -1 1 5 N -4 1 0 -1 0 0 2 D -5 0 0 -1 0 1 2 4 E -5 0 0 -1 0 0 1 3 4 Q -5 -1 -1 0 0 -1 1 2 2 4 H -3 -1 -1 0 -1 -2 2 1 1 3 6 R -4 0 -1 0 -2 -3 0 -1 -1 1 2 6 K -5 0 0 -1 -1 -2 1 0 0 1 0 3 5 M -5 -2 -1 -2 -1 -3 -2 -3 -2 -1 -2 0 0 6 I -2 -1 0 -2 -1 -3 -2 -2 -2 -2 -2 -2 -2 2 5 L -6 -3 -2 -3 -2 -4 -3 -4 -3 -2 -2 -3 -3 4 2 6 V -2 -1 0 -1 0 -1 -2 -2 -2 -2 -2 -2 -2 2 4 2 4 F -4 -3 -3 -5 -4 -5 -4 -6 -5 -5 -2 -4 -5 0 1 2 -1 9 W 0 -3 -3 -5 -3 -5 -2 -4 -4 -4 0 -4 -4 -2 -1 -1 -2 7 10 Y -8 -2 -5 -6 -6 -7 -4 -7 -7 -5 -3 2 -3 -4 -5 -2 -6 0 0 17 C S T P A G N D E Q H R K M I L V F W Y This is just a score matrix. For example, if the pair of amino acids to be compared are leucine and arginine, the score matrix above gives a score of -3. An identity generally gives a large positive score (tyrosine-tyrosine gives a score of 17) with the largest scores for the rare amino acids. The matrix is not calculated according to physico-chemical properties of amino acids, it is statistically derived from comparison of many related proteins. Some people claim that the particular score matrix used makes a great deal of difference in the database searches and alignments, but don't take their word for it; you should play around with it yourself. If the score matrix makes that much difference then maybe your sequence similarity is just a figment of your crazed imagination... Anyway, you can edit the PAM.MAT file. Just bear these things in mind: * Don't interchange columns and rows. The letters are there for your convenience, so that editing the matrix is easy. The program always reads the matrix in the same way regardless of the letters. * Use integers, preferably in the same range as the above matrix ie. -8 to +17. * Don't forget to back up the original PAM.MAT, or you could get into a pickle! Grovelling Credits Section ~~~~~~~~~~~~~~~~~~~~~~~~~~ I think Dan Gilbert is a marvellous man. UREADSEQ is FAB. In case you ever read this, Dan, next time you're in London drop in to Imperial and I'll buy you a pint of Old Rosie at the Phoenix and Firkin. * Copyright 1990 by d.g.gilbert * biology dept., indiana university, bloomington, in 47405 * e-mail: gilbertd@bio.indiana.edu * * This program may be freely copied and used by anyone. * Developers are encouraged to incorporate parts in their * programs, rather than devise their own private sequence * format. * * This should compile and run with any ANSI C compiler. * Please advise me of any bugs, additions or corrections. Desperate Plea for Recognition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you enjoyed using dotplot, please DON'T SEND ME ANY MONEY! I don't want your money. If I did I wouldn't have started a PhD. I want PRAISE! RECOGNITION! FAME! PRAISE (again)! Please send your flattering minutiae, ego boosters, gripes and suggested improvements by EMAIL to biophys@uk.ac.ic.ph.v1 ....................... for people who use JANET ramin@bio.ph.ic.ac.uk ....................... for Internet people Alternatively: Ramin Nakisa, Biophysics Section, The Blackett Laboratory, Imperial College of Science, Technology and Medicine, Prince Consort Road, London SW7 2BZ Great Britain. Tel: 071 589-5111 x 6729 FAX: 071 589-0191