public CachedChromatogramDataProvider(ChromatogramCache cache, SrmDocument document, MsDataFileUri dataFilePath, ChromFileInfo fileInfo, bool?singleMatchMz, ProgressStatus status, int startPercent, int endPercent, ILoadMonitor loader) : base(fileInfo, status, startPercent, endPercent, loader) { _cache = cache; _fileIndex = cache.CachedFiles.IndexOf(f => Equals(f.FilePath, dataFilePath)); _chromKeyIndices = cache.GetChromKeys(dataFilePath).OrderBy(v => v.LocationPoints).ToArray(); _cache.GetStatusDimensions(dataFilePath, out _maxRetentionTime, out _maxIntensity); _singleMatchMz = singleMatchMz.HasValue ? singleMatchMz.Value // Unfortunately, before the single matching status was // written into the cache file, we can only guess about its // status based on the overall document settings : document.Settings.TransitionSettings.FullScan.IsEnabled; }
public CachedChromatogramDataProvider(ChromatogramCache cache, SrmDocument document, MsDataFileUri dataFilePath, ChromFileInfo fileInfo, bool? singleMatchMz, ProgressStatus status, int startPercent, int endPercent, ILoadMonitor loader) : base(fileInfo, status, startPercent, endPercent, loader) { _cache = cache; _fileIndex = cache.CachedFiles.IndexOf(f => Equals(f.FilePath, dataFilePath)); _chromKeyIndices = cache.GetChromKeys(dataFilePath).OrderBy(v => v.LocationPoints).ToArray(); _cache.GetStatusDimensions(dataFilePath, out _maxRetentionTime, out _maxIntensity); _singleMatchMz = singleMatchMz.HasValue ? singleMatchMz.Value // Unfortunately, before the single matching status was // written into the cache file, we can only guess about its // status based on the overall document settings : document.Settings.TransitionSettings.FullScan.IsEnabled; }
public CachedChromatogramDataProvider(ChromatogramCache cache, SrmDocument document, MsDataFileUri dataFilePath, ChromFileInfo fileInfo, bool?singleMatchMz, IProgressStatus status, int startPercent, int endPercent, ILoadMonitor loader) : base(fileInfo, status, startPercent, endPercent, loader) { // Deal with older cache formats where we did not record chromatogram polarity var assumeNegativeChargesInPreV11Caches = document.MoleculeTransitionGroups.All(p => p.PrecursorMz.IsNegative); // Need a newly loaded copy to allow for concurrent loading for multiple cached files _cache = ChromatogramCache.Load(cache.CachePath, new ProgressStatus(), loader, assumeNegativeChargesInPreV11Caches); _fileIndex = cache.CachedFiles.IndexOf(f => Equals(f.FilePath, dataFilePath)); _chromKeyIndices = cache.GetChromKeys(dataFilePath).OrderBy(v => v.LocationPoints).ToArray(); foreach (var c in _chromKeyIndices.Where(i => i.Key.Precursor != 0)) { if (c.Key.Precursor.IsNegative) { _sourceHasNegativePolarityData = true; } else { _sourceHasPositivePolarityData = true; } } _cache.GetStatusDimensions(dataFilePath, out _maxRetentionTime, out _maxIntensity); _singleMatchMz = singleMatchMz.HasValue ? singleMatchMz.Value // Unfortunately, before the single matching status was // written into the cache file, we can only guess about its // status based on the overall document settings : document.Settings.TransitionSettings.FullScan.IsEnabled; }