Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Gundura authored Mar 15, 2023
1 parent 0329567 commit 0c4522c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 7 additions & 2 deletions POTATO_GUI.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Copyright 2021 Helmholtz-Zentrum für Infektionsforschung GmbH"""

""" POTATO -- 2023-03-13 -- Version 1.3
""" POTATO -- 2022-12-13 -- Version 1.6
Developed by Lukáš Pekárek and Stefan Buck at the Helmholtz Institute for RNA-based Infection Research
In the research group REMI - Recoding Mechanisms in Infections
Supervisor - Jun. Prof. Neva Caliskan """
Expand Down Expand Up @@ -377,6 +377,11 @@ def open_folder():

entryText_filename.set(filename_TOMATO)

try:
TOMATO_fig1.get_tk_widget().destroy()
except:
pass

fig = plot_TOMATO(Force_Distance_TOMATO)
TOMATO_fig1 = FigureCanvasTkAgg(fig, TOMATO_figure_frame)
TOMATO_fig1.get_tk_widget().grid(row=0, column=0, sticky='wens')
Expand Down Expand Up @@ -500,7 +505,7 @@ def analyze_steps():
TOMATO_fig1.get_tk_widget().destroy()

figure1 = plot_TOMATO(Force_Distance_TOMATO)
diff_colors = ['b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm']
diff_colors = ['b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm']
subplot1 = figure1.add_subplot(111)
subplot1.plot(Force_Distance_TOMATO[:, 1], Force_Distance_TOMATO[:, 0], color='gray')
distance = np.arange(min(Force_Distance_TOMATO[:, 1]), max(Force_Distance_TOMATO[:, 1]) + 50, 2)
Expand Down
15 changes: 9 additions & 6 deletions POTATO_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,21 +235,24 @@ def plot_fit(fit, start_force_ss, start_distance_ss, Force_Distance, save_folder

legend_elements = [
Line2D([0], [0], color='k', lw=1, alpha=0.85),
Line2D([0], [0], color='r', lw=1),
# Line2D([0], [0], color='r', lw=1),
Line2D([0], [0], color='gray', linestyle='dashed', lw=1)
]

diff_colors = ['b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm', 'b', 'r', 'c', 'g', 'y', 'm']

plt.plot(Force_Distance[:, 1], Force_Distance[:, 0], 'k', alpha=0.85)
plt.scatter(d_fitting_region_ds, f_fitting_region_ds, color='r', s=4)
plt.plot(distance, F_ds_model, linestyle='dashed', color='gray')
plt.axis([min(Force_Distance[:, 1]) - 50, max(Force_Distance[:, 1]) + 50, 0, max(Force_Distance[:, 0]) + 15])
plt.scatter(d_fitting_region_ds, f_fitting_region_ds, color=diff_colors[0], s=4)
plt.plot(distance, F_ds_model, linestyle='dashed', color=diff_colors[0], linewidth=0.5, alpha=0.85)
plt.ylabel("Force [pN]")
plt.xlabel("Distance [nm]")
plt.legend(legend_elements, ['FD-Curve', 'Part used for fitting', 'Fitted WLC model'])

for i in range(0, len(fit)):
F_ss_model = model_ss(distance, fit[i].params)
plt.scatter(start_distance_ss[i], start_force_ss[i], s=4)
plt.plot(distance, F_ss_model, linestyle='dashed', color='gray')
plt.scatter(start_distance_ss[i], start_force_ss[i], s=4, color=diff_colors[i+1])
plt.plot(distance, F_ss_model, linestyle='dashed', color=diff_colors[i+1], linewidth=0.5, alpha=0.85)

plotname = save_folder + "/" + filename_i + "_fit_" + start_time + ".png"

Expand Down

0 comments on commit 0c4522c

Please sign in to comment.