[BioC] limma makeContrasts
Ben Nota
ben.nota at ecology.falw.vu.nl
Mon Aug 21 10:51:11 CEST 2006
Dear BioC,
I'm trying to make use of the "makeContrasts" function in "limma", but I
am getting errors. Where do I go wrong? First a little background info:
I have 3 different ages (18, 25 and 29 days) en they are all treated (j)
and non-treated (n). I used 6 Agilent custom arrays (~5000 genes in
duplicate). My targets, after using the "targetsA2C" function, looks
like this:
channel.col X SlideNumber FileName Date Target
Array01A.1 1 1 1A Array01A.txt 2006/7/20 18j
Array01A.2 2 1 1A Array01A.txt 2006/7/20 25n
Array01B.1 1 2 1B Array01B.txt 2006/7/20 18n
Array01B.2 2 2 1B Array01B.txt 2006/7/20 29j
Array02A.1 1 3 2A Array02A.txt 2006/8/17 25j
Array02A.2 2 3 2A Array02A.txt 2006/8/17 29n
Array02B.1 1 4 2B Array02B.txt 2006/8/17 25n
Array02B.2 2 4 2B Array02B.txt 2006/8/17 18j
Array03A.1 1 5 3A Array03A.txt 2006/8/17 29j
Array03A.2 2 5 3A Array03A.txt 2006/8/17 18n
Array03B.1 1 6 3B Array03B.txt 2006/8/17 29n
Array03B.2 2 6 3B Array03B.txt 2006/8/17 25j
This means I have on Slide 1: 18j (Cy3) vs 25n (Cy5), Slide 2: 18n (Cy3)
vs 29j (Cy5), etc. This is an unconnected design. So I tried to use
Chapter 9 (Separate Channel Analysis of Two-color Data) of the limma
User's manual. When I try to make a contrast, I am getting an error:
> Cont.18<-makeContrasts(18j-18n,levels=design)
Error: syntax error in "Cont.18<-makeContrasts(18j"
When I try to use "", I am getting also an error:
> Cont.18<-makeContrasts("18j-18n",levels=design)
Error in parse(file, n, text, prompt) : syntax error in "18j"
Does anybody knows where the error occurs? What am I doing wrong?
Thanks in advance!
Regards, Ben.
N.B. I will put my whole script here, in case I made an error somewhere
before:
#load library
library(limma)
#Read target file
targets<-readTargets("SampleFile2.txt")
#Create raw data from target files
RG<-read.maimages(targets$FileName, source="agilent")
#Missing data omzeilen
RGb<-backgroundCorrect(RG, method="normexp",offset=50)
#Normalize arrays with global loess
MARGb<-normalizeWithinArrays(RGb,method="loess")
#Normalize between the arrays with Aquantile
MARGb2<-normalizeBetweenArrays(MARGb,method="Aquantile")
#Convert targets frame to be channel orientated
targets2<-targetsA2C(targets)
#Make design matrix, I used limma user' guide, chapter 9 ("Separate
Channel Analysis of Two-Color Data")
targets2
u<-unique(targets2$Target)
f<-factor(targets2$Target,levels=u)
design<-model.matrix(~0+f)
colnames(design)<-u
#Estimate correlation and fit linear model for individual channels of
two-color data
corfit<-intraspotCorrelation(MARGb2,design)
fit<-lmscFit(MARGb2,design,correlation=corfit$consensus)
Cont.18<-makeContrasts("18.j-18.n",levels=design)
--
Benjamin Nota
Vrije Universiteit
Department of Animal Ecology
De Boelelaan 1085
1081 HV AMSTERDAM, The Netherlands
Tel: +31 (0)20-5987217
Fax: +31 (0)20-5987123
ben.nota at ecology.falw.vu.nl
http://www.bio.vu.nl/do/
More information about the Bioconductor
mailing list