matANOVA {PhosR} | R Documentation |
Performs an ANOVA test and returns its adjusted p-value
matANOVA(mat, grps)
mat |
An p by n matrix where p is the number of phosphosites and n is the number of samples |
grps |
A vector of length n, with group or time point information of the samples |
A vector of multiple testing adjusted p-values
data('phospho_L6_ratio') data('SPSs') grps = gsub('_.+', '', colnames(phospho.L6.ratio)) # Cleaning phosphosite label phospho.site.names = rownames(phospho.L6.ratio) L6.sites = gsub(' ', '', sapply(strsplit(rownames(phospho.L6.ratio), '~'), function(x){paste(toupper(x[2]), x[3], '', sep=';')})) phospho.L6.ratio = t(sapply(split(data.frame(phospho.L6.ratio), L6.sites), colMeans)) phospho.site.names = split(phospho.site.names, L6.sites) # Construct a design matrix by condition design = model.matrix(~ grps - 1) # phosphoproteomics data normalisation using RUV ctl = which(rownames(phospho.L6.ratio) %in% SPSs) phospho.L6.ratio.RUV = RUVphospho(phospho.L6.ratio, M = design, k = 3, ctl = ctl) phosphoL6 = phospho.L6.ratio.RUV rownames(phosphoL6) = phospho.site.names # filter for up-regulated phosphosites phosphoL6.mean <- meanAbundance(phosphoL6, grps = gsub('_.+', '', colnames(phosphoL6))) aov <- matANOVA(mat=phosphoL6, grps=gsub('_.+', '', colnames(phosphoL6)))