示例#1
0
文件: uniq_subs.py 项目: gwct/gwct
		return args.input, args.target_specs, args.output_suffix;

	elif errorflag == 1:
		parser.print_help();
		sys.exit();

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

starttime = gwctcore.getLogTime();
indir, targets, suffix = optParse(0);
targets = targets.split(",");

indir, script_outdir = gwctcore.getOutdir(indir, "gwct", starttime, suffix);

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

logfilename = os.path.join(script_outdir, "gwct.log");
logfile = open(logfilename, "w");
logfile.write("");
logfile.close();
uniq_header = "#\tChromosome\tGeneID\tAlignLen\tPosition\tBackgroundAlleles\tTargetAlleles\n";
l = 1;
sp = 65;

gwctcore.logCheck(l, logfilename, "# =======================================================================");
gwctcore.logCheck(l, logfilename, "#\tGWCT: Genome-Wide Convergence Tester -- Unique substitutions");
gwctcore.logCheck(l, logfilename, "#\t\t\t" + gwctcore.getDateTime());
示例#2
0
文件: gwct_codeml.py 项目: gwct/gwct
############################################
#Main Block
############################################

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

starttime = gwctcore.getLogTime();

if not os.path.isdir(ppath):
	gwctcore.errorOut(10, "-c must be a valid directory path");
	optParse(1);

if os.path.isfile(ins):
	fileflag = 1;
	indir = os.path.dirname(os.path.realpath(ins));
	indir, script_outdir = gwctcore.getOutdir(indir, "run_codeml", starttime, outdir_suffix);
	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 = gwctcore.getOutdir(ins, "run_codeml", starttime, outdir_suffix);
	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 gwctcore.getTime() + " | Creating main output directory:\t" + script_outdir;
os.system("mkdir " + script_outdir);
示例#3
0
        return args.input, args.target_specs, args.output_suffix

    elif errorflag == 1:
        parser.print_help()
        sys.exit()


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

starttime = gwctcore.getLogTime()
indir, targets, suffix = optParse(0)
targets = targets.split(",")

indir, script_outdir = gwctcore.getOutdir(indir, "gwct", starttime, suffix)

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

logfilename = os.path.join(script_outdir, "gwct.log")
logfile = open(logfilename, "w")
logfile.write("")
logfile.close()
uniq_header = "#\tChromosome\tGeneID\tAlignLen\tPosition\tBackgroundAlleles\tTargetAlleles\n"
l = 1
sp = 65

gwctcore.logCheck(
    l, logfilename,