Esempio n. 1
0
    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,
    "=======================================================================")
core.logCheck(l, logfilename, "\t\t\tMasking alignments with GBlocks")
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime())
if fileflag == 1:
    core.logCheck(l, logfilename,
                  "INPUT    | Masking alignment from file: " + ins)
else:
    core.logCheck(l, logfilename,
                  "INPUT    | Masking alignments from all files in: " + indir)
core.logCheck(l, logfilename, "INFO     | GBlocks path set to: " + gb_path)
core.logCheck(l, logfilename, "INFO     | Sequence type set to: " + seqtype)
if m == 1:
    core.logCheck(
        l, logfilename,
        "INFO     | Only accepting alignments with < 20% of sequence masked (for tree making)."
Esempio n. 2
0
		else:
			script_outdir = script_outdir + "-" + outdir_suffix + "/";
	outdir = script_outdir + "codeml_out/";
	filelist = os.listdir(indir);
	if aopt == 1:
		ancdir = script_outdir + "anc_seqs_fa/";

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

logfilename = script_outdir + "run_codeml.log";
logfile = open(logfilename, "w");
logfile.write("");
logfile.close();

core.logCheck(l, logfilename, "=======================================================================");
core.logCheck(l, logfilename, "\t\t\tRunning codeml");
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime());
if fileflag == 1:
	core.logCheck(l, logfilename, "INPUT    | Making tree from file:\t\t" + ins);
else:
	core.logCheck(l, logfilename, "INPUT    | Running codeml on all files in:\t" + indir);
core.logCheck(l, logfilename, "INFO     | PAML path set to:\t\t\t" + ppath);
if treefile != "":
	core.logCheck(l, logfilename, "INFO     | Using tree from file:\t\t" + treefile);
else:
	core.logCheck(l, logfilename, "INFO     | No tree file specified. codeml will infer a tree for each gene.");
if prune == 1:
	core.logCheck(l, logfilename, "INFO     | Pruning the tree for each gene.");
if bsopt == 0:
	core.logCheck(l, logfilename, "INFO     | Not doing branch-site test.");
Esempio n. 3
0
	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, "=======================================================================");
core.logCheck(l, logfilename, "\t\t\tMasking alignments with GBlocks");
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime());
if fileflag == 1:
	core.logCheck(l, logfilename, "INPUT    | Masking alignment from file: " + ins);
else:
	core.logCheck(l, logfilename, "INPUT    | Masking alignments from all files in: " + indir);
core.logCheck(l, logfilename, "INFO     | GBlocks path set to: " + gb_path);
core.logCheck(l, logfilename, "INFO     | Sequence type set to: " + seqtype);
if m == 1:
	core.logCheck(l, logfilename, "INFO     | Only accepting alignments with < 20% of sequence masked (for tree making).");
else:
	core.logCheck(l, logfilename, "INFO     | Using default GBlocks settings (stringent).");
if v == 1:
	core.logCheck(l, logfilename, "INFO     | Printing all GBlocks output to the screen.");
else:
Esempio n. 4
0
        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
os.system("mkdir '" + script_outdir + "'")

logfilename = script_outdir + "supertreemaker.log"
logfile = open(logfilename, "w")
logfile.write("")
logfile.close()
##Pre-run prep: creating log files and output directories, etc...

core.logCheck(
    l, logfilename,
    "=======================================================================")
core.logCheck(l, logfilename,
              "\tSupertree making with SDM, R, newickutils, and r8s")
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime())
core.logCheck(l, logfilename,
              "INPUT    | Making tree from file:\t\t\t" + infilename)
core.logCheck(l, logfilename,
              "INPUT    | Input file located in:\t\t\t" + indir)
if njopt == 1:
    core.logCheck(
        l, logfilename,
        "INFO     | Using Average Consensus method in SDM to build distance matrix."
    )
    core.logCheck(
        l, logfilename,
Esempio n. 5
0
    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
mk_cmd = "mkdir " + script_outdir
os.system(mk_cmd)

logfilename = os.path.join(script_outdir, "run_codeml.log")
# logfile = open(logfilename, "w");
# logfile.write("");
# logfile.close();

core.logCheck(
    l, logfilename,
    "=======================================================================")
core.logCheck(l, logfilename, "\t\t\tRunning codeml")
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime())
if fileflag == 1:
    core.logCheck(l, logfilename,
                  "INPUT    | Making tree from file:\t\t" + ins)
