Morpheus.TandemMassSpectrum.TandemMassSpectrum C# (CSharp) Method

TandemMassSpectrum() public method

public TandemMassSpectrum ( string filename, int spectrumNumber, string spectrumId, string spectrumTitle, double retentionTimeMinutes, string fragmentationMethod, double precursorMZ, double precursorIntensity, int precursorCharge, double precursorMass, List peaks ) : System.Collections.Generic
filename string
spectrumNumber int
spectrumId string
spectrumTitle string
retentionTimeMinutes double
fragmentationMethod string
precursorMZ double
precursorIntensity double
precursorCharge int
precursorMass double
peaks List
return System.Collections.Generic
        public TandemMassSpectrum(string filename, int spectrumNumber, string spectrumId, string spectrumTitle, double retentionTimeMinutes, string fragmentationMethod, double precursorMZ, double precursorIntensity, int precursorCharge, double precursorMass, List<MSPeak> peaks)
        {
            Filename = filename;
            SpectrumNumber = spectrumNumber;
            SpectrumId = spectrumId;
            SpectrumTitle = spectrumTitle;
            RetentionTimeMinutes = retentionTimeMinutes;
            FragmentationMethod = fragmentationMethod;
            PrecursorMZ = precursorMZ;
            PrecursorIntensity = precursorIntensity;
            PrecursorCharge = precursorCharge;
            PrecursorMass = precursorMass;
            TotalIntensity = 0.0;
            if(peaks != null)
            {
                peaks.Sort(MSPeak.AscendingMassComparison);
                Masses = new double[peaks.Count];
                Intensities = new double[peaks.Count];
                for(int p = 0; p < peaks.Count; p++)
                {
                    MSPeak peak = peaks[p];
                    Masses[p] = peak.Mass;
                    Intensities[p] = peak.Intensity;
                    TotalIntensity += peak.Intensity;
                }
            }
        }