reverse/complement program

Bernhard Mayr ndxdbmay at rrzn-serv.de
Sat May 24 12:51:12 EST 1997


C.S. Wilding wrote:
> 
> Does anyone know of a source for a simple PC program that
> will reverse and/or complement a nucleotide sequence. At the
> moment I am having to import/export to/from the GCG programs
> to do this which is quite laborious. If anyone also knows of
> a program to convert to AA sequence without needing to go to
> GCG that would be great too.
> Thanks,
> Craig.


I use a self written MAcro for WinWord 6.0 (german version), here's the
listing:

Sub MAIN
On Error Goto ende
seq$ = Markierung$()
seqlen = Len(seq$)

ZeichenRechts 1
EinfügenAbsatz
Einfügen "complement: "
For I = 1 To seqlen
basei$ = Mid$(seq$, seqlen + 1 - i, 1)
Select Case basei$
	Case "a", "A"
		Einfügen "T"
	Case "t", "T"
		Einfügen "A"
	Case "g", "G"
		Einfügen "C"
	Case "c", "C"
		Einfügen "G"
	Case "n", "N"
		Einfügen "N"
	Case "s", "S"
		Einfügen "S"
	Case "w", "W"
		Einfügen "W"
	Case "r", "R"
		Einfügen "Y"
	Case "y", "Y"
		Einfügen "R"
	Case "k", "K"
		Einfügen "M"
	Case "m", "M"
		Einfügen "K"
	Case Else
		MsgBox("Fehler in Sequenz !!!")
		Goto ende
End Select
Next i
ende:
End Sub



-- 
Bernhard Mayr
Medizinische Hochschule Hannover
Dept Clin Endocrinology
Hannover, Germany



More information about the Methods mailing list