ProMex Identified Proteoforms

library("LewyBodies.SN.TopDown")
library("vp.misc")
library("msmsTests")
library("pcaMethods")

Overview and Normalization

data(promex_human_db)
# subset and transform
m <- m[rowSums(!is.na(exprs(m))) > 25,]
exprs(m) <- log2(exprs(m))
exprs(m) <- sweep(exprs(m), 1, rowMeans(exprs(m), na.rm=T))
#
dim(m)
image.lewy.iq(m)
m <- normalizeByGlob(m)
image.lewy.iq(m)

PCA

mi <- m
exprs(mi) <- t(completeObs(pca(as(mi,"ExpressionSet"), 
                               method="bpca", nPcs=51, center = TRUE)))
counts.pca(mi, facs=pData(mi)[,"prepBatch",drop=F], snms=sampleNames(mi))

Test prepBatch

res <- eset_lm(m, "y ~ prepBatch + 1", "y ~ 1")
res$p.val.adj <- p.adjust(res$p.value)
sum(res$p.val.adj < 0.05)
sum(res$p.val.adj < 0.05)/nrow(res)
hist(res$p.value, 50, col='lightgrey')

Test Subject Groups

res <- eset_lm(m, "y ~ subject.type + match.group", "y ~ match.group")
res$p.val.adj <- p.adjust(res$p.value)
sum(res$p.val.adj < 0.05, na.rm=T)
head(res[order(res$p.value),], 10)
hist(res$p.value, 50, col='lightgrey')
best <- rownames(res)[which.min(res$p.value)]
plot.lewy.count.feature(m, best)


vladpetyuk/LewyBodies.SN.TopDown documentation built on May 3, 2019, 6:15 p.m.