本文整理汇总了Python中status.Status.add_written_file方法的典型用法代码示例。如果您正苦于以下问题:Python Status.add_written_file方法的具体用法?Python Status.add_written_file怎么用?Python Status.add_written_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类status.Status
的用法示例。
在下文中一共展示了Status.add_written_file方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from status import Status [as 别名]
# 或者: from status.Status import add_written_file [as 别名]
#.........这里部分代码省略.........
if not self.config.settings["only_models"]:
# if you do not want to build only models, check if the project directory is empty
if len(os.listdir(self.config.settings["project_dir"])) != 0:
self.log.warning("The project directory is not empty, this can result in unpredictable behavior.")
if self.yes:
answer = "y"
else:
answer = utils.get_answer_timeout("Remove? [Y/N]")
if answer == "y":
self.log.info("Deleting old project directory..")
shutil.rmtree(self.config.settings["project_dir"])
os.mkdir(self.config.settings["project_dir"])
else:
self.log.critical("Please provide an empty project directory. Quiting...")
sys.exit(1)
if self.backup:
self.stat = Status(logged=True)
self.backupdir = os.path.join(self.config.settings["project_dir"], "backup")
os.mkdir(self.backupdir)
self.log.info("creating folder structure...")
self.create_folderstructure()
self.log.info("checking database")
self.check_db()
if len(self.config.genomes_exclude) != 0:
# write organisms that will not be considered into a file
utils.list_to_file(self.config.genomes_exclude,
os.path.join(self.config.settings["project_dir"], "excluded.txt"))
if self.stat is not None:
self.stat.add_written_file(os.path.join(self.config.settings["project_dir"], "excluded.txt"))
self.stat.write_backup(self.backupdir)
self.log.info("Processing NCBI data...")
self.process_ncbi()
if self.stat is not None:
self.stat.change_variable(1, "status")
self.stat.change_variable(self.organism_file_map, "organism_file_map")
self.stat.change_variable(self.genomes_excluded, "genomes_excluded")
self.stat.change_variable(self.organisms, "organisms")
self.stat.write_backup(self.backupdir)
self.log.info("tree processing...")
self.tree_process()
if self.stat is not None:
self.stat.change_variable(2, "status")
self.stat.change_variable(self.nodes, "nodes")
self.stat.change_variable(self.tree_file, "tree_file")
self.stat.write_backup(self.backupdir)
self.log.info("mapping genomes on the tree...")
self.map_genomes_on_tree()
if self.stat is not None:
self.stat.change_variable(3, "status")
self.stat.change_variable("n_frags_per_node", "status")
self.stat.change_variable("tree_organism_map", "status")
self.stat.change_variable("organisms_invalid", "status")
self.stat.change_variable("organism_tree_map", "status")
self.stat.write_backup(self.backupdir)
self.log.info("generating sequence fragments...")
self.generate_seq()
if self.stat is not None: