/// <summary> /// Load scan summaries from a scans file. /// </summary> /// <param name="filePath">The file path to the scans file.</param> public void LoadScansFile(string filePath) { this.scansFilePath = filePath; this.summary = new DatasetSummary(); var reader = new ScansFileReader { Delimiter = ',' }; var scans = reader.ReadFile(this.scansFilePath); var dict = this.summary.ScanMetaData; dict.Clear(); var minScan = int.MaxValue; var maxScan = int.MinValue; foreach (var scan in scans) { scan.DatasetId = this.GroupId; dict.Add(scan.Scan, scan); minScan = Math.Min(minScan, scan.Scan); maxScan = Math.Max(maxScan, scan.Scan); } this.MinScan = minScan; this.MaxScan = maxScan; this.TotalScans = maxScan - minScan; // Not truly the total number present; Scans file contains only MS1 scans this.knownScanNumbers = dict.Values.OrderBy(value => value.Scan).Select(value => value.Scan).ToList(); this.SetNets(); this.IsBackedByFile = true; }
public static List<ScanSummary> LoadScanSummaries(string path) { var scanSummaries = new List<ScanSummary>(); var reader = new ScansFileReader {Delimiter = ','}; var scans = reader.ReadFile(path); scanSummaries.AddRange(scans); UpdateStatus("Loaded scan summaries from CSV files."); return scanSummaries; }
public static List <ScanSummary> LoadScanSummaries(string path) { var scanSummaries = new List <ScanSummary>(); var reader = new ScansFileReader { Delimiter = ',' }; var scans = reader.ReadFile(path); scanSummaries.AddRange(scans); UpdateStatus("Loaded scan summaries from CSV files."); return(scanSummaries); }