Beispiel #1
0
        private void cmiLoadPeptideMatrix_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dlg = dlgOpenPeptideMatrix.ShowDialog();
                if (dlg != DialogResult.OK)
                {
                    return;
                }

                string filename = dlgOpenPeptideMatrix.FileName;
                string[,] peptides = FileUtil.ReadPeptideMatrix(filename);
                rowCount           = peptides.GetLength(0);
                colCount           = peptides.GetLength(1);
                SetRowColumnCount();
                UpdateArrayInfo();
                if (peptides != null)
                {
                    PA = new PeptideArray(rowCount, colCount, rowsFirst);
                    PA.SetPeptideMatrix(peptides);
                    peptidelength       = PA.PeptideLength;
                    ePeptideLength.Text = peptidelength.ToString();
                    LoadPeptidesFromPeptideArrayToGrid();
                    peptidesLoaded       = true;
                    quantificationLoaded = false;
                    FillPAValues();
                    Renormalize();
                }
            }
            catch
            {
                MessageBox.Show("There is a problem with loading the peptide matrix file.\r\nPlease make sure the peptide matrix is the only data in the loaded file.\r\n", Application.ProductName);
            }
        }
Beispiel #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
     {
     }
 }