Example #1
0
        static public void BWTTest()
        {
            string s = "attgccatgaaatggcgcgctttttttt$";
            string q = "tg";

            Console.WriteLine(s);
            Console.WriteLine(q);
            BWT        bwt = new BWT(s);
            FM_Matches fm  = bwt.Match(q);

            Console.WriteLine("{0}, {1}", fm.top, fm.bot);
            for (int i = 0; i < fm.num; i++)
            {
                Console.WriteLine("{0}", fm.qpos[i]);
                for (int j = 0; j < q.Length; j++)
                {
                    Console.Write("{0}", s[fm.qpos[i] + j]);
                }
                Console.WriteLine();
            }

            //s 안의 q의 갯수만큼 top과 bot의 차이가 생긴다.
        }
Example #2
0
        static public void AllRotaitonsTest()
        {
            string s = "abcd$";

            Useful.Print2DArray(BWT.AllRotations(s), s.Length, s.Length);
        }