%mtRNA_Replacements.m
%This program replaces the unusual characters (other than A, G, C, and U) present in the excel tRNA database we're using by the most equivalent of the characters A, G, C, U, -, or N.

%string = '123 "*6 $!, ?°| ''#='

string = regexprep(string,'H|"|/|+|*|=|6|E|[|:|I|O|^|`','A');
string = regexprep(string,'<|%|B|M|?|''|}|>|°','C');
string = regexprep(string,';|K|L|#|R|\||7','G');  %Note: \ is used to escape the menaing of | following it, and treat it as any other character to be replaced
string = regexprep(string,'P|]|\\|N|{|2|J|4|&|1|S|3|V|5|!|\$|X|,|)|~|D|Z|T|F','U'); %Note: \\ means \
string = regexprep(string,'_','-');
string = regexprep(string,'\.','N');

% string = strrep(string,'$','U');
% string = strrep(string,'|','G');


%string
%  (     fa7d7G                  archaeosine
%  Q     Q                       queuosine
%  8     manQ                    mannosyl-queuosine
%  9     galQ                    galactosyl-queuosine
%  Y     yW                      wybutosine
%  W     o2yW                    peroxywybutosine
