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 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)