def run(self): logger.info('MergeTreeFollow object running, name: %s' % (self.name)) outname = os.path.join(self.options.rootDir, 'burnin.maf') if (os.path.exists(os.path.join(self.options.rootDir, 'burnin.tmp.maf')) and not os.path.exists(outname)): treelessRootCmd = ['-treelessRoot2=%s' % lsc.burninRootName(self.options)] maf1 = os.path.join(self.options.rootDir, self.options.rootName + '.maf') maf2 = os.path.join(self.options.rootDir, 'burnin.tmp.maf') # drop = os.path.join(self.options.rootDir, 'burnin.dropped.maf') cmds = lsc.buildMergeCommand(maf1, maf2, outname, treelessRootCmd, self.name, self.options) lsc.runCommands(cmds, self.getLocalTempDir())
def run(self): logger.info('MergeMafsUp object running, name: %s nodeParent: %s' % (self.name, self.nodeParent)) ############################## # The 'lookup' aspect of the merge is only performed when we are not at the root # This merge merges the results of the 'lookdown' merge, that is to say the maf that contains # all descendant sequences including the node, with the node-parent maf, to produce a maf # that the parent can use to merge its children. if self.name == self.options.rootName: return outname = os.path.join(self.options.simDir, self.name, self.nodeParent + '.maf') if not os.path.exists(outname): treelessRootCmd = ['-treelessRoot2=%s' % self.nodeParent] maf1 = os.path.join(self.options.simDir, self.name, self.name + '.maf') maf2 = os.path.join(self.options.simDir, self.name, self.nodeParent + '.tmp.maf') cmds = lsc.buildMergeCommand(maf1, maf2, outname, treelessRootCmd, self.name, self.options) lsc.runCommands(cmds, self.getLocalTempDir())
def run(self): logger.info('MergeTreeDown object running, name: %s nodeParent: %s' % (self.name, self.nodeParent)) treelessRootCmd = [] for i in xrange(0,2): if self.nodeDict[self.name].children[i] in self.leafsDict: treelessRootCmd.append('-treelessRoot%d=%s' % (i + 1, self.name)) ############################## # the 'lookdown' aspect of the merge is performed for every node, including the root. outname = os.path.join(self.options.simDir, self.name, self.name + '.maf') if not os.path.exists(outname): maf1 = os.path.join(self.options.simDir, self.nodeDict[self.name].children[0], self.name + '.maf') maf2 = os.path.join(self.options.simDir, self.nodeDict[self.name].children[1], self.name + '.maf') cmds = lsc.buildMergeCommand(maf1, maf2, outname, treelessRootCmd, self.name, self.options) lsc.runCommands(cmds, self.getLocalTempDir()) self.setFollowOnTarget(MergeMafsUp(self.nt, self.nodeDict, self.nodeParentDict, self.leafsDict, self.nodeParent, self.options))