public void GetMSMSSpectrum() { dataFile = new MSDataFile(Properties.Settings.Default.mzXMLTestFile2); spectrumCache = new SpectrumCache(); averagedSpectrumExtractor = new AveragedSpectrumExtractor(dataFile.run, spectrumCache); Domain.ISpectrum msmsSpectrum = averagedSpectrumExtractor.GetMSMSSpectrum(7.8, 1, 592.3, 0.5); Assert.AreEqual(42279, msmsSpectrum.Count); Assert.AreEqual(37, Math.Round(msmsSpectrum.GetXYPair(63).YValue, 5)); }
public void Open(string fileName, int sampleIndex) { if (_currentSampleIndex != sampleIndex || _currentFileName != fileName) { MSDataList msdList = new MSDataList(); ReaderList.FullReaderList.read(fileName, msdList); _dataFile = msdList[0]; _run = _dataFile.run; _currentFileName = fileName; _currentSampleIndex = sampleIndex; spectrumCache = new SpectrumCache(); ticGenerator = new TicGenerator(_run, spectrumCache); xicGenerator = new XicGenerator(_run, spectrumCache); spectrumExtractor = new SpectrumExtractor(_run, spectrumCache); averagedSpectrumExtractor = new AveragedSpectrumExtractor(_run, spectrumCache); } }
public void MyTestInitialize() { dataFile = new MSDataFile(Properties.Settings.Default.mzXMLTestFile1); spectrumCache = new SpectrumCache(); averagedSpectrumExtractor = new AveragedSpectrumExtractor(dataFile.run, spectrumCache); timer = new Stopwatch(); }