input="allele.table",
                            name="BS.%d" %bs))
    condor_temp =  main + "\n".join(a)
    
    out = open(os.path.join(outpath, "condor.st"), "w")
    out.write(condor_temp)
    out.close()        
    
if __name__ == '__main__':
    
    outdir = sys.argv[1]
    BS = int(sys.argv[2]) 
    indir = sys.argv[3]
        
    
    if (os.path.exists(outdir)):
        #i = 0
        #while os.path.exists(outdir+".back.%d" %i):
        #    i += 1
        #os.rename(outdir, outdir+".back.%d"%i)
        sys.stdout.writelines("The output directory %s already exists. Do you want to proceed? (y/n)?" % outdir)        
        a = sys.stdin.readline()
        if a != "y\n":
            sys.exit(1)
    else:
        os.makedirs(outdir)
    
    require_dir(os.path.join(outdir, "logs"))
                            
    make_BS_condor(outdir, BS, indir)
    make_ST_condor(outdir, "mpest", "", "mpest", BS)
Exemple #2
0
        sys.stdout.writelines(
            "The output directory %s already exists. Do you want to proceed? (y/n)?"
            % outdir)
        a = sys.stdin.readline()
        if a != "y\n":
            sys.exit(1)
    else:
        os.makedirs(outdir)

    for ds in datasets:
        ds_paths, replicas, names, outgroup = get_datasets(
            ds, twophase_conf.get("datasets", ds))
        for ds_path in ds_paths:
            ds_name = os.path.basename(ds_path)
            out_ds_path = os.path.join(outdir, ds_name)
            require_dir(out_ds_path)
            for rep in replicas:
                out_rep_path = os.path.join(out_ds_path, "R%d" % rep)
                print out_rep_path
                require_dir(out_rep_path)
                for ml in mltools:
                    ml_tool = ml.split(".")[0]
                    for alg in algtools:
                        out_path = os.path.join(out_rep_path,
                                                "%s_%s" % (ml, alg))
                        require_dir(out_path)

                        require_dir(os.path.join(out_path, "logs"))

                        alg_tool = alg.split(".")[0]
Exemple #3
0
        sys.stdout.writelines(
            "The output directory %s already exists. Do you want to proceed? (y/n)?"
            % outdir)
        a = sys.stdin.readline()
        if a != "y\n":
            sys.exit(1)
    else:
        os.makedirs(outdir)

    for ds in datasets:
        ds_paths, replicas, names, outgroup, options = get_datasets(
            ds, twophase_conf.get("datasets", ds))
        for ds_path in ds_paths:
            ds_name = os.path.basename(ds_path)
            out_ds_path = os.path.join(outdir, ds_name)
            require_dir(out_ds_path)
            for rep in replicas:
                out_rep_path = os.path.join(out_ds_path, "R%d" % rep)
                print out_rep_path
                require_dir(out_rep_path)
                for ml in mltools:
                    ml_tool = ml.split(".")[0]
                    for alg in algtools:
                        out_path = os.path.join(out_rep_path,
                                                "%s_%s" % (ml, alg))
                        require_dir(out_path)

                        require_dir(os.path.join(out_path, "logs"))

                        alg_tool = alg.split(".")[0]