Gene set analysis with CAMERA
3
0
Entering edit mode
krishna312 • 0
@krishna312-6866
Last seen 8.5 years ago
Finland

Hi, I would be thankful for replies to my question related to gene set analysis with camera. Following is the problem:

Consider the example given on camera help page (?camera).

y <- matrix(rnorm(1000*6),1000,6)
design <- cbind(Intercept=1,Group=c(0,0,0,1,1,1))

# First set of 20 genes are genuinely differentially expressed
index1 <- 1:20
y[index1,4:6] <- y[index1,4:6]+1

# Second set of 20 genes are not DE
index2 <- 21:40

camera(y, list(set1=index1,set2=index2), design)

The above example deals with comparison of two sample groups as one can see in the object, design.

I have more than two sample groups and I want to compare for example group 2 and group 3. So, the group = c(1,1,2,2,3,3).

How to build design matrix for such comparison and what to supply to "contrast" parameter?

Thanks in advance!

limma gene set analysis camera • 5.5k views
ADD COMMENT
3
Entering edit mode
@aliaksei-holik-4992
Last seen 8.9 years ago
Spain/Barcelona/Centre for Genomic Regu…

Presuming you have already done differential expression analysis with limma or edgeR, your design matrix and contrasts for the camera are the same. I would suggest checking out limma user guide: http://www.bioconductor.org/packages/release/bioc/vignettes/limma/inst/doc/usersguide.pdf

Since you can't use 1, 2 and 3 as group names, as they are not syntactically valid names in R, say your group labels are actually:

group = as.factor(c("a","a","b","b","c","c"))

Then your design matrix is:

des <- model.matrix(~0+group)
colnames(des) <- levels(group)

And the contrast to compare group c vs group b is:

contr <- makeContrasts(c-b, levels = des)

Hope it helps,

Aliaksei.

ADD COMMENT
0
Entering edit mode

Thanks Aliaksei! That helped!!

ADD REPLY
0
Entering edit mode
krishna312 • 0
@krishna312-6866
Last seen 8.5 years ago
Finland

Thanks a lot Aliaksei! That helped!!

ADD COMMENT

Login before adding your answer.

Traffic: 837 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