public static void SetPep(Identifications identifications, BayesianInversion2D bi) { int n = identifications.Count; for (int i = 0; i < n; i++) { MascotPeptide p = identifications.GetPeptidesAt(i)[0]; p.Pep = bi.GetValue(p.AltScore, Math.Log(p.Sequence.Length)); } identifications.Write(); }
private static void LimitPep(string[] rawFiles, MascotQueryType type, IIdentificationProvider ip) { for (int i = 0; i < rawFiles.Length; i++) { Identifications ident = ip.GetIdentifications(rawFiles[i], type); int n = ident.Count; for (int j = 0; j < n; j++) { MascotPeptide p = ident.GetPeptidesAt(j)[0]; p.Pep = Math.Min(p.Pep, 1); } ident.Write(); ip.Dispose(); } }
public static void ApplyReverseHitThreshold(Identifications identifications, double pepThreshold) { int n = identifications.Count; List <int> o = new List <int>(); for (int i = 0; i < n; i++) { MascotPeptide p = identifications.GetPeptidesAt(i)[0]; if (p.Pep <= pepThreshold) { o.Add(i); } } identifications.Extract(o.ToArray()); identifications.Write(); }
public static void FilterBySequence(Identifications identifications, HashSet <string> sequences) { int n = identifications.Count; List <int> oo = new List <int>(); for (int i = 0; i < n; i++) { MascotPeptide p = identifications.GetPeptidesAt(i)[0]; if (sequences.Contains(p.Sequence)) { oo.Add(i); } } identifications.Extract(oo.ToArray()); identifications.Write(); }