eig_norm1: Identify bias trends

Description Usage Arguments Value Examples

Description

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

Usage

1
eig_norm1(m, treatment, prot.info, write_to_file = "")

Arguments

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(1: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

Value

A structure with multiple components

m, treatment, prot.info, grp

initial parameters passed into the function, returned for future reference

my.svd

matrices produced by SVD

pres

matrix of peptides that can be normalized, i.e. have enough observations for ANOVA

n.treatment

number of factors passed in

n.u.treatment

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

h.c

number of bias trends identified

present

names/IDs of peptides in variable 'pres'

complete

complete peptides with no missing values, these were used to compute SVD

toplot1

trends automatically identified in raw data, can be plotted at a later time

Tk

scores for each bias trend, eigenvalues

ncompl

number of complete peptides with no missing observations

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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'))
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)

yuliya8k/MultiMat documentation built on May 18, 2019, 5:50 a.m.