Example #1
0
      os.system("bunzip2 -c %s > %s"%(inFile, dest))
   elif base.endswith("gz"):
      os.system("gunzip -c %s > %s"%(inFile, dest))
   else:
      os.system("cp %s %s"%(inFile, dest))

   if doremove:
      os.system("rm -f %s"%(base))
    
if len(sys.argv) < 2:
    usage()
    sys.exit(1)

selectedWorkflow = ""
selectedCommands = ""
availableWf = workflow.getSupportedWorkflows("%s/workflows"%(UTILS_DIR), True)
availableWf.extend(workflow.getSupportedWorkflows(os.getcwd(), True))
availableWorkflows = dict()
for wf in availableWf:
   availableWorkflows[wf.name] = wf

allsteps = ["Preprocess","Assemble","Validate","MultiAlign","FindORFS","FindRepeats","Abundance","Annotate","FunctionalAnnotation","Scaffold","Propagate","FindScaffoldORFS","Classify","Postprocess"]

today = datetime.datetime.now()
#todaytime = date.fromtimestamp(time.time())
timestamp = "P_"+today.isoformat().replace("-","_").replace(".","").replace(":","").replace("T","_")
#print timestamp
try:
    opts, args = getopt.getopt(sys.argv[1:], "hfsq1:2:m:c:i:d:or:l:VW:", ["help", "fasta","fastq","sff","f1=","f2=","matelib=","asmcontig=","insertlen=","dir=","outtie=","readlen=","version", "workflow"])
except getopt.GetoptError, err:
    # print help information and exit:
Example #2
0
            usage()
            sys.exit(1)

if not os.path.exists(settings.rundir) or settings.rundir == "":
    print "project dir %s does not exist!" % (settings.rundir)
    usage()
    sys.exit(1)

inifile = settings.rundir + os.sep + "pipeline.ini"
inf = open(inifile, 'r')
(asmcontigs, readlibs,
 wfName) = utils.readConfigInfo(inf, "%s/Preprocess/in/" % (settings.rundir))

if wfName != "":
    #parse frag/libs out of pipeline.ini out of rundir
    availableWf = workflow.getSupportedWorkflows(
        "%s/workflows" % (utils.INITIAL_UTILS), True)
    availableWf.extend(workflow.getSupportedWorkflows(os.getcwd(), True))
    availableWorkflows = dict()
    for wf in availableWf:
        availableWorkflows[wf.name] = wf

    if wfName.lower() not in availableWorkflows.keys():
        print "Error: unknown workflow %s specified. Please choose one of %s." % (
            wfName, ",".join(availableWorkflows.keys()))
        sys.exit(1)
    wf = availableWorkflows[wfName]
    try:
        wfopts, wfargs = getopt.getopt(wf.commandList.strip().split(),
                                       shortOptions, longOptions)
        if wf.canModify():
            wfopts.extend(opts)
Example #3
0
          print "project dir %s does not exist!"%(settings.rundir)
          usage()
          sys.exit(1)

if not os.path.exists(settings.rundir) or settings.rundir == "":
    print "project dir %s does not exist!"%(settings.rundir)
    usage()
    sys.exit(1)

inifile = settings.rundir+os.sep+"pipeline.ini"
inf = open(inifile,'r')
(asmcontigs, readlibs, wfName) = utils.readConfigInfo(inf, "%s/Preprocess/in/"%(settings.rundir))

if wfName != "":
   #parse frag/libs out of pipeline.ini out of rundir
   availableWf = workflow.getSupportedWorkflows("%s/workflows"%(utils.INITIAL_UTILS), True)
   availableWf.extend(workflow.getSupportedWorkflows(os.getcwd(), True))
   availableWorkflows = dict()
   for wf in availableWf:
      availableWorkflows[wf.name] = wf

   if wfName.lower() not in availableWorkflows.keys():
      print "Error: unknown wofkflow %s specified. Please choose one of %s."%(wfName, ",".join(availableWorkflows.keys()))
      sys.exit(1)
   wf = availableWorkflows[wfName]
   try:
      wfopts, wfargs = getopt.getopt(wf.commandList.strip().split(), shortOptions, longOptions)
      if wf.canModify():
         wfopts.extend(opts)
         wfargs.extend(args)
         opts = wfopts
Example #4
0
    elif base.endswith("gz"):
        os.system("gunzip -c %s > %s" % (inFile, dest))
    else:
        os.system("cp %s %s" % (inFile, dest))

    if doremove:
        os.system("rm -f %s" % (base))


if len(sys.argv) < 2:
    usage()
    sys.exit(1)

selectedWorkflow = ""
selectedCommands = ""
availableWf = workflow.getSupportedWorkflows("%s/workflows" % (UTILS_DIR),
                                             True)
availableWf.extend(workflow.getSupportedWorkflows(os.getcwd(), True))
availableWorkflows = dict()
for wf in availableWf:
    availableWorkflows[wf.name] = wf

allsteps = [
    "Preprocess", "Assemble", "Validate", "MultiAlign", "FindORFS",
    "FindRepeats", "Abundance", "Classify", "ClassifyReads", "Benchmark",
    "FunctionalAnnotation", "Scaffold", "Propagate", "FindScaffoldORFS", "Bin",
    "Postprocess"
]

today = datetime.datetime.now()
#todaytime = date.fromtimestamp(time.time())
timestamp = "P_" + today.isoformat().replace("-", "_").replace(