#Simulate data based on "pecten"
data(pecten)
data(pecten.fac)
pecten.norm <- Norm.qt(pecten, n1=6, n2=6, plot=FALSE)
Sim.data <- Sim.Prot.2D(data=pecten.norm, nsp=700, nr=10, p0=0.1, s2_0=0.2, d0=3)
#Compare different methods for finding diffenrentially expressed proteins
res.stud <- ttest.Prot(Sim.data, fdr.thr=0.1, plot=FALSE)
res.mo <- modT.Prot(Sim.data, fdr.thr=0.1, plot=FALSE)
a <- featureNames(res.stud)
a # Names of the spots selected for a student's t-test with an FDR of 0.1
b <- featureNames(res.mo)
b # Names of the spots selected for a modT-test with an FDR of 0.1
c <- notes(Sim.data)$SpotSig
c # Names of the really differentially generated spots
# Compare between t-test and moderate t-test (requires made4 package)
# Just for illustration purpose (only 1 simulation !)
## Not run:
# cl.t <- comparelists(c,a)
# cl.m <- comparelists(c,b)
#
# fp <- matrix(c(c(length(a)- (cl.t$Length.Y-length(cl.t$intersect))),
# c(cl.t$Length.Y-length(cl.t$intersect)),
# c(length(b)- (cl.m$Length.Y-length(cl.m$intersect))),
# c(cl.m$Length.Y-length(cl.m$intersect))),
# nrow=2,ncol=2,byrow=F)
#
# barplot(fp, main="spots declared significant",names.arg=c("t-test","modT"))
# legend("topleft",c("False Positives","True Positives"), fill=c("grey","black"), bty="n")
# ## End(Not run)
Run the code above in your browser using DataLab