Exemple #1
0
 private void cmiPasteQuantification_Click(object sender, EventArgs e)
 {
     try
     {
         if (PA == null)
         {
             MessageBox.Show("The peptide array needs to be loaded before the quantification array.", Analyzer.ProgramName);
             return;
         }
         string[,] matrix = MatrixUtil.ClipboardToMatrix();
         matrix           = MatrixUtil.StripHeaderRowColumns(matrix, true);
         if (matrix == null || rowCount != matrix.GetLength(0) || colCount != matrix.GetLength(1))
         {
             MessageBox.Show("The dimensions of the quantification data does not match the peptide matrix.", Analyzer.ProgramName);
             return;
         }
         double[,] dMatrix = MatrixUtil.ConvertToNumericMatrix(matrix);
         PA.SetQuantificationMatrix(matrix, false);
         GridUtil.LoadNumericMatrixToGrid(dgQuantification, dMatrix);
         PA.NormalizationValue = MatrixUtil.GetMaxValue(dMatrix);
         eNormalizeBy.Text     = PA.NormalizationValue.ToString();
         quantificationLoaded  = true;
         Renormalize();
     }
     catch
     {
     }
 }
Exemple #2
0
 private void cmiPastePeptide_Click(object sender, EventArgs e)
 {
     try
     {
         string[,] matrix = MatrixUtil.ClipboardToMatrix();
         matrix           = MatrixUtil.StripHeaderRowColumns(matrix, false);
         rowCount         = matrix.GetLength(0);
         colCount         = matrix.GetLength(1);
         PA = new PeptideArray(rowCount, colCount, rowsFirst);
         PA.SetPeptideMatrix(matrix);
         peptidelength             = PA.PeptideLength;
         ePeptideLength.Text       = peptidelength.ToString();
         dgQuantification.RowCount = dgQuantification.ColumnCount = 0;
         dgNormalized.RowCount     = dgNormalized.ColumnCount = 0;
         SetRowColumnCount();
         GridUtil.LoadStringMatrixToGrid(dgPeptides, matrix);
         peptidesLoaded       = true;
         quantificationLoaded = false;
         FillPAValues();
         ClearMotifs();
     }
     catch
     {
     }
 }