private static void AddModifications(string fileName, Dictionary <int, ModificationEntry> result, string sqlMod) { var modstr = ModificationConsts.MODIFICATION_CHAR; var modReader = new SQLiteDBHelper(fileName).ExecuteReader(sqlMod, null); while (modReader.Read()) { var id = modReader.GetInt32(0); var deltamass = modReader.GetDouble(1); var modname = modReader.GetString(2); var positiontype = modReader.GetInt32(3); string position = string.Empty; if (positiontype == 1) { position = " (N-term)"; } else if (positiontype == 2) { position = " (C-term)"; } result[id] = new ModificationEntry() { PositionType = positiontype, SignChar = modstr[result.Count + 1], SignStr = string.Format("{0:0.000000} {1}{2}", deltamass, modname, position), DeltaMass = deltamass }; } }