public override bool GetChromatogram( int id, string modifiedSequence, Color peptideColor, out ChromExtra extra, out float[] times, out int[] scanIndexes, out float[] intensities, out float[] massErrors) { var chromKeyIndices = _chromKeyIndices[id]; if (_lastChromGroupInfo == null || _lastIndices.GroupIndex != chromKeyIndices.GroupIndex) { _lastChromGroupInfo = _cache.LoadChromatogramInfo(chromKeyIndices.GroupIndex); _lastChromGroupInfo.ReadChromatogram(_cache); } _lastIndices = chromKeyIndices; var tranInfo = _lastChromGroupInfo.GetTransitionInfo(chromKeyIndices.TranIndex); times = tranInfo.Times; intensities = tranInfo.Intensities; massErrors = null; if (tranInfo.MassError10Xs != null) { massErrors = tranInfo.MassError10Xs.Select(m => m / 10.0f).ToArray(); } scanIndexes = null; if (tranInfo.ScanIndexes != null) { scanIndexes = tranInfo.ScanIndexes[(int)chromKeyIndices.Key.Source]; } // Assume that each chromatogram will be read once, though this may // not always be completely true. _readChromatograms++; // But avoid reaching 100% before reading is actually complete SetPercentComplete(Math.Min(99, 100 * _readChromatograms / _chromKeyIndices.Length)); extra = new ChromExtra(chromKeyIndices.StatusId, chromKeyIndices.StatusRank); // Display in AllChromatogramsGraph if (chromKeyIndices.Key.Precursor != 0 && Status is ChromatogramLoadingStatus) { ((ChromatogramLoadingStatus)Status).Transitions.AddTransition( modifiedSequence, peptideColor, chromKeyIndices.StatusId, chromKeyIndices.StatusRank, times, intensities); } return(true); }
public override bool GetChromatogram( int id, string modifiedSequence, Color peptideColor, out ChromExtra extra, out float[] times, out int[] scanIndexes, out float[] intensities, out float[] massErrors) { var chromKeyIndices = _chromKeyIndices[id]; if (_lastChromGroupInfo == null || _lastIndices.GroupIndex != chromKeyIndices.GroupIndex) { _lastChromGroupInfo = _cache.LoadChromatogramInfo(chromKeyIndices.GroupIndex); _lastChromGroupInfo.ReadChromatogram(_cache); } _lastIndices = chromKeyIndices; var tranInfo = _lastChromGroupInfo.GetTransitionInfo(chromKeyIndices.TranIndex); times = tranInfo.Times; intensities = tranInfo.Intensities; massErrors = null; if (tranInfo.MassError10Xs != null) { massErrors = tranInfo.MassError10Xs.Select(m => m / 10.0f).ToArray(); } scanIndexes = null; if (tranInfo.ScanIndexes != null) { scanIndexes = tranInfo.ScanIndexes[(int)chromKeyIndices.Key.Source]; } SetPercentComplete(100 * id / _chromKeyIndices.Length); extra = new ChromExtra(chromKeyIndices.StatusId, chromKeyIndices.StatusRank); // Display in AllChromatogramsGraph if (chromKeyIndices.Key.Precursor != 0) { LoadingStatus.Transitions.AddTransition( modifiedSequence, peptideColor, chromKeyIndices.StatusId, chromKeyIndices.StatusRank, times, intensities); } return(true); }
public override bool GetChromatogram(int id, Target modifiedSequence, Color peptideColor, out ChromExtra extra, out TimeIntensities timeIntensities) { var chromKeyIndices = _chromKeyIndices[id]; if (_lastChromGroupInfo == null || _lastIndices.GroupIndex != chromKeyIndices.GroupIndex) { _lastChromGroupInfo = _cache.LoadChromatogramInfo(chromKeyIndices.GroupIndex); _lastChromGroupInfo.ReadChromatogram(_cache); } _lastIndices = chromKeyIndices; var tranInfo = _lastChromGroupInfo.GetTransitionInfo(chromKeyIndices.TranIndex); timeIntensities = tranInfo.TimeIntensities; // Assume that each chromatogram will be read once, though this may // not always be completely true. _readChromatograms++; // But avoid reaching 100% before reading is actually complete SetPercentComplete(Math.Min(99, 100 * _readChromatograms / _chromKeyIndices.Length)); extra = new ChromExtra(chromKeyIndices.StatusId, chromKeyIndices.StatusRank); // Display in AllChromatogramsGraph if (chromKeyIndices.Key.Precursor != 0 && Status is ChromatogramLoadingStatus) { ((ChromatogramLoadingStatus)Status).Transitions.AddTransition( modifiedSequence, peptideColor, chromKeyIndices.StatusId, chromKeyIndices.StatusRank, timeIntensities.Times, timeIntensities.Intensities); } return(true); }
public override bool GetChromatogram( int id, string modifiedSequence, Color peptideColor, out ChromExtra extra, out float[] times, out int[] scanIndexes, out float[] intensities, out float[] massErrors) { var chromKeyIndices = _chromKeyIndices[id]; if (_lastChromGroupInfo == null || _lastIndices.GroupIndex != chromKeyIndices.GroupIndex) { _lastChromGroupInfo = _cache.LoadChromatogramInfo(chromKeyIndices.GroupIndex); _lastChromGroupInfo.ReadChromatogram(_cache); } _lastIndices = chromKeyIndices; var tranInfo = _lastChromGroupInfo.GetTransitionInfo(chromKeyIndices.TranIndex); times = tranInfo.Times; intensities = tranInfo.Intensities; massErrors = null; if (tranInfo.MassError10Xs != null) massErrors = tranInfo.MassError10Xs.Select(m => m/10.0f).ToArray(); scanIndexes = null; if (tranInfo.ScanIndexes != null) scanIndexes = tranInfo.ScanIndexes[(int) chromKeyIndices.Key.Source]; SetPercentComplete(100 * id / _chromKeyIndices.Length); extra = new ChromExtra(chromKeyIndices.StatusId, chromKeyIndices.StatusRank); // Display in AllChromatogramsGraph if (chromKeyIndices.Key.Precursor != 0) { LoadingStatus.Transitions.AddTransition( modifiedSequence, peptideColor, chromKeyIndices.StatusId, chromKeyIndices.StatusRank, times, intensities); } return true; }