def udev_trigger(subsystem=None, action="add", name=None): argv = ["trigger", "--action=%s" % action] if subsystem: argv.append("--subsystem-match=%s" % subsystem) if name: argv.append("--sysname-match=%s" % name) util.run_program(["udevadm"] + argv) udev_settle()
def run_rates(command): global _tiger_binary if _tiger_binary is None: _tiger_binary = util.find_program(_binary_name) try: util.run_program(_tiger_binary, command) except util.ExternalProgramError: log.error("fast_TIGER did not execute successfully") log.error("fast_TIGER output follows, in case it's helpful for \ finding the problem") log.error("You probably just need to recompile the fast_TIGER \ code for your system. But please note that this is an \ unsupported option. For empirical work we recommend using \ entropy calculations for site rates, which is the default \ behaviour for the kmeans algorithm in PF2.") raise
def run_raxml_pthreads(command, cpus): global _raxml_pthreads_binary if _raxml_pthreads_binary is None: _raxml_pthreads_binary = util.find_program(_binary_name_pthreads) command = " ".join([command, "-T", str(cpus), " "]) util.run_program(_raxml_pthreads_binary, command)
def run_raxml(command): global _raxml_binary if _raxml_binary is None: _raxml_binary = util.find_program(_binary_name) util.run_program(_raxml_binary, command)
def udev_settle(): # wait maximal 300 seconds for udev to be done running blkid, lvm, # mdadm etc. This large timeout is needed when running on machines with # lots of disks, or with slow disks util.run_program(["udevadm", "settle", "--timeout=300"])