function Amino3To1(AStr: string):string;
var
i:integer;
LStr: string;
begin
Result := '';
i := 1;
while i < Length(AStr) do
begin
LStr := lowercase(copy(AStr, i, 3));
case LStr of
'ala':Result := Result + 'A';
'arg':Result := Result + 'R';
'asn':Result := Result + 'N';
'asp':Result := Result + 'D';
'cys':Result := Result + 'C';
'gln':Result := Result + 'Q';
'glu':Result := Result + 'E';
'gly':Result := Result + 'G';
'his':Result := Result + 'H';
'ile':Result := Result + 'I';
'leu':Result := Result + 'L';
'lys':Result := Result + 'K';
'met':Result := Result + 'M';
'phe':Result := Result + 'F';
'pro':Result := Result + 'P';
'ser':Result := Result + 'S';
'thr':Result := Result + 'T';
'trp':Result := Result + 'W';
'tyr':Result := Result + 'Y';
'val':Result := Result + 'V';
else
Result := Result + '?';
end;
inc(i,3);
end;
end;
function Amino1To3(AStr: string):string;
var
i:integer;
begin
Result := '';
for i := 1 To Length(AStr) do
begin
case AStr[i] of
'A':Result := Result + 'Ala';
'R':Result := Result + 'Arg';
'N':Result := Result + 'Asn';
'D':Result := Result + 'Asp';
'C':Result := Result + 'Cys';
'Q':Result := Result + 'Gln';
'E':Result := Result + 'Glu';
'G':Result := Result + 'Gly';
'H':Result := Result + 'His';
'I':Result := Result + 'Ile';
'L':Result := Result + 'Leu';
'K':Result := Result + 'Lys';
'M':Result := Result + 'Met';
'F':Result := Result + 'Phe';
'P':Result := Result + 'Pro';
'S':Result := Result + 'Ser';
'T':Result := Result + 'Thr';
'W':Result := Result + 'Trp';
'Y':Result := Result + 'Tyr';
'V':Result := Result + 'Val';
else
Result := Result + '???';
end;
end;
end;