def __init__(self, id0, seqs, PPcut): #seqs is list format of mega alignment self.PPcut=PPcut Align = MegaAlignment() tree_builder = MegaML() tree_analyzer = TreeAnalizer() self.InMeg = Align.AddNormal(seqs) status = tree_builder.do_mega_ml(self.InMeg, id0) if status == True: tree = tree_builder.newick_trees else: print 'failed to run megaML' self.Tree_rooted = tree_analyzer.RootTree(tree, 'Normal')
def __init__(self, seqs, num_support_position, Cell2PPls, initial_seq_builder, OutFileName): self.cut = num_support_position Align = MegaAlignment() self.ini_seqs_builder = seqs self.CellLs, self.Cell2Seq = Align.name2seq(seqs) self.SNVnum = len(self.Cell2Seq[self.CellLs[0]]) self.InMeg = Align.AddNormal(seqs) IniCellLs, self.Cell2iniSeq = Align.name2seq(initial_seq_builder) self.Cell2PPls = Cell2PPls self.out_file_name = OutFileName