automating makeContrasts call in limma
0
0
Entering edit mode
@gordon-smyth
Last seen 3 minutes ago
WEHI, Melbourne, Australia
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 limma ASSIGN • 1.0k views
ADD COMMENT

Login before adding your answer.

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