else:
    core.logCheck(l, logfilename,
                  "INPUT    | Running codeml on all files in:\t" + indir)
core.logCheck(l, logfilename, "INFO     | PAML path set to:\t\t\t" + ppath)
if treefile != "":
    core.logCheck(l, logfilename,
                  "INFO     | Using tree from file:\t\t" + treefile)
else:
    core.logCheck(
Esempio n. 6
0
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;
os.system("mkdir '" + script_outdir + "'");

logfilename = script_outdir + "supertreemaker.log";
logfile = open(logfilename, "w");
logfile.write("");
logfile.close();
##Pre-run prep: creating log files and output directories, etc...

core.logCheck(l, logfilename, "=======================================================================");
core.logCheck(l, logfilename, "\tSupertree making with SDM, R, newickutils, and r8s");
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime());
core.logCheck(l, logfilename, "INPUT    | Making tree from file:\t\t\t" + infilename);
core.logCheck(l, logfilename, "INPUT    | Input file located in:\t\t\t" + indir);
if njopt == 1:
	core.logCheck(l, logfilename, "INFO     | Using Average Consensus method in SDM to build distance matrix.");
	core.logCheck(l, logfilename, "INFO     | Using R to build a neighbor-joining tree from matrix.");
else:
	core.logCheck(l, logfilename, "INFO     | Not creating consensus tree.");
if rr == 1:
	core.logCheck(l, logfilename, "INFO     | Rooting the NJ tree with species:\t\t" + outgroup);
if d == 0:
	core.logCheck(l, logfilename, "INFO     | NOT estimating divergence times with r8s.");
else:
	core.logCheck(l, logfilename, "INFO     | Will estimate divergence times with r8s.");
Esempio n. 7
0
        fileflag = 0
        filelist = os.listdir(ins)
ins = os.path.abspath(ins)

script_outdir = os.path.abspath(script_outdir)
bestdir = os.path.join(script_outdir, "raxml-best")
outdir = os.path.join(script_outdir, "raxml-out")

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

logfilename = os.path.join(script_outdir, "run_raxml.log")
core.filePrep(logfilename)

core.logCheck(
    l, logfilename,
    "=======================================================================")
core.logCheck(l, logfilename, "\t\t\tBuilding trees with RAxML")
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime())
if fileflag == 1:
    core.logCheck(l, logfilename,
                  "INPUT    | Making tree from file:\t\t" + ins)
else:
    core.logCheck(l, logfilename,
                  "INPUT    | Making trees from all files in:\t" + ins)
core.logCheck(l, logfilename, "INPUT    | RAxML path set to:\t\t\t" + rax_path)
core.logCheck(l, logfilename,
              "INFO     | Using the following DNA or AA model:\t" + model)
if b > 0:
    core.logCheck(
        l, logfilename,
Esempio n. 8
0
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")
logfile.write("")
logfile.close()

core.logCheck(l, logfilename, "=======================================================================")
core.logCheck(l, logfilename, "\t\t\tBuilding trees with RAxML")
core.logCheck(l, logfilename, "\t\t\t" + core.getDateTime())
if fileflag == 1:
    core.logCheck(l, logfilename, "INPUT    | Making tree from file:\t\t" + indir)
else:
    core.logCheck(l, logfilename, "INPUT    | Making trees from all files in:\t" + indir)
core.logCheck(l, logfilename, "INPUT    | RAxML path set to:\t\t\t" + rax_path)
core.logCheck(l, logfilename, "INFO     | Using the following DNA or AA model:\t" + model)
if b > 0:
    core.logCheck(l, logfilename, "INFO     | Performing " + str(b) + " bootstrap replicates per tree.")
else:
    core.logCheck(l, logfilename, "INFO     | Not performing bootstrap analysis.")
if t > 1:
    core.logCheck(l, logfilename, "INFO     | Using " + str(t) + " threads.")
else: