public BoxCar_Planner(string parameterfilename, string logfilename)
        {
            parameter_file = parameterfilename;
            Parameters     = Parameter_Parser.read_parameters(parameter_file);

            isolation_width         = Convert.ToDouble(Parameters["Isolation_Width_Da"]);
            scan_limit_per_cycle    = Convert.ToInt32(Parameters["MS2_Per_Cycle"]);
            exclusion_time_interval = TimeSpan.FromSeconds(Convert.ToInt32(Parameters["Exclusion_Time"]));
            mz_tolerance            = Convert.ToDouble(Parameters["Exclusion_Width_Da"]);

            logfile = new System.IO.StreamWriter(logfilename);
        }
Beispiel #2
0
        public DD_Planner_AGC_Threshold(string parameterfilename, string logfilename)
        {
            parameter_file = parameterfilename;
            Parameters     = Parameter_Parser.read_parameters(parameter_file);

            isolation_width             = Convert.ToDouble(Parameters["Isolation_Width_Da"]);
            scan_limit_per_cycle        = Convert.ToInt32(Parameters["MS2_Per_Cycle"]);
            exclusion_time_interval     = TimeSpan.FromSeconds(Convert.ToInt32(Parameters["Exclusion_Time"]));
            mz_tolerance                = Convert.ToDouble(Parameters["Exclusion_Width_Da"]);
            PrecursorIntensityThreshold = Convert.ToDouble(Parameters["Precursor_Threshold"]);

            logfile       = new System.IO.StreamWriter(logfilename);
            scaninfo_file = new System.IO.StreamWriter(logfilename + "_SCANINFO.txt");
        }
        public DD_Planner(string parameterfilename, string logfilename)
        {
            parameter_file = parameterfilename;
            Parameters     = Parameter_Parser.read_parameters(parameter_file);

            isolation_width      = Convert.ToDouble(Parameters["Isolation_Width_Da"]);
            scan_limit_per_cycle = Convert.ToInt32(Parameters["MS2_Per_Cycle"]);
            TimeSpan exclusion_time_interval = TimeSpan.FromSeconds(Convert.ToInt32(Parameters["Exclusion_Time"]));

            mz_tolerance = Convert.ToDouble(Parameters["Exclusion_Width_Da"]);
            PrecursorIntensityThreshold = Convert.ToDouble(Parameters["Precursor_Threshold"]);
            PrecursorAGCThreshold       = Convert.ToDouble(Parameters["AGC_Threshold"]);

            if (Parameters["Exclusion_List_Type"] == "MZ")
            {
                exclusion_list = new Basic_ExclusionList(exclusion_time_interval,
                                                         mz_tolerance);
            }
            else if (Parameters["Exclusion_List_Type"] == "MZ_Charge")
            {
                exclusion_list = new Charge_ExclusionList(exclusion_time_interval,
                                                          mz_tolerance);
            }
            else if (Parameters["Exclusion_List_Type"] == "MZ_IntMultiple")
            {
                double override_int = Convert.ToDouble(Parameters["Intensity_Override_Multiple"]);
                exclusion_list = new Intensity_ExclusionList(exclusion_time_interval,
                                                             mz_tolerance, override_int);
            }
            else
            {
                throw new System.ArgumentException("Misisng or invalid Exclusion_List_Type parameter.");
            }

            logfile       = new System.IO.StreamWriter(logfilename);
            scaninfo_file = new System.IO.StreamWriter(logfilename + "_SCANINFO.txt");
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("QE SuperMethodApp Version: April 5th.");

            string filename;
            string parameterfile;
            bool   automatic_mode;

            if (args.Length > 0)
            {
                filename       = args[1];
                parameterfile  = args[0];
                automatic_mode = true;
            }
            else
            {
                filename       = "C:/Xcalibur/data/test_raw_file.raw";
                parameterfile  = "//rc-data1.dfci.harvard.edu/blaise/ms_data_share/Max/QE_API/ParameterFiles/QE_DD.txt";
                automatic_mode = false;
            }

            Debug.Assert(File.Exists(parameterfile));
            IDictionary <string, string> parameters = Parameter_Parser.read_parameters(parameterfile);

            string logfilename = String.Concat(filename, "_log.txt");

            if (!parameters.ContainsKey("MethodType"))
            {
                throw new System.ArgumentException("Parameter file must contain a 'MethodType' line.");
            }
            Planner run_planner = null;

            switch (parameters["MethodType"])
            {
            case "DataDependent":
                run_planner = new DD_Planner(parameterfile, logfilename);
                Console.WriteLine("Data-Dependent Mode.");
                break;

            //case "DataDependent_AGC":
            //    run_planner = new DD_Planner_AGC(parameterfile, logfilename);
            //    Console.WriteLine("Data-Dependent AGC-Enabled Mode.");
            //    break;
            //case "DataDependent_AGC_Threshold":
            //    run_planner = new DD_Planner_AGC_Threshold(parameterfile, logfilename);
            //    Console.WriteLine("Data-Dependent AGC-Threshold-Enabled Mode.");
            //    break;
            case "BoxCar":
                run_planner = new BoxCar_Planner(parameterfile, logfilename);
                Console.WriteLine("BoxCar Mode.");
                break;

            default:
                throw new System.ArgumentException("Invalid MethodType in parameter file: {0}",
                                                   parameters["MethodType"]);
            }
            Debug.Assert(run_planner != null);

            Machinist machine_obj = new Machinist();

            machine_obj.RunMachine(run_planner, filename, automatic_mode);
        }