eig_norm1 | R Documentation |
First portion of EigenMS: Identify eigentrends attributable to bias, allow the user to adjust the number (with causion! if desired) before normalizing with eig_norm2. Ref: "Normalization of peak intensities in bottom-up MS-based proteomics using singular value decomposition" Karpievitch YV, Taverner T, et al. 2009, Bioinformatics Ref: "Metabolomics data normalization with EigenMS" Karpievitch YK, Nikolic SB, Wilson R, Sharman JE, Edwards LM 2014, PLoS ONE
eig_norm1(m, treatment, prot.info, write_to_file = "")
m |
number of peptides x number of samples matrix of log-transformed expression data, metadata not included in this matrix |
treatment |
either a single factor indicating the treatment group of each sample i.e. [1 1 1 1 2 2 2 2...] or a data frame of factors, eg: treatment= data.frame(cbind(data.frame(Group), data.frame(Time)) |
prot.info |
2+ colum data frame, pepID, prID columns IN THAT ORDER. IMPORTANT: pepIDs must be unique identifiers and will be used as Row Names If normalizing non-proteomics data, create a column such as: paste('ID_',seq_len(num_rows), sep=”) Same can be dome for ProtIDs, these are not used for normalization but are kept for future analyses |
write_to_file |
if a string is passed in, 'complete' peptides (peptides with NO missing observations) will be written to that file name |
A structure with multiple components
initial parameters passed into the function, returned for future reference
matrices produced by SVD
matrix of peptides that can be normalized, i.e. have enough observations for ANOVA
number of factors passed in
number of unique treatment facotr combinations, eg: Factor A: a a a a c c c c Factor B: 1 1 2 2 1 1 2 2 then: n.treatment = 2; n.u.treatment = 4
number of bias trends identified
names/IDs of peptides in variable 'pres'
complete peptides with no missing values, these were used to compute SVD
trends automatically identified in raw data, can be plotted at a later time
scores for each bias trend, eigenvalues
number of complete peptides with no missing observations
data(mm_peptides) head(mm_peptides) # different from parameter names as R uses outer name spaces # if variable is undefined intsCols = 8:13 metaCols = 1:7 # reusing this variable m_logInts = make_intencities(mm_peptides, intsCols) # will reuse the name m_prot.info = make_meta(mm_peptides, metaCols) m_logInts = convert_log2(m_logInts) # 3 samples for CG and 3 for mCG grps = as.factor(c('CG','CG','CG', 'mCG','mCG','mCG')) # ATTENTION: SET RANDOM NUMBER GENERATOR SEED FOR REPRODUCIBILITY !! set.seed(123) # Bias trends are determined via a permutaion, results may # vary slightly if a different seed is used, such as when set.seed() # function is not used mm_m_ints_eig1 = eig_norm1(m=m_logInts,treatment=grps,prot.info=m_prot.info) mm_m_ints_eig1$h.c # check the number of bias trends detected mm_m_ints_norm = eig_norm2(rv=mm_m_ints_eig1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.