First, I generate 10^6 random codes, and choose the best one (alternatively, I could use one of the ‘optimal codes’ in the papers):
>> [codigo_opt,MS0_opt,MS_bases_opt,MS0,MS_bases]=optimizacodigo(codigo,10^6,1);
>> hist(MS0,100)
>> MS0_opt
MS0_opt =
4.4522
>> muestracodigo_fig(codigo_opt)
>> muestracodigo_fig(codigo)
>> save codigo_opt
>> [errormedio,matriz]=comparacodigos(codigo,codigo_opt);
>> errormedio
errormedio =
0.9531
Very different, as expected.
I find the code equivalent to the optimal one, most similar to the real genetic code:
>> [codigo_final,errormin,errormedio]=acercacodigos(codigo,codigo_opt);
>> errormin
errormin =
0.7656
>> errormin*64
ans =
49
>> muestracodigo_fig(codigo_final)
Not very-very similar. Only 15 (64-49) codons match.
Now I represent again the real and the most similar optimal codes, but colours represent polar requirement:
>> muestracodigo_fig(codigo,1)
>> figure
>> muestracodigo_fig(codigo_final,1)