Exemple #1
0
        public void ApplyFilter()
        {
            float[] xData = _msScan.RawMZs;
            float[] yData = _msScan.RawIntensities;
            DeconToolsV2.Peaks.clsPeakProcessor peakProcessor = new DeconToolsV2.Peaks.clsPeakProcessor();
            DeconToolsV2.Peaks.clsPeakProcessorParameters parameters = new DeconToolsV2.Peaks.clsPeakProcessorParameters();

            parameters.PeakBackgroundRatio = PeakToBackgroundRatio;
            parameters.SignalToNoiseThreshold = SignalToNoiseThreshold;
            parameters.PeakFitType = DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC;

            peakProcessor.SetOptions(parameters);
            DeconToolsV2.Peaks.clsPeak[] peakList = new DeconToolsV2.Peaks.clsPeak[1];
            peakProcessor.DiscoverPeaks(ref xData, ref yData, ref peakList, 0, float.MaxValue);
            float[] mz = new float[peakList.Length];
            float[] intensity = new float[peakList.Length];
            for (int i = 0; i < peakList.Length; i++)
            {
                mz[i] = Convert.ToSingle(peakList[i].mdbl_mz);
                intensity[i] = Convert.ToSingle(peakList[i].mdbl_intensity);
            }
            _msScan.MZs = mz;
            _msScan.Intensities = intensity;
        }
Exemple #2
0
        public void ApplyFilter()
        {
            float[] xData = _msScan.RawMZs;
            float[] yData = _msScan.RawIntensities;
            DeconToolsV2.Peaks.clsPeakProcessor           peakProcessor = new DeconToolsV2.Peaks.clsPeakProcessor();
            DeconToolsV2.Peaks.clsPeakProcessorParameters parameters    = new DeconToolsV2.Peaks.clsPeakProcessorParameters();

            parameters.PeakBackgroundRatio    = PeakToBackgroundRatio;
            parameters.SignalToNoiseThreshold = SignalToNoiseThreshold;
            parameters.PeakFitType            = DeconToolsV2.Peaks.PEAK_FIT_TYPE.QUADRATIC;

            peakProcessor.SetOptions(parameters);
            DeconToolsV2.Peaks.clsPeak[] peakList = new DeconToolsV2.Peaks.clsPeak[1];
            peakProcessor.DiscoverPeaks(ref xData, ref yData, ref peakList, 0, float.MaxValue);
            float[] mz        = new float[peakList.Length];
            float[] intensity = new float[peakList.Length];
            for (int i = 0; i < peakList.Length; i++)
            {
                mz[i]        = Convert.ToSingle(peakList[i].mdbl_mz);
                intensity[i] = Convert.ToSingle(peakList[i].mdbl_intensity);
            }
            _msScan.MZs         = mz;
            _msScan.Intensities = intensity;
        }