def sequence_save(self, element):
"""
Save a single sequence to a file.
"""
remove_indels_choice = False
if "-" in element.my_sequence:
remove_indels_choice = tkMessageBox.askyesno(message="Would you like to remove indels from the sequence when saving it to a file?", title="Save File", parent=self.main_window)
filepath=asksaveasfilename(filetypes=[("fasta","*.fasta")],parent=self.main_window)
if not filepath == "":
dirpath = os.path.dirname(filepath)
filename = os.path.splitext(os.path.basename(filepath))[0]
self.build_sequences_file([element], filename, file_format="fasta", remove_indels=remove_indels_choice, use_structural_information=False, new_directory=dirpath)
评论列表
文章目录