Esempio n. 1
0
        parser.print_help()
        sys.exit()


############################################
#Main Block
############################################

ins, gb_path, seqtype, m, v, l = optParse(0)

starttime = core.getLogTime()

if os.path.isfile(ins):
    fileflag = 1
    indir = os.path.dirname(os.path.realpath(ins)) + "/"
    indir, outdir = core.getOutdir(indir, "run_gblocks", starttime)
    filelist = [ins]
else:
    fileflag = 0
    indir, outdir = core.getOutdir(ins, "run_gblocks", starttime)
    filelist = os.listdir(indir)

print core.getTime() + " | Creating main output directory..."
os.system("mkdir " + outdir)

logfilename = outdir + "run_gblocks.log"
logfile = open(logfilename, "w")
logfile.write("")
logfile.close()

core.logCheck(
Esempio n. 2
0
############################################

ins, ppath, treefile, prune, seqtype, bsopt, aopt, v, l, outdir_suffix = optParse(0);

starttime = core.getLogTime();

if not os.path.isdir(ppath):
	core.errorOut(10, "-c must be a valid directory path");
	optParse(1);
elif ppath[-1] != "/":
	ppath = ppath + "/";

if os.path.isfile(ins):
	fileflag = 1;
	indir = os.path.dirname(os.path.realpath(ins)) + "/";
	indir, script_outdir = core.getOutdir(indir, "run_codeml", starttime);
	outdir = script_outdir + "codeml_out/";
	if aopt == 1:
		ancdir = script_outdir + "anc_seqs_fa/";
	filelist = [ins];

else:
	fileflag = 0;
	indir, script_outdir = core.getOutdir(ins, "run_codeml", starttime);
	if outdir_suffix != None:
		if script_outdir[-1] == "/":
			script_outdir = script_outdir[:len(script_outdir)-1] + "-" + outdir_suffix + "/";
		else:
			script_outdir = script_outdir + "-" + outdir_suffix + "/";
	outdir = script_outdir + "codeml_out/";
	filelist = os.listdir(indir);
Esempio n. 3
0
	elif errorflag == 1:
		parser.print_help();
		sys.exit();

############################################
#Main Block
############################################

ins, gb_path, seqtype, m, v, l = optParse(0);

starttime = core.getLogTime();

if os.path.isfile(ins):
	fileflag = 1;
	indir = os.path.dirname(os.path.realpath(ins)) + "/";
	indir, outdir = core.getOutdir(indir, "run_gblocks", starttime);
	filelist = [ins];
else:
	fileflag = 0;
	indir, outdir = core.getOutdir(ins, "run_gblocks", starttime);
	filelist = os.listdir(indir);

print core.getTime() + " | Creating main output directory...";
os.system("mkdir " + outdir);

logfilename = outdir + "run_gblocks.log";
logfile = open(logfilename, "w");
logfile.write("");
logfile.close();

core.logCheck(l, logfilename, "=======================================================================");
Esempio n. 4
0
############################################
#Main Block
############################################

infilename, routfilename, njopt, outgroup, rr, d, r8soutfilename, numsites, calspec, calage, l, script_outdir_initial, outdir_suffix = optParse(
    0)

starttime = core.getLogTime()

if infilename.find("/") != -1:
    indir = os.path.dirname(os.path.realpath(infilename)) + "/"
    infilename = infilename[infilename.rfind("/") + 1:]
else:
    indir = os.getcwd() + "/"

indir, script_outdir = core.getOutdir(indir, "supertreemaker", starttime)
print script_outdir
print os.path.basename(os.path.normpath(script_outdir))
if script_outdir_initial != None:
    if not os.path.isdir(script_outdir_initial):
        core.errorOut(8, "-z must be a valid directory")
        optParse(1)

    script_outdir = os.path.join(
        script_outdir_initial,
        os.path.basename(os.path.normpath(script_outdir)))
if outdir_suffix != None:
    if script_outdir[-1] == "/":
        script_outdir = script_outdir[:len(script_outdir) -
                                      1] + "-" + outdir_suffix + "/"
    else:
Esempio n. 5
0
ins, ppath, treefile, prune, seqtype, bsopt, aopt, v, l, outdir_suffix = optParse(
    0)

starttime = core.getLogTime()

if not os.path.isdir(ppath):
    core.errorOut(10, "-c must be a valid directory path")
    optParse(1)
codeml_path = os.path.join(ppath, "bin", "codeml")
if outdir_suffix != "":
    outdir_suffix = "-" + outdir_suffix

if os.path.isfile(ins):
    fileflag = 1
    indir = os.path.dirname(os.path.realpath(ins))
    indir, script_outdir = core.getOutdir(indir, "run_codeml", starttime)
    outdir = os.path.join(script_outdir, "codeml_out")
    if aopt == 1:
        ancdir = os.path.join(script_outdir, "anc_seqs_fa")
    filelist = [ins]

else:
    fileflag = 0
    indir, script_outdir = core.getOutdir(ins, "run_codeml", outdir_suffix,
                                          starttime)
    outdir = os.path.join(script_outdir, "codeml_out")
    filelist = os.listdir(indir)
    if aopt == 1:
        ancdir = os.path.join(script_outdir, "anc_seqs_fa")

print core.getTime() + " | Creating main output directory:\t" + script_outdir
Esempio n. 6
0
############################################
#Main Block
############################################

infilename, routfilename, njopt, outgroup, rr, d, r8soutfilename, numsites, calspec, calage, l, script_outdir_initial, outdir_suffix = optParse(0);

starttime = core.getLogTime();

if infilename.find("/") != -1:
	indir = os.path.dirname(os.path.realpath(infilename)) + "/";
	infilename = infilename[infilename.rfind("/")+1:];
else:
	indir = os.getcwd() + "/";

indir, script_outdir = core.getOutdir(indir, "supertreemaker", starttime);
print script_outdir;
print os.path.basename(os.path.normpath(script_outdir));
if script_outdir_initial != None:
	if not os.path.isdir(script_outdir_initial):
		core.errorOut(8, "-z must be a valid directory");
		optParse(1);

	script_outdir = os.path.join(script_outdir_initial, os.path.basename(os.path.normpath(script_outdir)));
if outdir_suffix != None:
	if script_outdir[-1] == "/":
		script_outdir = script_outdir[:len(script_outdir)-1] + "-" + outdir_suffix + "/";
	else:
		script_outdir = script_outdir + "-" + outdir_suffix + "/";

print core.getTime() + " | Creating main output directory:\t" + script_outdir;
Esempio n. 7
0
############################################
#Main Block
############################################

ins, rax_path, model, b, t, v, const_tree, bl_opt, script_outdir, l = optParse(
    0)

starttime = core.getLogTime()

if script_outdir == "":
    if os.path.isfile(ins):
        fileflag = 1
        indir = os.path.dirname(os.path.realpath(ins))
        filelist = [os.path.abspath(ins)]
        indir, script_outdir = core.getOutdir(indir, "run_raxml", starttime)
        ins = indir
    else:
        fileflag = 0
        indir, script_outdir = core.getOutdir(ins, "run_raxml", starttime)
        filelist = os.listdir(indir)
        ins = indir
else:
    counter = 1
    while os.path.exists(script_outdir):
        if counter == 1:
            script_outdir = script_outdir + "-" + str(counter)
        else:
            script_outdir = script_outdir[:script_outdir.index("-") +
                                          1] + str(counter)
        counter += 1
Esempio n. 8
0
        parser.print_help()
        sys.exit()


############################################
# Main Block
############################################

ins, rax_path, model, b, t, v, c, l = optParse(0)

starttime = core.getLogTime()

if os.path.isfile(ins):
    fileflag = 1
    indir = os.path.dirname(os.path.realpath(ins)) + "/"
    indir, script_outdir = core.getOutdir(indir, "run_raxml", starttime)
    bestdir = script_outdir + "raxml_best/"
    outdir = script_outdir + "raxml_out/"
    filelist = [ins]
else:
    fileflag = 0
    indir, script_outdir = core.getOutdir(ins, "run_raxml", starttime)
    bestdir = script_outdir + "raxml_best/"
    outdir = script_outdir + "raxml_out/"
    filelist = os.listdir(indir)

print core.getTime() + " | Creating main output directory:\t" + script_outdir
os.system("mkdir '" + script_outdir + "'")

logfilename = script_outdir + "run_raxml.log"
logfile = open(logfilename, "w")