Louis BECQUEY
Committed by GitHub

Removed non-significant peaks (avg + 1 sd threshold)

...@@ -57,6 +57,9 @@ if __name__ == "__main__": ...@@ -57,6 +57,9 @@ if __name__ == "__main__":
57 values = np.vstack([x, y]) 57 values = np.vstack([x, y])
58 kernel = st.gaussian_kde(values) 58 kernel = st.gaussian_kde(values)
59 f = np.reshape(kernel(positions).T, xx.shape) 59 f = np.reshape(kernel(positions).T, xx.shape)
60 + sign_threshold = np.mean(f) + np.std(f)
61 + z = np.where(f < sign_threshold, 0.0, f)
62 + z_inc = np.where(f < sign_threshold, sign_threshold, f)
60 63
61 # histogram : 64 # histogram :
62 fig, axs = plt.subplots(1,3, figsize=(18, 6)) 65 fig, axs = plt.subplots(1,3, figsize=(18, 6))
...@@ -65,13 +68,13 @@ if __name__ == "__main__": ...@@ -65,13 +68,13 @@ if __name__ == "__main__":
65 plt.axhline(y=0, alpha=0.5, color='black') 68 plt.axhline(y=0, alpha=0.5, color='black')
66 plt.axvline(x=0, alpha=0.5, color='black') 69 plt.axvline(x=0, alpha=0.5, color='black')
67 plt.scatter(x, y, s=1, alpha=0.1) 70 plt.scatter(x, y, s=1, alpha=0.1)
68 - plt.contourf(xx, yy, f, cmap=cm.BuPu, alpha=0.5) 71 + plt.contourf(xx, yy, z, cmap=cm.BuPu, alpha=0.5)
69 ax.set_xlabel("$\\eta'=C_1'^{i-1}-P^i-C_1'^i-P^{i+1}$") 72 ax.set_xlabel("$\\eta'=C_1'^{i-1}-P^i-C_1'^i-P^{i+1}$")
70 ax.set_ylabel("$\\theta'=P^i-C_1'^i-P^{i+1}-C_1'^{i+1}$") 73 ax.set_ylabel("$\\theta'=P^i-C_1'^i-P^{i+1}-C_1'^{i+1}$")
71 ax.add_patch(ptch.Rectangle((-20,0),50,70, linewidth=1, edgecolor='r', facecolor='#ff000080')) 74 ax.add_patch(ptch.Rectangle((-20,0),50,70, linewidth=1, edgecolor='r', facecolor='#ff000080'))
72 75
73 ax = fig.add_subplot(132, projection='3d') 76 ax = fig.add_subplot(132, projection='3d')
74 - ax.plot_surface(xx, yy, f, cmap=cm.coolwarm, linewidth=0, antialiased=False) 77 + ax.plot_surface(xx, yy, z_inc, cmap=cm.coolwarm, linewidth=0, antialiased=True)
75 ax.set_title("\"Wadley plot\"\n$\\eta'$, $\\theta'$ pseudotorsions in 3D RNA structures\n(Massive peak removed in the red zone, = double helices)") 78 ax.set_title("\"Wadley plot\"\n$\\eta'$, $\\theta'$ pseudotorsions in 3D RNA structures\n(Massive peak removed in the red zone, = double helices)")
76 ax.set_xlabel("$\\eta'=C_1'^{i-1}-P^i-C_1'^i-P^{i+1}$") 79 ax.set_xlabel("$\\eta'=C_1'^{i-1}-P^i-C_1'^i-P^{i+1}$")
77 ax.set_ylabel("$\\theta'=P^i-C_1'^i-P^{i+1}-C_1'^{i+1}$") 80 ax.set_ylabel("$\\theta'=P^i-C_1'^i-P^{i+1}-C_1'^{i+1}$")
......