本文整理汇总了Python中status.Status.change_variable方法的典型用法代码示例。如果您正苦于以下问题:Python Status.change_variable方法的具体用法?Python Status.change_variable怎么用?Python Status.change_variable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类status.Status
的用法示例。
在下文中一共展示了Status.change_variable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from status import Status [as 别名]
# 或者: from status.Status import change_variable [as 别名]
#.........这里部分代码省略.........
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:
self.stat.change_variable(4, "status")
self.stat.write_backup(self.backupdir)
self.log.info("sample specific stuff...")
self.sample_specific()
if self.stat is not None: