From what I understand, the alphabet you are using contains only four values A,C,G,T (DNA sequences I suppose).
Simple comparison would suffice:
seq = 'TGGAGGCCCACAACCATTCCCTCAGCCCAATTGACCGAAAGGGCGCGA';
msg_int = zeros(size(seq));
msg_int(seq=='A') = 1;
msg_int(seq=='C') = 2;
msg_int(seq=='G') = 3;
msg_int(seq=='T') = 4;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…