Ok likelihood swp2
parent
2253ce5f67
commit
23fef174f2
28
swp2.py
28
swp2.py
|
|
@ -288,7 +288,6 @@ def plot_all_epochs_thetafolder(folder_path, mu, tgen, title = "Title", theta_sc
|
|||
plt.title(title)
|
||||
plt.savefig(title+'_b'+str(breaks)+'.pdf')
|
||||
# plot likelihood against nb of breakpoints
|
||||
|
||||
# best possible likelihood from SFS
|
||||
# Segregating sites
|
||||
S = sum(SFS_stored)
|
||||
|
|
@ -390,20 +389,19 @@ def plot_test_theta(folder_path, mu, tgen, title = "Title", theta_scale = True,
|
|||
for i in range(0, len(x)):
|
||||
T += y[i] / (x[i]*(x[i]-1))
|
||||
x_2.append(T)
|
||||
# Plotting (fig 2)
|
||||
plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
|
||||
plt.xlabel("# breaks")
|
||||
plt.ylabel("theta")
|
||||
plt.legend(loc='upper right')
|
||||
plt.savefig(title+'_test'+str(k)+'.pdf')
|
||||
|
||||
# Plotting (fig 3) which is the same but log scale for x
|
||||
plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
|
||||
plt.xscale('log')
|
||||
plt.xlabel("# breaks")
|
||||
plt.ylabel("theta")
|
||||
plt.legend(loc='upper right')
|
||||
plt.savefig(title+'_test'+str(k)+'_log.pdf')
|
||||
# Plotting (fig 2)
|
||||
plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
|
||||
plt.xlabel("# breaks")
|
||||
plt.ylabel("theta")
|
||||
plt.legend(loc='upper right')
|
||||
plt.savefig(title+'_test'+str(k)+'.pdf')
|
||||
# Plotting (fig 3) which is the same but log scale for x
|
||||
plt.plot(x_2, y, 'o', linestyle="dotted", alpha=0.75, lw=2, label = str(epoch)+' brks')
|
||||
plt.xscale('log')
|
||||
plt.xlabel("# breaks")
|
||||
plt.ylabel("theta")
|
||||
plt.legend(loc='upper right')
|
||||
plt.savefig(title+'_test'+str(k)+'_log.pdf')
|
||||
|
||||
def save_multi_image(filename):
|
||||
pp = PdfPages(filename)
|
||||
|
|
|
|||
Loading…
Reference in New Issue