public void RankScore() { var methodName = MethodBase.GetCurrentMethod().Name; Utils.ShowStarting(methodName); const int ranks = 20; const string filePath = @"\\protoapps\UserData\Wilkins\DIA\DIA.txt"; if (!File.Exists(filePath)) { Assert.Ignore(@"Skipping test {0} since file not found: {1}", methodName, filePath); } var rankScorer = new RankScore(filePath); for (var charge = 1; charge < 4; charge++) { var ionTypes = rankScorer.GetIonTypes(charge, 0); foreach (var ionType in ionTypes) { for (var r = 0; r <= ranks; r++) { Console.WriteLine("Charge: {0}, Ion Type: {1}, Rank: {2}, Score: {3}", charge, ionType.Name, r, rankScorer.GetScore(ionType, r, charge, 0.0)); } } } }
public void RankScoreParamResources() { var methodName = MethodBase.GetCurrentMethod().Name; Utils.ShowStarting(methodName); const int ranks = 20; var rankScorer = new RankScore(ActivationMethod.HCD, Ms2DetectorType.Iontrap, Enzyme.Trypsin, Protocol.Standard); for (var charge = 1; charge < 4; charge++) { var ionTypes = rankScorer.GetIonTypes(charge, 0); foreach (var ionType in ionTypes) { for (var r = 0; r <= ranks; r++) { if (r < 4 || r > ranks - 4) { Console.WriteLine(@"Charge: {0}, Ion Type: {1}, Rank: {2}, Score: {3:F4}", charge, ionType.Name, r, rankScorer.GetScore(ionType, r, charge, 0.0)); } else if (r == 4) { Console.WriteLine(" ..."); } } Console.WriteLine(); } Console.WriteLine(); } }