## New Figure 1

I change from fig_pap_presentacion_02 to fig_pap_presentacion_03. Now no data comes from elegans, it is just a two-dimensional system with parabolic cost.

## New Figure 2 (elegans)

fig_pap_elegans_13(1,zeros(100))

Another version, with different colors:

## Metric for linear and 0.5 cases

If I try to compute more tan 10^7 permutations, Matlab runs out of memory. This can be solved, by saving the results in files as they are computed. But for now, I post results for 10^7 permutations (run in remotón).

Calculations for alfa, beta of our pnas, exponent 1:

pos_opt=coste2pos_num_ruido(todas.A*.05,todas.M*1.5+todas.S,todas.f,1,0);
[m,coste_real,coste_perm]=metrica_pot(todas.A*.05,todas.M*1.5+todas.S,todas.f,todas.pos_real,1,10^7,pos_opt,4);
hist(coste_perm,100)
>> hold on
>> ejes=axis;
>> plot(coste_real*[1 1],ejes(3:4),’k’)
>> save metrica_alfabetapnas_lineal m coste_perm coste_real

m is 0, no permutation has lower cost than the real case. So p<10^-7.

Calculations for alfa and beta predicted by Bayes, and exponent 0.5:

>> [m,coste_real,coste_perm]=metrica_pot(todas.A*10^-1.1,todas.M*10^-.9+todas.S,todas.f,todas.pos_real,0.5,10^7,datos.pos_opt,4);
>> cd ..
>> cd metricaelegans
>> save metrica_alfabetabayes_cerocinco m coste_perm coste_real
>> m
m =
0
>> close all
>> hist(coste_perm,100)
>> hold on
>> ejes=axis;
>> plot(coste_real*[1 1],ejes(3:4),’k’)

## New Figure 3 (Bayes) for the paper

Feb 25, 2009

fig_pap_bayes_02(1,zeros(100))

Tests of different deformations of the colormap (changing variable exponent in the program):

>> fig_pap_bayes_02(1,zeros(100))

Normal colormap:

Deformed with the square root:

Deformed with x^.2

Current version, and calculation of expected values and standard deviations for alfa, beta and the exponent:

>> fig_pap_bayes_02(1,zeros(100))
expectedvalue_pot =
0.4885
sd_pot =
0.0662
expectedvalue_logalfa =
-1.1067
sd_logalfa =
0.0887
expectedvalue_logbeta =
-0.9375
sd_logbeta =
0.1261

Feb 26, 2009

>> fig_pap_bayes_03(1,zeros(100))
expectedvalue_pot =
0.4885
sd_pot =
0.0662
expectedvalue_logalfa =
-1.1067
sd_logalfa =
0.0887
expectedvalue_logbeta =
-0.9375
sd_logbeta =
0.1261

## New figure 1 for the paper

New name for the generator file: fig_pap_presentacion_01.m (old name was fig_pap_presentaelegans_05.m)

Another version, with a line in box a. I do not like it as it is, but maybe we can include something similar to clarify that the red dot is in the optimum?

fig_pap_presentacion_02(1,zeros(100))

## Preparation of class about the genetic code (II): Stop codons

Probability of not finding a stop codón after frame-shift for random sequences:

x=0:100;
plot(x,(61/64).^x,’LineWidth’,2)

## Preparation of class about the genetic code

Replication of the calculation in HaigHurst91:

cd geneticcode

>> MS0=NaN(10^5,1);
MS_bases=NaN(10^5,3);
for c=1:10^5
codigo_perm=permutacodigo(codigo);
[MS0(c),MS_bases(c,1:3)]=codigo2MS(codigo_perm.codon2aa,codigo.aa_prop(:,1));
if mod(c,10000)==0
fprintf(‘%g,’,c)
end
end
10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,>>
>> [MS0_real,MS_bases_real]=codigo2MS(codigo.codon2aa,codigo.aa_prop(:,1));
>> hist(MS0,100)
>> hold on
>> ejes=axis;
>> plot(MS0_real*[1 1],ejes(3:4),’k’)

Global MS:

