Exemplo n.º 1
0
        public IEnumerable<ExtractedSpectrum> SrmSpectraFromMs1Scan(double? retentionTime,
            IList<MsPrecursor> precursors, MsDataSpectrum[] spectra)
        {
            if (!EnabledMs || !retentionTime.HasValue || spectra == null)
                yield break;

            // All filter pairs have a shot at filtering the MS1 scans
            bool isSimSpectra = spectra.Any(IsSimSpectrum);
            foreach (var filterPair in FindMs1FilterPairs(precursors))
            {
                if (!filterPair.ContainsRetentionTime(retentionTime.Value))
                    continue;
                var filteredSrmSpectrum = filterPair.FilterQ1SpectrumList(spectra, isSimSpectra);
                if (filteredSrmSpectrum != null)
                    yield return filteredSrmSpectrum;
            }
        }
Exemplo n.º 2
0
        public IEnumerable<ExtractedSpectrum> Extract(double? retentionTime, MsDataSpectrum[] spectra)
        {
            if (!EnabledMsMs || !retentionTime.HasValue || !spectra.Any())
                yield break;

            var handlingType = _fullScan.IsolationScheme == null || _fullScan.IsolationScheme.SpecialHandling == null
                ? IsolationScheme.SpecialHandlingType.NONE
                : _fullScan.IsolationScheme.SpecialHandling;
            bool ignoreIso = handlingType == IsolationScheme.SpecialHandlingType.OVERLAP ||
                             handlingType == IsolationScheme.SpecialHandlingType.OVERLAP_MULTIPLEXED;

            foreach (var isoWin in GetIsolationWindows(spectra[0].Precursors))
            {
                foreach (var filterPair in FindFilterPairs(isoWin, _acquisitionMethod, ignoreIso))
                {
                    if (!filterPair.ContainsRetentionTime(retentionTime.Value))
                        continue;
                    var filteredSrmSpectrum = filterPair.FilterQ3SpectrumList(spectra, _isWatersMse && GetMseLevel() > 1);
                    if (filteredSrmSpectrum != null)
                        yield return filteredSrmSpectrum;
                }
            }
        }