public void FirstSearch(List <QPeptide> Peptides) { double RTPercDelta = Program.Processor.RTErrorProc / 100.0; double RTMinutesDelta = Program.Processor.RTErrorMinutes; double rtMAX, rtMIN; int Progress = 0; for (int i1 = 0; i1 < Peptides.Count; i1++) { QPeptide data = Peptides[i1]; if ((int)(((double)i1 / (double)Peptides.Count) * 100.0) > Progress) { Progress = (int)(((double)i1 / (double)Peptides.Count) * 100.0); iLog.RepProgress(Progress); } if (data.Sequence != null) { data.TheorIsotopeRatio = AveragineIsotopicScore((data.MascotMZ - 1) * data.Charge); //data.TheorIsotopeRatio = IsotopicScore(data.Sequence); } else { data.TheorIsotopeRatio = AveragineIsotopicScore((data.MascotMZ - 1) * data.Charge); } rtMAX = data.MascotRT * (1 + RTPercDelta) + RTMinutesDelta; rtMIN = data.MascotRT * (1 - RTPercDelta) - RTMinutesDelta; data.Match = MSFile.FindBestScore(data.MascotMZ, data.Charge, data.TheorIsotopeRatio, rtMIN, rtMAX); } }
public void LoadMascots(List <QPeptide> Mascots) { iLog.Log("Loading Mascot Peptides"); iLog.RepProgress(0); SQLiteCommand Select = new SQLiteCommand( "Select MascotScan, MascotMZ, MascotScore, MascotRT, TheorIsoRatio, Charge, " + "IPI, ipis, Sequence, Peptides, ModDesc, ModMass, [Case] From Mascots " + "Order by IPI", con); SQLiteDataReader Reader = Select.ExecuteReader(); while (Reader.Read()) { QPeptide Pept = new QPeptide(); Pept.MascotScan = Reader.GetInt32(0); Pept.MascotMZ = Reader.GetDouble(1); Pept.MascotScore = Reader.GetDouble(2); Pept.MascotRT = Reader.GetDouble(3); Pept.TheorIsotopeRatio = Reader.GetDouble(4); Pept.Charge = Reader.GetInt32(5); Pept.IPI = Reader.GetString(6); //Pept.IPIs = Reader.GetString(7); Pept.Sequence = Reader.GetString(8); Pept.peptides = Reader.GetInt32(9); Pept.ModDesk = Reader.GetString(10); Pept.ModMass = Reader.GetDouble(11); Pept.Case = Reader.GetString(12); Mascots.Add(Pept); } }
public void LoadAllMSMS(List <QPeptide> AllMSMS) { iLog.Log("Loading All MS/MS Entries"); iLog.RepProgress(0); SQLiteCommand Select = new SQLiteCommand( "Select MascotScan, MascotMZ, MascotScore, MascotRT, TheorIsoRatio, Charge, " + "IPI, ipis, Sequence, Peptides, ModDesc, ModMass, [Case] From AllMSMS " + "Order by IPI", con); SQLiteDataReader Reader = Select.ExecuteReader(); int Count = 0; while (Reader.Read()) { QPeptide Pept = new QPeptide(); Pept.MascotScan = Reader.GetInt32(0); Pept.MascotMZ = Reader.GetDouble(1); Pept.MascotScore = Reader.GetDouble(2); Pept.MascotRT = Reader.GetDouble(3); Pept.TheorIsotopeRatio = Reader.GetDouble(4); Pept.Charge = Reader.GetInt32(5); Pept.IPI = Reader.IsDBNull(6) ? "" : Reader.GetString(6); //Pept.IPIs = Reader.GetString(7); Pept.Sequence = Reader.IsDBNull(8) ? "" : Reader.GetString(8); Pept.peptides = Reader.GetInt32(9); Pept.ModDesk = Reader.GetString(10); Pept.ModMass = Reader.GetDouble(11); Pept.Case = Reader.GetString(12); AllMSMS.Add(Pept); Count++; //if (Count%100 == 0){ // iLog.RepProgress(Count*100/Reader.RecordsAffected); //} } }