Skip to content

Commit

Permalink
add spinbar
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaOfca committed Aug 17, 2022
1 parent 952c33f commit 32a9245
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions smarca5/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,8 @@ def find_peptide_in_protein_seq() -> None:
:return: None
"""
global LINE_LENGTH_DISPLAYED
LINE_LENGTH_DISPLAYED = int(spin_box.get())
ref_seq_fasta = read_ref_seq_fasta()
result_of_experiment = pd.read_excel(rf"{peptide_entry.get()}").loc[
:, ["Sequence", "Proteins", "Experiment"]
Expand Down Expand Up @@ -572,20 +574,29 @@ def browse(entry: tk.Entry) -> None:
peptide_browse_button = tk.Button(
peptide_frame, text="Browse", command=lambda: browse(peptide_entry)
)
button_frame = tk.Frame(root)
analyze_button = tk.Button(
root,
button_frame,
text="Analyze",
bootstyle="danger",
command=find_peptide_in_protein_seq,
)

spin_box = tk.Spinbox(button_frame, from_=1, to=1000)
spin_box.insert(0, "80")

sping_box_label = tk.Label(button_frame, text="Line length:")

title_label.pack(padx=20, pady=20)
protein_ref_frame.pack(padx=20, pady=20)
protein_entry.grid(row=0, column=0, padx=20, pady=20)
protein_browse_button.grid(row=0, column=1, padx=20, pady=20)
peptide_frame.pack(padx=20, pady=20)
peptide_entry.grid(row=0, column=0, padx=20, pady=20)
peptide_browse_button.grid(row=0, column=1, padx=20, pady=20)
analyze_button.pack(padx=20, pady=20)
button_frame.pack(padx=20, pady=20)
sping_box_label.grid(row=0, column=0, padx=10, pady=20)
spin_box.grid(row=0, column=1, padx=10, pady=20)
analyze_button.grid(row=1, column=0, columnspan=2, padx=20, pady=20)

root.mainloop()

0 comments on commit 32a9245

Please sign in to comment.