www.gusucode.com > bioinfo 案例源码程序 matlab代码 > bioinfo/AUCNormalizationExample.m

    %% AUC Normalization
% This example shows how to normalize the area under the curve of every
% mass spectrum from the mass spec data.

% Copyright 2015 The MathWorks, Inc.


%%
% Load a MAT-file, included with the Bioinformatics Toolbox(TM) software, that
% contains sample mass spec data, including MZ_lo_res, a vector of m/z
% values, and Y_lo_res, a matrix of intensity values.
load sample_lo_res

%%
% Create a subset (four signals) of the data.
MZ = MZ_lo_res;
Y = Y_lo_res(:,[1 2 5 6]);

%%
% Plot the four spectra.
plot(MZ, Y)
axis([-1000 20000 -20 105])
xlabel('Mass-charge Ratio')
ylabel('Relative Ion Intensities')
title('Original Spectra')

%%
% Normalize the area under the curve (AUC) of every spectrum to the median,
% eliminating low-mass (m/z < 1,000) noise, and post-rescaling such that
% the maximum intensity is 100. Plot the four spectra.
Y1 = msnorm(MZ,Y,'Limits',[1000 inf],'Max',100);
plot(MZ, Y1)
axis([-1000 20000 -20 105])
xlabel('Mass-charge Ratio')
ylabel('Relative Ion Intensities')
title('AUC Normalized Spectra')