msnorm

Normalize set of mass spectra

Syntax

Yout = msnorm(MZ, Y, 'PropertyName', PropertyValue)
[Yout, NormParameters] = msnorm(...)
msnorm(MZ, NewY, NormParameters)
msnorm(..., 'Quantile', QuantileValue)
msnorm(..., 'Limits', LimitsValue)
msnorm(..., 'Consensus', ConsensusValue)
msnorm(..., 'Method', MethodValue)
msnorm(..., 'Max', MaxValue)

Arguments

MZ

Mass/charge vector with the range of ions in the spectra.

Y

Ion intensity vector with the same length as the mass/charge vector (MZ). Y can also be a matrix with several spectra that share the same mass/charge (MZ) range.

Description

Yout = msnorm(MZ, Y, 'PropertyName', PropertyValue) normalizes a group of mass spectra by standardizing the area under the curve (AUC) to the group median.

[Yout, NormParameters] = msnorm(...) returns a structure with the parameters to normalize another group of spectra.

msnorm(MZ, NewY, NormParameters) uses the parameter information from a previous normalization (NormParameters) to normalize a new set of spectra (NewY) with the MZ positions and output scale from the previous normalization. NormParameters is a structure created by msnorm. If a consensus proportion (ConsensusValue) was given in the previous normalization, no new MZ positions are selected, and normalization is performed using the same MZ positions.

msnorm(..., 'Quantile', QuantileValue)specifies a 1-by-2 vector with the quantile limits for reducing the set of MZ values. For example, when QuantileValue is [0.9 1], only the largest 10% of ion intensities in every spectrum are used to compute the AUC. When QuantileValue is a scalar, the scalar value represents the lower quantile limit and the upper quantile limit is set to 1. The default value is [0 1] (use the whole area under the curve, AUC).

msnorm(..., 'Limits', LimitsValue) specifies a 1-by-2 vector with an MZ range for picking normalization points. This parameter is useful to eliminate low-mass noise from the AUC calculation. The default value is [1, max(MZ)].

msnorm(..., 'Consensus', ConsensusValue) selects MZ positions with a consensus rule to include an MZ position into the AUC. Its ion intensity must be within the quantile limits of at least part (ConsensusValue) of the spectra in Y. The same MZ positions are used to normalize all the spectrums. Enter a scalar between 0 and 1.

Use the Consensus property to eliminate low-intensity peaks and noise from the normalization.

msnorm(..., 'Method', MethodValue) selects a method for normalizing the AUC of every spectrum. Enter either 'Median' (default) or 'Mean'.

msnorm(..., 'Max', MaxValue), after individually normalizing every spectrum, scales each spectrum to an overall maximum intensity (Max). Max is a scalar. if omitted, no postscaling is performed. If QuantileValue is [1 1], then a single point (peak height of the tallest peak) is normalized to Max.

Example 1

  1. Load sample data and plot one of the spectra.

    load sample_lo_res;
    Y = Y_lo_res(:,[1 2 5 6]);
    MZ = MZ_lo_res;
    plot(MZ, Y(:, 4));
    


  2. Normalize the AUC of every spectrum to its median, eliminating low-mass noise, and post-rescaling such that the maximum intensity is 100.

    Y1 = msnorm(MZ,Y,'Limits',[1000 inf],'Max',100);
    plot(MZ, Y1(:, 4));


  3. Normalize the ion intensity of every spectrum to the maximum intensity of the single highest peak from any of the spectra in the range above 100 m/z.

    Y2 = msnorm(MZ,Y,'QUANTILE', [1 1],'LIMITS',[1000 inf]);

Example 2

  1. Select MZ regions where the intensities are within the third quartile in at least 90% of the spectrograms.

    [Y3,S] = msnorm(MZ,Y,'Quantile',[0.5 0.75],'Consensus',0.9);
  2. Use the same MZ regions to normalize another set of spectrograms.

    Y4 = msnorm(MZ,Y,S);

See Also

Bioinformatic Toolbox functions msalign, msbackadj, msheatmap, mslowess, msresample, mssgolay, msviewer


© 1994-2005 The MathWorks, Inc.