First base:

hist(MS_bases(:,1),100)
>> ejes=axis;
>> hold on
>> plot(MS_bases_real(1)*[1 1],ejes(3:4),’k’)

Second base:

hist(MS_bases(:,2),100)
ejes=axis;
hold on
plot(MS_bases_real(2)*[1 1],ejes(3:4),’k’)

Third base:

>> hist(MS_bases(:,3),100)
ejes=axis;
hold on
plot(MS_bases_real(3)*[1 1],ejes(3:4),’k’)

Proportion of single-point mutations that lead to synonymous codons (permutations do not maintain family boxes):

MS0_nobox=NaN(10^4,1);
MS_bases_nobox=NaN(10^4,3);
prop_syn=NaN(10^4,1);
for c=1:10^4
codigo_perm=permutacodigo_noboxes(codigo);
[MS0_nobox(c),MS_bases_nobox(c,1:3),prop_syn(c)]=codigo2MS(codigo_perm.codon2aa,codigo.aa_prop(:,1));
if mod(c,10000)==0
fprintf(‘%g,’,c)
end
end
hist(prop_syn,50)
hold on
ejes=axis;
plot(prop_syn_real*[1 1],ejes(3:4),’k’)
>> set(gca,’FontSize’,15)
>> xlabel(‘Proportion of synonymous single-point mutations’,’FontSize’,15)
>> ylabel(‘Number of cases’,’FontSize’,15)

Cost for three example neurons:

fig_pap_bayes_01(1,[0 0])

:

Figure with most of the boxes that may be necessary

## Comparison of deviations for the cases quadratic and 0.5

It seems that the most deviated neurons are the same in both cases:

>> alfa=0.05; beta=1.5;
>> alfa=10^-1.1; beta=10^-.9; pot=.5;
>> [pos_cm,omega_general]=coste2pos_restofijas(todas.A*alfa,todas.M*beta+todas.S,todas.f,todas.pos_real,pot,.2);
>> desv_cerocinco=abs(pos_cm-todas.pos_real);
ans =
0.0879
>> mean(desv_cerocinco)
ans =
0.0911
>> figure

Some neurons are quite deviated in one case and not the other. However, it seems that these neurons have shallow costs for both cases, as we see when we use the predictions of the quadratic case for the deviations of the 0.5 case (note that beta is very different in either case):

>> alfa=0.05; beta=1.5;
>> omega=sum([todas.A*alfa todas.M*beta+todas.S],2);
>> figure
>> plot(desv_cerocinco,omega,’.’)

## Is the system trapped in a local mínimum?

Clear
>> alfa=10^-1.1; beta=10^-.9; pot=.5;
for c=1:100
pos_opt(1:279,c)=coste2pos_num_ruido(todas.A*alfa,todas.M*beta+todas.S,todas.f,pot,0,1,1);
hold on
end

Now, run the optimization with the real position as starting point (red line)

I modify coste2pos_num_ruido,

pos=rand(n_neuronas,1);

% **

pos=todas.pos_real;

% **

c_iteraciones=1;

>> pos_opt_cercareal=coste2pos_num_ruido(todas.A*alfa,todas.M*beta+todas.S,todas.f,pot,0,1,1);

for c=1:100
costes(c)=pos2coste(todas.A*alfa,todas.M*beta+todas.S,todas.f,pos_opt(:,c),pot);
end
>> [m,ind_min]=min(costes);
>> pos_opt_min=pos_opt(:,ind_min);
>> mean(abs(pos_opt_min-pos_opt_cercareal))
ans =
0.0842
>> vector=todas.pos_real-pos_opt_min;
>> coef=-.5:.05:1.5;
>> for c=1:length(coef)
coste_vec(c)=pos2coste(todas.A*alfa,todas.M*beta+todas.S,todas.f,pos_opt_min+vector*coef(c),pot);
end
>> figure
>> plot(coef,coste_vec)

There is a smooth way to the optimum, although my optimizer is unable to find it. So it does not look like a local minimum in the general multidimensional surface (although in some directions there are local minima, klar)