Pathfinder Proteoform Ratios

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

Overview and Normalization

data(mspf_human_default)
# subset
m <- m[rowSums(exprs(m) > 0) > 10,]
#
exprs(m) <- log2(exprs(m) + 1)  # should I log or not?
m <- exhaustive_ratios(m, INDEX="ProteinName")
dim(m)

# feature name are too long
fn <- sub("(.+?_HUMAN)_.+?(_s\\d+-e\\d+)-.+?(_s\\d+-e\\d+)",
         "\\1\\2\\3",featureNames(m))
fn2 <- c(unique(fn), fn)
fn2 <- make.unique(fn2)[-seq_len(length(unique(fn)))]
featureNames(m) <- fn2

image.lewy.iq(m)

PCA

counts.pca(m, facs=pData(m)[,"prepBatch",drop=F], snms=sampleNames(m))

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.