Beispiel #1
0
def run(config, makefiles):
    check_path(config.temp_root)
    logfile_template = time.strftime("epiPALEOMIX_pipe.%"
                                     "Y%m%d_%H%M%S_%%02i.log")
    pypeline.logger.initialize(config, logfile_template)
    logger = logging.getLogger(__name__)
    pipeline = Pypeline(config=config)
    topnodes = create_nodes(config, makefiles)

    assert topnodes, "No analyses to run. Check %s" % (makefiles)
    pipeline.add_nodes(topnodes)
    if config.list_output_files:
        logger.info("Printing output files ...")
        pipeline.print_output_files()
        return 0
    elif config.list_executables:
        logger.info("Printing required executables ...")
        pipeline.print_required_executables()
        return 0

    logger.info("Running Epipaleomix pipeline ...")
    if not pipeline.run(dry_run=config.dry_run,
                        max_running=config.max_threads,
                        progress_ui=config.progress_ui):
        return 1
    return 0
Beispiel #2
0
            nodes = pipeline_func(config, makefile)
        except pypeline.node.NodeError, error:
            logger.error("Error while building pipeline for '%s':\n%s", filename, error)
            return 1

        config.destination = old_destination

        pipeline.add_nodes(nodes)

    if config.targets:
        logger.error("ERROR: Could not find --target(s): '%s'", "', '".join(config.targets))
        logger.error("       Please use --list-targets to print list of valid target names.")
        return 1
    elif config.list_output_files:
        logger.info("Printing output files ...")
        pipeline.print_output_files()
        return 0
    elif config.list_orphan_files:
        logger.info("Printing orphan files ...")
        for filename in sorted(list_orphan_files(config, makefiles, pipeline)):
            print (filename)
        return 0
    elif config.list_executables:
        logger.info("Printing required executables ...")
        pipeline.print_required_executables()
        return 0
    elif config.dot_file:
        logger.info("Writing dependency graph to %r ...", config.dot_file)
        if not pipeline.to_dot(config.dot_file):
            return 1
        return 0
Beispiel #3
0
    logfile_template = time.strftime("phylo_pipeline.%Y%m%d_%H%M%S_%%02i.log")
    pypeline.logger.initialize(config, logfile_template)
    logger = logging.getLogger(__name__)

    pipeline = Pypeline(config)
    for (command_key, command_func) in commands:
        logger.info("Building %s pipeline ...", command_key)
        command_func(pipeline, config, makefiles)

    for makefile in makefiles:
        if "Nodes" in makefile:
            pipeline.add_nodes(makefile["Nodes"])

    if config.list_output_files:
        logger.info("Printing output files ...")
        pipeline.print_output_files()
        return 0
    elif config.list_orphan_files:
        logger.info("Printing orphan files ...")
        for filename in sorted(list_orphan_files(config, makefiles, pipeline)):
            print(filename)
        return 0
    elif config.list_executables:
        logger.info("Printint required executables ...")
        pipeline.print_required_executables()
        return 0

    if not pipeline.run(max_running=config.max_threads,
                        dry_run=config.dry_run,
                        progress_ui=config.progress_ui):
        return 1