public override int GetMsnOrder(int spectrumNumber) { var spec = _activeMSExperiment.GetMassSpectrumInfo(spectrumNumber); return(spec.MSLevel); }
private static MzLite.Model.MassSpectrum GetSpectrum( Batch batch, MassSpectrometerSample sample, MSExperiment msExp, int sampleIndex, int experimentIndex, int scanIndex) { MassSpectrumInfo wiffSpectrum = msExp.GetMassSpectrumInfo(scanIndex); MzLite.Model.MassSpectrum mzLiteSpectrum = new Model.MassSpectrum(ToSpectrumID(sampleIndex, experimentIndex, scanIndex)); // spectrum mzLiteSpectrum.SetMsLevel(wiffSpectrum.MSLevel); if (wiffSpectrum.CentroidMode) { mzLiteSpectrum.SetCentroidSpectrum(); } else { mzLiteSpectrum.SetProfileSpectrum(); } // scan Scan scan = new Scan(); scan.SetScanStartTime(wiffSpectrum.StartRT) .UO_Minute(); mzLiteSpectrum.Scans.Add(scan); // precursor if (wiffSpectrum.IsProductSpectrum) { Precursor precursor = new Precursor(); double isoWidth; double targetMz; if (GetIsolationWindow(wiffSpectrum.Experiment, out isoWidth, out targetMz)) { precursor.IsolationWindow .SetIsolationWindowTargetMz(targetMz) .SetIsolationWindowUpperOffset(isoWidth) .SetIsolationWindowLowerOffset(isoWidth); } SelectedIon selectedIon = new SelectedIon(); selectedIon.SetSelectedIonMz(wiffSpectrum.ParentMZ) .SetChargeState(wiffSpectrum.ParentChargeState); precursor.SelectedIons.Add(selectedIon); precursor.Activation .SetCollisionEnergy(wiffSpectrum.CollisionEnergy); mzLiteSpectrum.Precursors.Add(precursor); } return(mzLiteSpectrum); }