public static void GenerateOther()//generating from other files { Console.Clear(); Console.WriteLine("enter newick file location"); string newick = System.IO.File.ReadAllText(Console.ReadLine()); Console.Clear(); NewickReader n = new NewickReader(); Tree tree = n.Read(newick); Console.WriteLine("enter assinment file location"); string[] lines = System.IO.File.ReadAllLines(Console.ReadLine()); for (int i = 0; i < lines.Length; i++) { lines[i] = lines[i].Replace("\t", ""); } foreach (Node node in tree.nodeList) { if (node.name != "") { node.name = lines[Convert.ToInt32(node.name) - 1]; } } tree.root.name = "root"; tree.LayoutPosition2(); Console.WriteLine(tree.Print()); Console.ReadLine(); }
public static void NewickGenerate() { Console.Clear(); Console.WriteLine("enter newick file location"); string newick = System.IO.File.ReadAllText(Console.ReadLine()); Console.Clear(); NewickReader n = new NewickReader(); Tree tree = n.Read(newick); tree.root.name = "root"; tree.LayoutPosition2(); Console.WriteLine(tree.Print()); Console.ReadLine(); }