def __init__(self, scheduler, projectId): self.checkScheduler(scheduler) self.scheduler = scheduler # SGE self.projectId = projectId self.groupId2group = {} # key=identifier value=object self.path2db = "%s/%s_%s.db" % (os.getcwd(), self.projectId, Utils.uniq_alphanum(5)) self.db = DbSqlite(self.path2db) self.setUpJobTable()
def getVersionGatk(pathToJar=None): if pathToJar == None: pathToJar = Utils.getProgramPath("GenomeAnalysisTK.jar") args = ["java", "-Xmx1g", "-jar", pathToJar, "--version"] # p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE).communicate() cmd = " ".join(args) p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).communicate() version = p[0].split("-")[0] majVer = int(version.split(".")[0]) minVer = int(version.split(".")[1]) return majVer, minVer