def unified_anib(infiles, org_lengths):
    logger.info("Running %s", args.method)
    blastdir = os.path.join(args.outdirname, ALIGNDIR[args.method])
    logger.info("Writing BLAST output to %s", blastdir)
    if not args.skip_blastn:
        logger.info("Fragmenting input files, and writing to %s", args.outdirname)
        fragfiles, fraglengths = anib.fragment_fasta_files(
            infiles, blastdir, args.fragsize
        )
        with open(os.path.join(blastdir, "fraglengths.json"), "w") as outfile:
            json.dump(fraglengths, outfile)
        logger.info("Creating job dependency graph")
        jobgraph = anib.make_job_graph(
            infiles, fragfiles, anib.make_blastcmd_builder(args.method, blastdir)
        )
        if args.scheduler == "multiprocessing":
            logger.info("Running jobs with multiprocessing")
            logger.info("Running job dependency graph")
            if args.workers is None:
                logger.info("(using maximum number of available " + "worker threads)")
            else:
                logger.info("(using %d worker threads, if available)", args.workers)
            cumval = run_mp.run_dependency_graph(
                jobgraph, workers=args.workers, logger=logger
            )
            if 0 < cumval:
                logger.warning(
                    "At least one BLAST run failed. " + "%s may fail.", args.method
                )
            else:
                logger.info("All multiprocessing jobs complete.")
        else:
            run_sge.run_dependency_graph(jobgraph, logger=logger)
            logger.info("Running jobs with SGE")
    else:
        if args.method == "ANIblastall":
            with open(os.path.join(blastdir, "fraglengths.json"), "rU") as infile:
                fraglengths = json.load(infile)
        else:
            fraglengths = None
        logger.warning("Skipping BLASTN runs (as instructed)!")
    logger.info("Processing pairwise %s BLAST output.", args.method)
    try:
        data = anib.process_blast(
            blastdir, org_lengths, fraglengths=fraglengths, mode=args.method
        )
    except ZeroDivisionError:
        logger.error("One or more BLAST output files has a problem.")
        if not args.skip_blastn:
            if 0 < cumval:
                logger.error(
                    "This is possibly due to BLASTN run failure, "
                    + "please investigate"
                )
            else:
                logger.error(
                    "This is possibly due to a BLASTN comparison "
                    + "being too distant for use."
                )
        logger.error(last_exception())
    if not args.nocompress:
        logger.info("Compressing/deleting %s", blastdir)
        compress_delete_outdir(blastdir)
    return data