private static void SaveMProphetFeatures(MProphetResultsHandler resultsHandler, string saveFile, CultureInfo cultureInfo, IList <IPeakFeatureCalculator> calcs) { using (var saver = new FileSaver(saveFile)) using (var writer = new StreamWriter(saver.SafeName)) { resultsHandler.WriteScores(writer, cultureInfo, calcs); writer.Flush(); writer.Close(); saver.Commit(); } }
public static void WriteFeatures(string filePath, MProphetResultsHandler resultsHandler, IList <IPeakFeatureCalculator> calcs, CultureInfo cultureInfo, bool bestOnly, bool includeDecoys, IProgressMonitor progressMonitor) { using (var fs = new FileSaver(filePath)) using (var writer = new StreamWriter(fs.SafeName)) { resultsHandler.ScoreFeatures(progressMonitor); resultsHandler.WriteScores(writer, cultureInfo, calcs, bestOnly, includeDecoys, progressMonitor); writer.Close(); fs.Commit(); } }