samr: understanding scoring line not parallel to diagonal; reproduce example C
1
0
Entering edit mode
SamGG ▴ 350
@samgg-6428
Last seen 7 hours ago
France/Marseille/Inserm

Hi,

As I want to understand why a scoring line on the so-called SAM plot could be not parallel to the diagonal I go back to the doc. There is a similar example, example C p 21.

http://statweb.stanford.edu/~tibs/SAM/sam.pdf

I tried to reproduce it using the given formula (p 19-20), but I don't a similar plot.

I will appreciate any help to understand such a plot or to correct the simulation formula.

Best.

library(samr)
set.seed(0)
nr = 1000
ns = 4
edat = matrix(rnorm(nr*ns*2), nrow = nr)
exC = edat + matrix(c(rep(0, nr*ns), rnorm(nr*ns, mean = 0, sd = 8)), nrow = nr)
heatmap(exC, Rowv = NA, Colv = NA)
exC.sam = samr(list(x = exC[,c(1:3,5,4,6:8)], y = c(rep(1, ns), rep(2, ns)), logged2 = TRUE), resp.type = "Two class unpaired", assay.type = "array")
samr.plot(exC.sam, 0.5)

 

samr • 1.3k views
ADD COMMENT
1
Entering edit mode
SamGG ▴ 350
@samgg-6428
Last seen 7 hours ago
France/Marseille/Inserm

Finally, I understood that I overlooked an index in the formula. The simulation aims to add an offset to every row/gene of the second condition, so that every gene is expressed differentially.

exC = edat
exC[,ns+seq(ns)] = exC[,ns+seq(ns)] + rnorm(nr, mean = 0, sd = 4)

Such an effect is still present after row and column centering.

HTH

ADD COMMENT

Login before adding your answer.

Traffic: 530 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6