Construct design matrix for qPCR data using Limma package
2
0
Entering edit mode
Hongda Chen ▴ 20
@hongda-chen-6264
Last seen 9.7 years ago
Dear R-users, I am facing a problem in constructing design matrix. My data is qPCR data, analysing 92 protein markers in 92 samples (two groups). I would like to use Limma package to identify differently expressed genes between two groups. The first 38 samples were controls, and the other 54 samples were cases. So how should I construct the design matrix. I have tried the following code. Is this right? design<-matrix(rep(1,184),nrow=92,byrow=TRUE) design[39:92,1]=0 design[1:38,2]=0 colnames(design2)<-c("control","case") Could anyone help me figure out it? Thank you. Adam [[alternative HTML version deleted]]
limma limma • 1.5k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 41 minutes ago
United States
Hi Adam, That's one way of doing it. Well, except for the last line where you substitute in an apparently nonexistent design2 object. Another way would be fact <- factor(rep(c("Control","Case"), c(38,54)), levels = c("Control","Case")) design <- model.matrix(~ 0 + fact) colnames(design) <- gsub("fact", "", colnames(design)) Best, Jim On Wednesday, November 27, 2013 10:29:13 AM, Hongda Chen wrote: > Dear R-users, > > I am facing a problem in constructing design matrix. My data is qPCR data, > analysing 92 protein markers in 92 samples (two groups). I would like to > use Limma package to identify differently expressed genes between two > groups. The first 38 samples were controls, and the other 54 samples were > cases. So how should I construct the design matrix. > > I have tried the following code. Is this right? > design<-matrix(rep(1,184),nrow=92,byrow=TRUE) > design[39:92,1]=0 > design[1:38,2]=0 > colnames(design2)<-c("control","case") > > Could anyone help me figure out it? Thank you. > > Adam > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD COMMENT
0
Entering edit mode
Hongda Chen ▴ 20
@hongda-chen-6264
Last seen 9.7 years ago
Dear R-users, I am facing a problem in constructing design matrix. My data is qPCR data, analysing 92 protein markers in 92 samples (two groups). I would like to use Limma package to identify differently expressed genes between two groups. The first 38 samples were controls, and the other 54 samples were cases. So how should I construct the design matrix. I have tried the following code. Is this right? design<-matrix(rep(1,184),nrow=92,byrow=TRUE) design[39:92,1]=0 design[1:38,2]=0 colnames(design2)<-c("control","case") Could anyone help me figure out it? Thank you. Adam [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

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