Exemple #1
0
        private void GenerateNormalizedPeptideWeights()
        {
            NormalizedPeptideWeights.Clear();
            NormalizedWildtypeWeights.Clear();

            NormalizedMatrixMin = double.MaxValue;
            NormalizedMatrixMax = double.MinValue;
            for (int iRow = 0; iRow < RowCount; iRow++)
            {
                for (int iCol = 0; iCol < ColCount; iCol++)
                {
                    int    pos    = PermutationXAxis ? iRow : iCol;
                    double normby = NormMode == NormalizationMode.Mean ? NormalizationValue :
                                    NormBy == null ? 1 : NormBy[pos];
                    if (normby != 0)
                    {
                        NormalizedMatrix[iRow, iCol] = QuantificationMatrix[iRow, iCol] / normby;
                    }
                    if (NormalizedMatrix[iRow, iCol] < NormalizedMatrixMin)
                    {
                        NormalizedMatrixMin = NormalizedMatrix[iRow, iCol];
                    }
                    if (NormalizedMatrix[iRow, iCol] > NormalizedMatrixMax)
                    {
                        NormalizedMatrixMax = NormalizedMatrix[iRow, iCol];
                    }

                    AddNormalizedPeptideWeight(PeptideMatrix[iRow, iCol], pos, NormalizedMatrix[iRow, iCol]);
                }
            }
        }
Exemple #2
0
 private void AddNormalizedPeptideWeight(string peptide, int pos, double weight)
 {
     if (string.IsNullOrEmpty(peptide))
     {
         return;
     }
     if (peptide == WildTypePeptide)
     {
         NormalizedWildtypeWeights.Add(pos, weight);
         return;
     }
     if (!NormalizedPeptideWeights.ContainsKey(peptide))
     {
         NormalizedPeptideWeights.Add(peptide, weight);
     }
 }