def choose_psiblast_db_dir(self):
"""
Called when users want to manually choose a BLAST sequence database folder on their system.
"""
current_path = self.blast_plus["database_dir_path"].get_value()
new_path = None
# Lets users choose a new path.
new_path = askdirectory(title = "Search for a BLAST database directory", initialdir=current_path, mustexist = True, parent = self.blast_window)
if new_path:
if pmos.verify_valid_blast_dbdir(new_path):
prefix = pmos.get_blast_database_prefix(new_path)
# Updates the label with the new prefix name.
self.choose_path_label.configure(text=prefix)
self.list_of_databases_directories[0]["full-path"] = new_path
else:
self.choose_path_label.configure(text="None")
self.list_of_databases_directories[0]["full-path"] = None
title = "Selection Error"
message = "The directory you specified does not seem to contain a valid set of sequence database files."
self.show_error_message(title, message, parent_window = self.blast_window, refresh=False)
# Selects the 'browse' button once users click on it.
self.psiblast_database_rds.setvalue("browse")
评论列表
文章目录