Question: automating makeContrasts call in limma
0
gravatar for Amin Moghaddasi
12.0 years ago by
Amin Moghaddasi130 wrote:
Hi list, I am trying to call makeContrasts() in limma to accept character vector of all samples vs control. But it seems that makeContrasts() consider only the first element in the contrast vector. Basically what I've done is first to assign design matrix "dMatrix", then make a contrast character vector "con" using paste() like: > dMatrix <- model.matrix(~ -1+factor(c(1,1,2,2,3,3))) > colnames(dMatrix) <- paste("s", 1:(dim(dMatrix)[2]), sep = "") > con<-paste(rep('s'),sep="",3:1,"-s1") > con [1] "s3-s1" "s2-s1" "s1-s1" Then call makeContrasts like: > cMatrix <- makeContrasts(con, levels=dMatrix) > cMatrix Contrasts Levels s3-s1 s1 0 s2 0 s3 0 The expected result is : > cMatrix <- makeContrasts("s3-s1","s2-s1","s1-s1", levels=dMatrix) > cMatrix Contrasts Levels s3-s1 s2-s1 s1-s1 s1 -1 -1 0 s2 0 1 0 s3 1 0 0 So any advise of what I'm doing wrong would be appreciated, Or how can I automatically call makeContrasts using a vector of all samples vs control. Thanks in advance, Amin.
limma assign • 506 views
ADD COMMENTlink written 12.0 years ago by Amin Moghaddasi130
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 163 users visited in the last hour