20 public Result(ref
int[] SearchResult, ref List<Peptide> Peptides, ref List<Spectrum> Spectra,
int TopN) {
22 result =
new Dictionary<int, List<Peptide>>();
24 int currentSearchResultIdx = 0;
25 foreach (var spectrum
in Spectra)
27 if (!
result.ContainsKey(spectrum.scanNumber))
29 result.Add(spectrum.scanNumber,
new List<Peptide>());
30 for (
int i = currentSearchResultIdx; i < currentSearchResultIdx + TopN; i++)
32 result[spectrum.scanNumber].Add(Peptides[SearchResult[i]]);
37 Console.WriteLine($
"Warning: Found duplicate scan number {spectrum.scanNumber}. Skipping scan number...");
40 currentSearchResultIdx += TopN;