Esempio n. 1
0
        public void Add(string peptide, string glycan_id, List <int> peaks)
        {
            if (!matches_.ContainsKey(peptide))
            {
                matches_[peptide] = new Dictionary <string, HashSet <int> >();
            }
            if (!matches_[peptide].ContainsKey(glycan_id))
            {
                matches_[peptide][glycan_id] = new HashSet <int>();
            }

            matches_[peptide][glycan_id].UnionWith(peaks);
        }
Esempio n. 2
0
 void MergePeakMatch(ref PeakMatch to, PeakMatch from)
 {
     foreach (var peptide in from.Keys)
     {
         if (!to.ContainsKey(peptide))
         {
             to[peptide] = new Dictionary <string, HashSet <int> >();
         }
         foreach (var glycan_id in from[peptide].Keys)
         {
             to[peptide][glycan_id] = from[peptide][glycan_id];
         }
     }
 }