def main():
<EOL>args = parse_command_line()<EOL>print(HEADER.format(ip.__version__))<EOL>np.random.seed(args.rseed)<EOL>if os.path.exists(ip.__debugflag__):<EOL><INDENT>os.remove(ip.__debugflag__)<EOL><DEDENT>if args.debug:<EOL><INDENT>print("<STR_LIT>")<EOL>ip._debug_on()<EOL><DEDENT>if args.json:<EOL><INDENT>data = ipa.tetrad(name=args.name, workdir=args.workdir, load=True)<EOL>if args.force:<EOL><INDENT>data._refresh()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>newjson = os.path.join(args.workdir, args.name+'<STR_LIT>')<EOL>print("<STR_LIT>".format(args.name))<EOL>if (not os.path.exists(newjson)) or args.force:<EOL><INDENT>if args.force:<EOL><INDENT>ipa.tetrad(name=args.name, <EOL>workdir=args.workdir, <EOL>data=args.seq, <EOL>initarr=False, <EOL>save_invariants=args.invariants,<EOL>cli=True,<EOL>quiet=True)._refresh()<EOL><DEDENT>data = ipa.tetrad(name=args.name, <EOL>workdir=args.workdir, <EOL>method=args.method, <EOL>data=args.seq, <EOL>resolve=args.resolve,<EOL>mapfile=args.map, <EOL>guidetree=args.tree, <EOL>nboots=args.boots, <EOL>nquartets=args.nquartets, <EOL>cli=True,<EOL>save_invariants=args.invariants,<EOL>)<EOL><DEDENT>else:<EOL><INDENT>raise SystemExit(QUARTET_EXISTS.format(args.name, args.workdir, args.workdir, args.name, args.name))<EOL><DEDENT><DEDENT>if args.boots:<EOL><INDENT>data.params.nboots = int(args.boots)<EOL><DEDENT>if args.ipcluster:<EOL><INDENT>ipyclient = ipp.Client(profile=args.ipcluster)<EOL>data._ipcluster["<STR_LIT>"] = len(ipyclient)<EOL><DEDENT>else:<EOL><INDENT>ipyclient = None<EOL>data._ipcluster["<STR_LIT>"] = args.cores if args.cores else detect_cpus()<EOL>data._ipcluster["<STR_LIT>"] = "<STR_LIT>"<EOL>if args.MPI:<EOL><INDENT>data._ipcluster["<STR_LIT>"] = "<STR_LIT>"<EOL>if not args.cores:<EOL><INDENT>raise IPyradWarningExit("<STR_LIT>")<EOL><DEDENT><DEDENT>data = register_ipcluster(data)<EOL><DEDENT>if data.checkpoint.boots:<EOL><INDENT>print(LOADING_MESSAGE.format(<EOL>data.name, data.params.method, data.checkpoint.boots))<EOL><DEDENT>data.run(force=args.force, ipyclient=ipyclient)<EOL>
main function