Question: automating makeContrasts call in limma
0
gravatar for Gordon Smyth
12.0 years ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:
You need makeContrasts(contrasts=con, levels=dMatrix) See the help page. Gordon >Date: Thu, 25 Oct 2007 12:46:57 +0200 >From: Amin Moghaddasi <a.moghaddasi at="" gmail.com=""> >Subject: [BioC] automating makeContrasts call in limma >To: bioconductor at stat.math.ethz.ch > >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 • 564 views
ADD COMMENTlink written 12.0 years ago by Gordon Smyth38k
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: 272 users visited in the last hour