예제 #1
0
          "rm %s/Logs/assemble.ok"%(settings.rundir),\
          "RunPipeline")
    utils.run_process(settings, \
          "rm %s/Assemble/out/*.asm.contig"%(settings.rundir),\
           "RunPipeline")

if "Classify" not in skipsteps and "Classify" in forcesteps:
    utils.run_process(settings, \
          "rm %s/Logs/classify.ok"%(settings.rundir), \
          "RunPipeline")

if __name__ == "__main__":
    print "Starting metAMOS pipeline"
    if settings.threads < 1:
        settings.threads = 1
    settings = utils.initConfig(settings.kmer, settings.threads, settings.rundir, settings.taxa_level, settings.local_krona, settings.annotate_unmapped, settings.doscaffolding, settings.VERBOSE, settings.OUTPUT_ONLY)
    # add krona to system path
    currPath = os.environ["PATH"]
    if utils.Settings.KRONA not in currPath:
       os.environ["PATH"]="%s:%s"%(utils.Settings.KRONA, currPath)

    # check for memory/cpu
    if not settings.nopsutil and lowmem == False:
        import psutil

        avram = utils.getAvailableMemory(settings)
        print "[Available RAM: %d GB]"%(avram)
        lowmem= False
        if avram <= 32:
            print utils.WARNING_YELLOW+"\tThere is *%d GB of RAM currently available on this machine, suggested minimum of 32 GB"%(avram)+utils.ENDC
            print utils.WARNING_YELLOW+"\t*Enabling low MEM mode, might slow down some steps in pipeline"+utils.ENDC
예제 #2
0
   utils.run_process(settings, \
          "rm %s/FindORFS/out/%s.fna"%(settings.rundir,settings.PREFIX),"RunPipeline")
   utils.run_process(settings, \
          "touch %s/Assemble/out/%s.asm.contig"%(settings.rundir,settings.PREFIX),\
          "RunPipeline")

if "Assemble" not in skipsteps and "Assemble" in forcesteps:
    utils.run_process(settings, \
          "rm %s/Logs/assemble.ok"%(settings.rundir),\
          "RunPipeline")

if __name__ == "__main__":
    print "Starting metAMOS pipeline"
    if settings.threads < 1:
        settings.threads = 1
    settings = utils.initConfig(settings.kmer, settings.threads, settings.rundir, settings.taxa_level, settings.VERBOSE, settings.OUTPUT_ONLY)
    # add krona to system path
    currPath = os.environ["PATH"]
    if utils.Settings.KRONA not in currPath:
       os.environ["PATH"]="%s:%s"%(utils.Settings.KRONA, currPath)

    # check for memory/cpu
    if not nopsutil and lowmem == False:
        cacheusage=0
        if 'linux' in utils.Settings.OSTYPE.lower():
            cacheusage = psutil.cached_phymem()
        memusage =  `psutil.phymem_usage()`.split(",")
        freemem = long(memusage[2].split("free=")[-1])+long(cacheusage)
        percentfree = float(memusage[3].split("percent=")[-1].split(")")[0])
        avram = (freemem/1000000000)
        print "[Available RAM: %d GB]"%(avram)
예제 #3
0
import os, sys, string, time, BaseHTTPServer, getopt, time, datetime, tempfile
#from datetime import date
#from ruffus import *

INITIAL_SRC = "%s%ssrc" % (sys.path[0], os.sep)
HOME_DIR = "%s" % (sys.path[0])
UTILS_DIR = "%s%sUtilities" % (sys.path[0], os.sep)

sys.path.insert(1, INITIAL_SRC)
import utils
import workflow

utils.configureEnvironment(utils.INITIAL_UTILS)
settings = utils.Settings(1, 1, "", "")
utils.getMachineType()
settings = utils.initConfig(1, 1, "", "", False, False, False, False, False)

#code to discover frozen binary location
application_path = ""
if getattr(sys, 'frozen', False):
    application_path = os.path.dirname(sys.executable)
elif __file__:
    application_path = os.path.dirname(__file__)

#code to update frozen binary runPipeline if newer one exists
try:

    sys._MEIPASS
    #print "Download/install latest version of MetAMOS frozen binary, if available? (note, this might require root/sudo access!)"
    dl = 'y'
    #dl = raw_input("Enter Y/N: ")
예제 #4
0
    utils.run_process(settings, \
          "rm %s/Assemble/out/*.asm.contig"%(settings.rundir),\
           "RunPipeline")

if "Bin" not in skipsteps and "Bin" in forcesteps:
    utils.run_process(settings, \
          "rm %s/Logs/bin.ok"%(settings.rundir), \
          "RunPipeline")

if __name__ == "__main__":
    print "Starting metAMOS pipeline"
    if settings.threads < 1:
        settings.threads = 1
    settings = utils.initConfig(settings.kmer, settings.threads,
                                settings.rundir, settings.taxa_level,
                                settings.local_krona,
                                settings.classify_unmapped,
                                settings.doscaffolding, settings.VERBOSE,
                                settings.OUTPUT_ONLY)
    # add krona to system path
    currPath = os.environ["PATH"]
    if utils.Settings.KRONA not in currPath:
        os.environ["PATH"] = "%s:%s" % (utils.Settings.KRONA, currPath)

    # check for memory/cpu
    if not settings.nopsutil and lowmem == False:
        import psutil

        avram = utils.getAvailableMemory(settings)
        print "[Available RAM: %d GB]" % (avram)
        lowmem = False
        if avram <= 32:
예제 #5
0
파일: pobkup.py 프로젝트: pobfdm/pobkup
        aboutInfo = wx.adv.AboutDialogInfo()
        aboutInfo.SetName("Pobkup")
        aboutInfo.SetVersion(VERSION)
        aboutInfo.SetIcon(wx.Icon('icons/icon.png', wx.BITMAP_TYPE_PNG))
        aboutInfo.SetDescription(_("A simple gui for Rsync"))
        aboutInfo.SetCopyright(
            "Released under GNU/GPL v3 License \n\n Author: Fabio Di Matteo - [email protected]"
        )
        aboutInfo.SetWebSite("https://github.com/pobfdm/pobkup")
        aboutInfo.AddDeveloper("Fabio Di Matteo - [email protected]")
        aboutInfo.AddArtist(
            "Arthur Zaynullin https://www.iconfinder.com/Ampeross")
        wx.adv.AboutBox(aboutInfo)


if __name__ == '__main__':

    #Gettext
    try:
        current_locale, encoding = locale.getdefaultlocale()
        locale_path = 'locale'
        language = gettext.translation('pobkup', locale_path, [current_locale])
        language.install()
    except:
        print("Locale not found")
        _ = gettext.gettext

    utils.initConfig()
    app = MainApp(False)
    app.MainLoop()