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); } }
private void RunProcesses() { int PCount = PDrivers.GetLength(0); //проверяем есть ли свободные процессы if (NextAvialable < RawFiles.Items.Count) { for (int i = 0; i < PCount; i++) { if (PDrivers[i].Proc == null) { SetFileStatus(RawFiles.Items[NextAvialable].Text, FileStatus.Processing); //!!RUN PROCESS PDrivers[i].StartProcess(Properties.Settings.Default.Out_dbfile, RawFiles.Items[NextAvialable].Text, NextAvialable); NextAvialable++; break; } } } else { for (int i = 0; i < PCount; i++) { if (PDrivers[i].Proc == null && PDrivers[i].PLabel != null && PDrivers[i].Finished) { DeleteProcess(i); } } } for (int i = 0; i < PCount; i++) { if (PDrivers[i].Proc != null && PDrivers[i].Proc.HasExited && PDrivers[i].Finished) { if (PDrivers[i].Proc.ExitCode == 0) { SetFileStatus(PDrivers[i].FileName, FileStatus.Processed); iLog.Log("File has been successfully processed.", Path.GetFileName(PDrivers[i].FileName), MessageBoxIcon.Information, null); } else { if (PDrivers[i].ErrorMessage == "") { continue; } else { SetFileStatus(PDrivers[i].FileName, FileStatus.Failed); } } PDrivers[i].Proc = null; Processed++; } } }
public void LoadMascots(List <QProtein> Proteins, 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]" + (Bands < 0?", -1":", BandID") + " From Mascots " + "Order by IPI", con); SQLiteDataReader Reader = Select.ExecuteReader(); Reader.Read(); for (int i = 0; i < Proteins.Count; i++) { while (Reader["IPI"].ToString() == Proteins[i].ipi) { 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 = Utils.IPIStringtoList(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.IsDBNull(12)?"":Reader.GetString(12); Pept.BandID = Reader.GetInt32(13); Mascots.Add(Pept); Proteins[i].Peptides.Add(Pept); if (!Reader.Read()) { break; } } iLog.RepProgress(i, Proteins.Count); } }