Exemplo n.º 1
0
        /// <summary>
        /// Update the validation window with a new spectrum
        /// </summary>
        /// <param name="argSpectrumValID">The new spectrum ID.</param>
        internal void UpdateValidationArgUI(int argSpectrumValID)
        {
            // Get the spectrum
            FindArginineSpectraKeyValuePair(argSpectrumValID);
            // If the spectra is marked for quantification, get the index of the complementary spectra that has been marked
            int complIndex = 0;

            if (Validation.argChosenForQuantList.Contains(valKVP.Key.ID))
            {
                complIndex = Quantification.GetQuantifiedComplementaryCitSpectrumIndex(valKVP.Key, valKVP.Value);
            }
            // Update the spectrum ID label
            ChangeSpectrumIDAndScoreLabel();
            // Clear the chart
            ValidationUIUtilities.ClearChart(chartMS2);
            // Create the chart
            ValidationUIUtilities.CreatePairedMs2Chart(chartMS2, valKVP.Value[complIndex], valKVP.Key);
            ValidationUIUtilities.ClearChart(chartArgMS1);
            ValidationUIUtilities.ClearChart(chartPotCitMS1);
            // Update the MS1 charts
            ValidationUIUtilities.CreateMS1Chart(chartArgMS1, valKVP.Key);
            ValidationUIUtilities.CreateMS1Chart(chartPotCitMS1, valKVP.Value[complIndex]);
            // Fill the ion grid with data
            ValidationUIUtilities.FillCitIonGrid(metroGridArgIons, valKVP.Key);
            ValidationUIUtilities.FillArgIonGrid(metroGridPotCitIons, valKVP.Value[complIndex], valKVP.Key);
            // Check if buttons should be enabled or disabled

            CheckBeforeButtonDisabling();
            EnableQuantButtons(valKVP.Key);

            ReturnPotCitIndex(complIndex);
            // Add information about peptides
            AddArgInfo();
            AddPotCitInfo(complIndex);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Update the spectrum validation.
        /// </summary>
        /// <param name="spectrumValID">The spectrum ID.</param>
        internal void UpdateValidationUI(int spectrumValID)
        {
            // Find the citrullinated spectrum
            FindCitrullineSpectraKeyValuePair(spectrumValID);
            // If the spectra is marked for quantification, get the index of the complementary spectra that has been marked
            int complIndex = 0;

            if (Validation.citChosenForQuantList.Contains(valKVP.Key.ID))
            {
                complIndex = Quantification.GetQuantifiedComplementaryArgSpectrumId(valKVP.Key, valKVP.Value);
            }

            // Update the spectrum id label
            ChangeSpectrumIDAndScoreLabel();
            // Update the MS2 chart
            ValidationUIUtilities.ClearChart(chartMS2);
            ValidationUIUtilities.CreatePairedMs2Chart(chartMS2, valKVP.Key, valKVP.Value[complIndex]);
            // Update the MS1 charts
            ValidationUIUtilities.ClearChart(chartCitMS1);
            ValidationUIUtilities.ClearChart(chartArgMS1);
            ValidationUIUtilities.CreateMS1Chart(chartCitMS1, valKVP.Key);
            ValidationUIUtilities.CreateMS1Chart(chartArgMS1, valKVP.Value[complIndex]);
            // Update the ion grid
            ValidationUIUtilities.FillCitIonGrid(metroGridCitIons, valKVP.Key);
            ValidationUIUtilities.FillCitIonGrid(metroGridArgIons, valKVP.Value[complIndex]);
            // Update the buttons
            CheckBeforeButtonDisabling();
            EnableQuantButtons(valKVP.Key);
            ReturnArgIndex(complIndex);
            // Update the information
            AddCitInfo();
            AddArgInfo(complIndex);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Remove the spectrum from quantification.
        /// </summary>
        private void MetroButtonRemoveQuant_Click(object sender, EventArgs e)
        {
            // Remove the spectrum from the dictionary
            Quantification.RemoveFromkvpArgSpecScanDict(valKVP.Key);
            // Update the quantification id list
            UpdateChosenForQuant(valKVP.Key.ID, false);

            // Enable and disable the button
            // Enable moving back and forth through the complementary spectra
            metroButtonNextPotCitScan.Enabled = true;
            metroButtonPrevPotCitScan.Enabled = true;

            // Check if has reached the end
            int length = valKVP.Value.Count() - 1;
            int index  = potCitIndex + 1;

            if (index > length)
            {
                // If so, disable the next button
                metroButtonNextPotCitScan.Enabled = false;
            }
            //Check if has reached the start
            int index1 = potCitIndex - 1;

            if (index1 < 0)
            {
                // If so, disable the previous button
                metroButtonPrevPotCitScan.Enabled = false;
            }

            // Disable the remove button and enable the add button
            metroButtonRemoveQuant.Enabled = false;
            metroButtonAddQuant.Enabled    = true;
        }
Exemplo n.º 4
0
        /// <summary>
        /// Remove the spectrum from quantification.
        /// </summary>
        private void MetroButtonRemoveQuant_Click(object sender, EventArgs e)
        {
            // Remove the spectrum from the dictionary
            Quantification.RemoveFromLoneCitSpecList(valSpec);
            // Update the quantification id list
            UpdateChosenForQuant(valSpec.ID, false);

            // Enable and disable the button
            metroButtonRemoveQuant.Enabled = false;
            metroButtonAddQuant.Enabled    = true;
        }
Exemplo n.º 5
0
        /// <summary>
        /// Add the spectrum to quantification.
        /// </summary>
        private void MetroButtonAddQuant_Click(object sender, EventArgs e)
        {
            // Get the spectrum
            XTSpectrum spectrumCit = valSpec;

            // Add the spectrum to the dictionary
            Quantification.AddToLoneCitSpecList(spectrumCit);
            // Update the quantification id list
            UpdateChosenForQuant(valSpec.ID, true);

            // Enable and disable the button
            metroButtonAddQuant.Enabled    = false;
            metroButtonRemoveQuant.Enabled = true;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Add the Lone Cit Spectra to quantification.
 /// </summary>
 /// <param name="scoredSpectra">The spectra to be added.</param>
 private static void AddLoneCitSpectraAboveCutoffToQunatification(List <XTSpectrum> scoredSpectra)
 {
     // Loop through the spectra
     foreach (XTSpectrum spectrum in scoredSpectra)
     {
         // Check that the CitScore is greater than the CutOff value
         if (spectrum.CitScore >= ScoreSettings.CutOffScore)
         {
             // If the spectrum passes, add the spectrum to the quantification
             Quantification.AddToLoneCitSpecList(spectrum);
             Validation.loneCitChosenForQuantList.Add(spectrum.ID);
         }
     }
 }
Exemplo n.º 7
0
        /// <summary>
        /// Add the spectrum to quantification.
        /// </summary>
        private void MetroButtonAddQuant_Click(object sender, EventArgs e)
        {
            // Add the spectrum to the dictionary
            Quantification.AddTokvpArgSpecScanDict(valKVP.Key, valKVP.Value[potCitIndex]);
            // Update the quantification id list
            UpdateChosenForQuant(valKVP.Key.ID, true);

            // Enable and disable the button
            // Prevent moving back and forth through the complementary spectra
            metroButtonNextPotCitScan.Enabled = false;
            metroButtonPrevPotCitScan.Enabled = false;
            // Enable the remove button and disable the add button
            metroButtonAddQuant.Enabled    = false;
            metroButtonRemoveQuant.Enabled = true;
        }
Exemplo n.º 8
0
 /// <summary>
 /// Add the Cit Spectra to quantification.
 /// </summary>
 /// <param name="scoredSpectra">The spectra to be added.</param>
 private static void AddCitSpectraAboveCutoffToQuantification(Dictionary <XTSpectrum, List <XTSpectrum> > scoredSpectra)
 {
     // Loop through all of the spectra
     foreach (KeyValuePair <XTSpectrum, List <XTSpectrum> > spectrum in scoredSpectra)
     {
         // Check that the CitScore is greater than the CutOff value
         if (spectrum.Key.CitScore >= ScoreSettings.CutOffScore)
         {
             // If the spectrum passes, add the spectrum to the quantification together with the complementary spectrum with the highest match score
             Quantification.AddTokvpCitSpecSpecDict(spectrum.Key, spectrum.Value[0]);
             // Add the spectrum ID to the list
             Validation.citChosenForQuantList.Add(spectrum.Key.ID);
         }
     }
 }
Exemplo n.º 9
0
        /// <summary>
        /// Add the spectrum to quantification.
        /// </summary>
        private void MetroButtonAddQuant_Click(object sender, EventArgs e)
        {
            // Get the spectra
            XTSpectrum spectrumCit = valKVP.Key;
            XTSpectrum spectrumArg = valKVP.Value[argIndex];

            // Add the spectrum to the dictionary
            Quantification.AddTokvpCitSpecSpecDict(spectrumCit, spectrumArg);
            // Update the quantification id list
            UpdateChosenForQuant(valKVP.Key.ID, true);
            // Prevent moving back and forth through the complementary spectra
            metroButtonNextArgScan.Enabled = false;
            metroButtonPrevArgScan.Enabled = false;
            // Enable and disable the button
            metroButtonAddQuant.Enabled    = false;
            metroButtonRemoveQuant.Enabled = true;
        }
Exemplo n.º 10
0
 /// <summary>
 /// Add the Arg Spectra to quantification.
 /// </summary>
 /// <param name="scoredSpectra">The spectra to be added.</param>
 private static void AddArgSpectraAboveCutOffToQuantification(Dictionary <XTSpectrum, List <RawScan> > scoredSpectra)
 {
     // Loop through all of the spectra
     foreach (KeyValuePair <XTSpectrum, List <RawScan> > spectrum in scoredSpectra)
     {
         // Loop through all of the complementary cit spectra
         foreach (RawScan complSpectra in spectrum.Value)
         {
             // Check that the CitScore is greater than the CutOff value
             if (complSpectra.CitScore >= ScoreSettings.CutOffScore && Quantification.argSpecScanDict.ContainsKey(spectrum.Key) == false)
             {
                 // If the spectrum passes, add the spectrum to the quantification together with the arginine spectra
                 Quantification.AddTokvpArgSpecScanDict(spectrum.Key, complSpectra);
                 Validation.argChosenForQuantList.Add(spectrum.Key.ID);
             }
         }
     }
 }