private string GetSequence(IIdentifiedSpectrum sepc)
        {
            var pure   = sepc.GetMatchSequence();
            var result = new StringBuilder();
            var dic    = new Dictionary <char, int>();

            foreach (var c in pure)
            {
                if (Char.IsLetter(c))
                {
                    result.Append(c);
                }
                else
                {
                    if (dic.ContainsKey(c))
                    {
                        dic[c] = dic[c] + 1;
                    }
                    else
                    {
                        dic[c] = 1;
                    }
                }
            }

            return(string.Format("{0}_{1}", result.ToString(), (from k in dic.Keys
                                                                orderby k
                                                                select string.Format("{0}{1}", k, dic[k])).Merge("_")));
        }
Esempio n. 2
0
        private string GetMatchSequence(IIdentifiedSpectrum spectrum)
        {
            string result = spectrum.GetMatchSequence();

            if (option.IgnoreModifications != null && option.IgnoreModifications.Length > 0)
            {
                foreach (var c in option.IgnoreModifications)
                {
                    result = result.Replace(c.ToString(), "");
                }
            }

            return(result);
        }