Пример #1
0
        private ParametersContainer GetOutParameters()
        {
            ParametersContainer Pars = new ParametersContainer();

            Pars.ChromatogramBP  = checkBoxChroBP.Checked;
            Pars.ChromatogramMs1 = checkBoxChroMs1.Checked;
            Pars.ChromatogramMs2 = checkBoxChroMs2.Checked;
            Pars.ChromatogramTIC = checkBoxChroTIC.Checked;

            Pars.RawFileDirectory = textBoxRawFileDirectory.Text;
            Pars.RawFileList      = textBoxRawFiles.Text;

            Pars.UseRawFileDirectory = radioButtonSelectDirectory.Checked;

            Pars.DataOutputDirectoryString = textBoxDataOutputDir.Text;

            Pars.MGFLowMassCutoff = checkBoxMgfLowMass.Checked;

            Pars.ParseMode = checkBoxModeParse.Checked;

            Pars.QcMode = checkBoxModeQC.Checked;

            Pars.RefinePrecursorMassCharge = checkBoxRefinePrecursor.Checked;

            Pars.MinCharge = comboBoxMinCharge.Text;
            Pars.MaxCharge = comboBoxMaxCharge.Text;

            Pars.DataOutputChromatograms = ckbxOutputChromatograms.Checked;
            Pars.DataOutputMetrics       = ckbxOutputMetrics.Checked;
            Pars.DataOutputMGF           = ckbxOutputMGF.Checked;
            Pars.FaimsOutputMgf          = checkBoxFaims.Checked;
            Pars.DataOutputParseMatrix   = ckbxOutputParse.Checked;
            Pars.DataOutputDirectory     = checkBoxDataOutputDirectory.Checked;

            Pars.SearchEngineNone    = radioButtonSearchNone.Checked;
            Pars.SearchEngineXTandem = radioButtonSearchXTandem.Checked;

            Pars.QcDataDirectory  = textBoxQcDataDirectory.Text;
            Pars.XTandemDirectory = textBoxXTandemDir.Text;
            Pars.FastaFile        = textBoxFastaFile.Text;

            Pars.NumberSpectraToSearch = textBoxNumSpectra.Text;

            Pars.PeptideModifications = peptideModifications;

            Pars.QuantifyReporterIons = ckbxOutputQuant.Checked;
            Pars.Reagents             = comboBoxLabelingReagents.Text;

            Pars.MGFLowMassCutoff = checkBoxMgfLowMass.Checked;

            Pars.MGFLowMassCutoffValue = textBoxMgfLowMass.Text;

            return(Pars);
        }
Пример #2
0
        private void LoadParameters(ParametersContainer Pars)
        {
            checkBoxChroBP.Checked  = Pars.ChromatogramBP;
            checkBoxChroMs1.Checked = Pars.ChromatogramMs1;
            checkBoxChroMs2.Checked = Pars.ChromatogramMs2;
            checkBoxChroTIC.Checked = Pars.ChromatogramTIC;

            textBoxRawFileDirectory.Text = Pars.RawFileDirectory;
            textBoxRawFiles.Text         = Pars.RawFileList;

            radioButtonSelectDirectory.Checked = Pars.UseRawFileDirectory;

            textBoxDataOutputDir.Text = Pars.DataOutputDirectoryString;

            checkBoxMgfLowMass.Checked = Pars.MGFLowMassCutoff;

            checkBoxModeParse.Checked = Pars.ParseMode;

            checkBoxModeQC.Checked = Pars.QcMode;

            checkBoxRefinePrecursor.Checked = Pars.RefinePrecursorMassCharge;

            comboBoxMinCharge.Text = "0";
            comboBoxMaxCharge.Text = "100";
            comboBoxMinCharge.Text = Pars.MinCharge;
            comboBoxMaxCharge.Text = Pars.MaxCharge;

            ckbxOutputChromatograms.Checked     = Pars.DataOutputChromatograms;
            ckbxOutputMetrics.Checked           = Pars.DataOutputMetrics;
            ckbxOutputMGF.Checked               = Pars.DataOutputMGF;
            checkBoxFaims.Checked               = Pars.FaimsOutputMgf;
            ckbxOutputParse.Checked             = Pars.DataOutputParseMatrix;
            checkBoxDataOutputDirectory.Checked = Pars.DataOutputDirectory;

            radioButtonSearchNone.Checked    = Pars.SearchEngineNone;
            radioButtonSearchXTandem.Checked = Pars.SearchEngineXTandem;

            textBoxQcDataDirectory.Text = Pars.QcDataDirectory;
            textBoxXTandemDir.Text      = Pars.XTandemDirectory;
            textBoxFastaFile.Text       = Pars.FastaFile;

            textBoxNumSpectra.Text = Pars.NumberSpectraToSearch;

            peptideModifications = Pars.PeptideModifications;

            ckbxOutputQuant.Checked       = Pars.QuantifyReporterIons;
            comboBoxLabelingReagents.Text = Pars.Reagents;

            checkBoxMgfLowMass.Checked = Pars.MGFLowMassCutoff;

            textBoxMgfLowMass.Text = Pars.MGFLowMassCutoffValue;
        }
Пример #3
0
        private void toolStripMenuItemOpenParameters_Click(object sender, EventArgs e)
        {
            OpenFileDialog openParameters = new OpenFileDialog();

            openParameters.Filter = "RawTools Parameters|*.rtxml";
            openParameters.Title  = "Load RawTools Parameters";
            openParameters.ShowDialog();

            if (openParameters.FileName != "")
            {
                var serializer = new XmlSerializer(typeof(ParametersContainer));
                using (StreamReader reader = new StreamReader(openParameters.FileName))
                {
                    ParametersContainer Pars = (ParametersContainer)serializer.Deserialize(reader);
                    LoadParameters(Pars);
                }
            }
        }
Пример #4
0
        private void toolStripMenuItemSaveParameters_Click(object sender, EventArgs e)
        {
            SaveFileDialog      saveParameters = new SaveFileDialog();
            ParametersContainer Pars           = GetOutParameters();

            saveParameters.Filter = "RawTools Parameters|*.rtxml";
            saveParameters.Title  = "Save RawTools Parameters";
            saveParameters.ShowDialog();

            // If the file name is not an empty string open it for saving.
            if (saveParameters.FileName != "")
            {
                var serializer = new XmlSerializer(typeof(ParametersContainer));
                using (StreamWriter writer = new StreamWriter(saveParameters.FileName))
                {
                    serializer.Serialize(writer, Pars);
                }
            }
        }