public void SearchForTarget(string commonName, Adduct adduct, FragmentationMode fragmentationMode, double hcdMassError, double cidMassError) { CurrentLipidTarget = LipidUtil.CreateLipidTarget(commonName, fragmentationMode, adduct); OnPropertyChanged("CurrentLipidTarget"); SpectrumSearchResultList = InformedWorkflow.RunInformedWorkflow(CurrentLipidTarget, LcMsRun, hcdMassError, cidMassError, ScoreModel); OnPropertyChanged("SpectrumSearchResultList"); if (SpectrumSearchResultList.Any()) { var spectrumSearchResult = SpectrumSearchResultList.OrderByDescending(x => x.NumMatchingMsMsPeaks).First(); OnSpectrumSearchResultChange(spectrumSearchResult); } else { CurrentSpectrumSearchResult = null; } }
public void SearchForFragments(double hcdError, double cidError, FragmentationMode fragmentationMode, int numResultsPerScanToInclude, int minMatches, Adduct adduct) { IProgress <int> progress = new Progress <int>(ReportFragmentSearchProgress); SpectrumSearchResultList = InformedWorkflow.RunFragmentWorkflow(FragmentSearchList, LcMsRun, hcdError, cidError, minMatches, progress); OnPropertyChanged("SpectrumSearchResultList"); progress.Report(0); if (SpectrumSearchResultList.Any()) { var spectrumSearchResult = SpectrumSearchResultList.OrderByDescending(x => x.ApexScanNum).First(); CurrentLipidTarget = LipidUtil.CreateLipidTarget((spectrumSearchResult.HcdSpectrum ?? spectrumSearchResult.CidSpectrum).IsolationWindow.IsolationWindowTargetMz, fragmentationMode, adduct); //OnMsMsSearchResultChange(spectrumSearchResult); OnSpectrumSearchResultChange(spectrumSearchResult); } else { CurrentSpectrumSearchResult = null; } }