def runCactusAddReferenceCoordinates(cactusDiskDatabaseString, flowerNames, logLevel=None, referenceEventString=None, outgroupEventString=None, secondaryDatabaseString=None, bottomUpPhase=None): logLevel = getLogLevelString2(logLevel) bottomUpPhase = nameValue("bottomUpPhase", bottomUpPhase, bool) referenceEventString = nameValue("referenceEventString", referenceEventString) outgroupEventString = nameValue("outgroupEventString", outgroupEventString) secondaryDatabaseString = nameValue("secondaryDisk", secondaryDatabaseString, quotes=True) command = "cactus_addReferenceCoordinates --cactusDisk '%s' %s --logLevel %s %s %s %s" % (cactusDiskDatabaseString, secondaryDatabaseString, logLevel, referenceEventString, outgroupEventString, bottomUpPhase) popenPush(command, stdinString=flowerNames)
def runCactusPhylogeny(cactusDiskDatabaseString, flowerNames=encodeFlowerNames((0,)), logLevel=None): logLevel = getLogLevelString2(logLevel) command = "cactus_phylogeny --cactusDisk '%s' --logLevel %s" % \ (cactusDiskDatabaseString, logLevel) popenPush(command, stdinString=flowerNames) logger.info("Ran cactus_phylogeny okay")
def runCactusCheck(cactusDiskDatabaseString, flowerNames=encodeFlowerNames((0,)), logLevel=None, recursive=None, checkNormalised=None): logLevel = getLogLevelString2(logLevel) recursive = nameValue("recursive", recursive, bool) checkNormalised = nameValue("checkNormalised", checkNormalised, bool) popenPush("cactus_check --cactusDisk '%s' --logLevel %s %s %s" % (cactusDiskDatabaseString, logLevel, recursive, checkNormalised), stdinString=flowerNames) logger.info("Ran cactus check")
def run(self): cmdline = self.prepOptions.cmdLine.replace("IN_FILE", '"' + self.inChunk + '"') cmdline = cmdline.replace("OUT_FILE", '"' + self.outChunk + '"') cmdline = cmdline.replace("TEMP_DIR", '"' + self.getLocalTempDir() + '"') cmdline = cmdline.replace("PROPORTION_SAMPLED", str(self.proportionSampled)) logger.info("Preprocessor exec " + cmdline) # print "command", cmdline # sys.exit(1) popenPush(cmdline, " ".join(self.seqPaths)) if self.prepOptions.check: system("cp %s %s" % (self.inChunk, self.outChunk))
def runCactusHalGenerator(cactusDiskDatabaseString, secondaryDatabaseString, flowerNames, referenceEventString, outputFile=None, showOnlySubstitutionsWithRespectToReference=None, logLevel=None): logLevel = getLogLevelString2(logLevel) popenPush("cactus_halGenerator --cactusDisk '%s' --secondaryDisk '%s' --logLevel %s %s %s %s" % (cactusDiskDatabaseString, secondaryDatabaseString, logLevel, nameValue("referenceEventString", referenceEventString), nameValue("outputFile", outputFile), nameValue("showOnlySubstitutionsWithRespectToReference", showOnlySubstitutionsWithRespectToReference, bool)), stdinString=flowerNames)
def runCactusMakeNormal(cactusDiskDatabaseString, flowerNames, maxNumberOfChains=0, logLevel=None): """Makes the given flowers normal (see normalisation for the various phases) """ logLevel = getLogLevelString2(logLevel) popenPush("cactus_normalisation --cactusDisk '%s' --maxNumberOfChains %i --logLevel %s" % (cactusDiskDatabaseString, maxNumberOfChains, logLevel), stdinString=flowerNames)
def runCactusAdjacencies(cactusDiskDatabaseString, flowerNames=encodeFlowerNames((0,)), logLevel=None): logLevel = getLogLevelString2(logLevel) command = "cactus_fillAdjacencies --cactusDisk '%s' --logLevel %s" %\ (cactusDiskDatabaseString, logLevel) popenPush(command, stdinString=flowerNames) logger.info("Ran cactus_fillAdjacencies OK")
def run(self): popenPush("cactus_batch_mergeChunks > %s" % self.outSequencePath, " ".join(self.chunkList))