def add(self, index_list): """ Takes a tuple of indices. Concatenates the records in the record list at these indices, and builds a tree. Returns the tree """ if index_list in self.concats: return self.concats[index_list] concat = self.concatenate(index_list) if self.analysis == 'TreeCollection': guidetrees = [self.records[n].tree for n in index_list][:self.max_guidetrees] tree = TrClTree.cast( runTC(concat, guidetrees, verbosity=self.verbosity)) else: tree = TrClTree.cast( runPhyml(concat, analysis=self.analysis, verbosity=self.verbosity)) # concat local variable dies here and goes to garbage collect self.concats[index_list] = tree return tree
def calc_NJ_trees(self, verbosity=0): self.analysis = 'nj' for rec in self.records: runPhyml(rec, analysis='nj', verbosity=verbosity, tmpdir=self.tmpdir) rec.tree = TrClTree.cast(rec.tree) if verbosity == 1: print
def calc_NJ_trees(self, analysis='nj', verbosity=0): self.analysis = analysis for rec in self.records: runPhyml(rec, self.tmpdir, analysis=analysis, verbosity=verbosity, taxon_set=self.taxon_set) rec.tree = TrClTree.cast(rec.tree) if verbosity == 1: print
def calc_ML_trees(self, verbosity=0): self.analysis = 'ml' for rec in self.records: runPhyml(rec, analysis=self.analysis, verbosity=verbosity, tmpdir=self.tmpdir) rec.tree = TrClTree.cast(rec.tree)
def add(self, index_list): """ Takes a tuple of indices. Concatenates the records in the record list at these indices, and builds a tree. Returns the tree """ if index_list in self.concats: return self.concats[index_list] concat = self.concatenate(index_list) if self.analysis == 'TreeCollection': guidetrees = [self.records[n].tree for n in index_list][:self.max_guidetrees] tree = TrClTree.cast(runTC(concat, guidetrees, verbosity=self.verbosity)) else: tree = TrClTree.cast(runPhyml(concat, analysis=self.analysis, verbosity=self.verbosity)) # concat local variable dies here and goes to garbage collect self.concats[index_list] = tree return tree
def calc_TC_trees(self, verbosity=0): self.analysis = 'TreeCollection' for rec in self.records: runTC(rec, verbosity=verbosity, tmpdir=self.tmpdir) rec.tree = TrClTree.cast(rec.tree)