Exemple #1
0
        static void Main(string[] args)
        {
            DateTime startTime = DateTime.Now;
            string   choice    = "";

            while (choice != "10")
            {
                menu();
                choice = Console.ReadLine();
                switch (choice)
                {
                case "1":
                    BarrelEllipse.testEllipseSinglePDB();
                    break;

                case "2":
                    BarrelEllipse.runEllipseData();
                    break;

                case "3":
                    Data.getData();
                    break;

                case "4":
                    AlignPDB testAlign = new AlignPDB();
                    break;

                case "5":
                    run();
                    break;

                case "6":

                    break;

                case "7":

                    break;

                case "8":

                    break;

                case "9":
                    PDBInfo testInfo = new PDBInfo();
                    break;

                default:
                    //10. Quit
                    choice = "10";
                    break;
                }
            }


            Console.WriteLine("Program took from: \n start: {0} \n   end: {1}", startTime, DateTime.Now);

            return;
        }
Exemple #2
0
        static void Main(string[] args)
        {
            DateTime startTime = DateTime.Now;
            //using (StreamWriter log = File.AppendText(Global.OUTPUT_DIR + "log.txt"))
            //{
            //    log.WriteLine("working with db ({0})", DateTime.Now);
            //    //log.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}", "PdbName", "Success", "barrelType", "chainID", "numberOfStrands");
            //}

            string choice = "";

            string method_input = "3";
            string use_method   = "all";

            while (choice != "10")
            {
                Display_menu();
                choice = Console.ReadLine();
                switch (choice)
                {
                case "1":
                    // Test B-Barrel: check if a specific PDB can have its barrel read in and works
                    BarrelStructures.Protein _protein = null;
                    BarrelStructures.Barrel  _barrel  = null;
                    Console.WriteLine("Enter pdb:");
                    string PDBid = Console.ReadLine();

                    Console.WriteLine("Enter method (1=mono, 2=poly, default=all):");
                    method_input = Console.ReadLine();
                    use_method   = "all";
                    if (method_input == "1")
                    {
                        use_method = "mono";
                    }
                    if (method_input == "2")
                    {
                        use_method = "poly";
                    }
                    Console.WriteLine("Attempting to run {0} with {1} code.  Output will be in \n{2}", PDBid, use_method, Global.OUTPUT_DIR);

                    // change method from mono depending on wht method you want to use
                    runThisBetaBarrel(PDBid, use_method, ref _barrel, ref _protein);
                    break;

                case "2":
                    BarrelEllipse.testEllipseSinglePDB();
                    //BarrelEllipse.runEllipseData();
                    break;

                case "3":
                    Global.change_dataset();
                    Console.WriteLine("Using dataset in the file: {0}", Global.DB_file);
                    Console.WriteLine("Reading input files from: {0}", Global.DB_DIR);
                    Console.WriteLine("Writing output files to: {0}", Global.OUTPUT_DIR);
                    using (StreamWriter log = File.AppendText(Global.OUTPUT_DIR + "log.txt")) log.WriteLine("working with db ({0})", DateTime.Now);
                    break;

                case "4":
                    //AlignPDB testAlign = new AlignPDB();
                    break;

                case "5":
                    PolarBearal.RunPolarBearal();
                    break;

                case "6":
                    Console.WriteLine("This has not been checked in a bit.  Proceed with caution");

                    Console.WriteLine("Enter method (1=mono, 2=poly, default=all):");
                    method_input = Console.ReadLine();
                    use_method   = "all";
                    if (method_input == "1")
                    {
                        use_method = "mono";
                    }
                    if (method_input == "2")
                    {
                        use_method = "poly";
                    }
                    Console.WriteLine("Using {1} code.  Output will be in \n{2}", use_method, Global.OUTPUT_DIR);
                    SharedFunctions.RunCbeta2Axis(use_method);
                    break;

                case "7":
                    Console.WriteLine("This has not been checked in a bit.  Proceed with caution");

                    Console.WriteLine("Enter method (1=mono, 2=poly, default=all):");
                    method_input = Console.ReadLine();
                    use_method   = "all";
                    if (method_input == "1")
                    {
                        use_method = "mono";
                    }
                    if (method_input == "2")
                    {
                        use_method = "poly";
                    }
                    Console.WriteLine("Using {1} code.  Output will be in \n{2}", use_method, Global.OUTPUT_DIR);
                    SharedFunctions.run_Centroids(use_method);
                    break;

                case "8":
                    Console.WriteLine("This has not been checked in a bit.  Proceed with caution");
                    BarrelEllipse.run_HighLowData();
                    break;

                case "9":
                    PDBInfo testInfo = new PDBInfo();
                    break;

                default:
                    using (StreamWriter log = File.AppendText(Global.OUTPUT_DIR + "log.txt"))
                    {
                        log.WriteLine("ended program at {0} \n\n", DateTime.Now);
                    }
                    //10. Quit
                    choice = "10";
                    break;
                }
            }


            Console.WriteLine("Program took from: \n start: {0} \n   end: {1}", startTime, DateTime.Now);

            return;
        }