Example #1
0
 private void AddNormalizedPeptideWeight(string peptide, double weight)
 {
     if (string.IsNullOrEmpty(peptide))
     {
         return;
     }
     if (NormalizedPeptideWeights.ContainsKey(peptide))
     {
         return;
     }
     NormalizedPeptideWeights.Add(peptide, weight);
 }
Example #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);
     }
 }
Example #3
0
        private void AddNormalizedPeptideWeight(double weight, int pos, char replaceBy)
        {
            if (string.IsNullOrEmpty(WildTypePeptide))
            {
                return;
            }
            string s = "", e = "";

            if (pos > 0)
            {
                s = WildTypePeptide.Substring(0, pos);
            }
            if (pos < WildTypePeptide.Length - 1)
            {
                e = WildTypePeptide.Substring(pos + 1);
            }
            string peptide = s + replaceBy + e;

            if (/*peptide == WildTypePeptide && */ NormalizedPeptideWeights.ContainsKey(peptide))
            {
                return;
            }
            NormalizedPeptideWeights.Add(peptide, weight);
        }