[BioC] Error with lmFit

Sara Rollinson Sara.Rollinson at egu.york.ac.uk
Tue Apr 26 13:12:40 CEST 2005


Dear Anyone- can you help me

 

I'm trying to use limma to do a time course analysis using affymetrix
data,  I'm new to R so I guess I'm doing something really silly so I'm
sorry if I'm being stupid. I've tried searching the archive and I'm no
wiser.

Also sorry about the length of this posting, I wanted to try and cover
everything I've tried.

 

I've installed R version 2.0.1 and used the Packages option to install
the Affy and Limma packages, can I just say that's really easy!, very
nice pdf file help to :-)

 

I started by using the affy package to read in my cel files from the
directory I set

 

Data<- ReadAffy()

 

And for speeds sake am first trying the rma option to normalize  

Eset <-rma(Data)

 

Which gives me

> eset

Expression Set (exprSet) with 

        22810 genes

        24 samples

                 phenoData object with 1 variables and 26 cases

         varLabels

                sample: arbitrary numbering

 

I've also loaded a Targets file as below 

 

                                                FileName
Target

30MIN_SHOOT_REP1          30MIN_SHOOT_REP1.CEL  con0.5hr

30MIN_SHOOT_REP2          30MIN_SHOOT_REP2.CEL  con0.5hr

 

Etc with different times and a treatment set, a set of replicates per
sample.

 

Obviously, I was being a bit ambitious, I used the info given on page 35
of the limma manual to try and analyze my time course data as per the
example

> lev<- c("con0.5hr", "con1hr","con3hr", "con6hr", "con12hr", "con24hr",

+ "tre0.5hr", "tre1hr", "tre3hr", "tre6hr", "tre12hr", "tre24hr")

which gives me

> lev

 [1] "con0.5hr" "con1hr"   "con3hr"   "con6hr"   "con12hr"  "con24hr" 

 [7] "tre0.5hr" "tre1hr"   "tre3hr"   "tre6hr"   "tre12hr"  "tre24hr"

 

then

> f <- factor(targets$Target, levels=lev)

> f

 [1] con0.5hr con0.5hr con1hr   con1hr   con3hr   con3hr   con6hr
con6hr  

 [9] con12hr  con12hr  con24hr  con24hr  tre0.5hr tre0.5hr tre1hr
tre1hr  

[17] tre3hr   tre3hr   tre6hr   tre6hr   tre12hr  tre12hr  tre24hr
tre24hr 

12 Levels: con0.5hr con1hr con3hr con6hr con12hr con24hr tre0.5hr ...
tre24hr

 

then design the model matrix

design <- model.matrix(~0+f)

> design

   fcon0.5hr fcon1hr fcon3hr fcon6hr fcon12hr fcon24hr ftre0.5hr ftre1hr

1          1       0       0       0        0        0         0       0

2          1       0       0       0        0        0         0       0

3          0       1       0       0        0        0         0       0

4          0       1       0       0        0        0         0       0

5          0       0       1       0        0        0         0       0

6          0       0       1       0        0        0         0       0

7          0       0       0       1        0        0         0       0

8          0       0       0       1        0        0         0       0

9          0       0       0       0        1        0         0       0

10         0       0       0       0        1        0         0       0

11         0       0       0       0        0        1         0       0

12         0       0       0       0        0        1         0       0

13         0       0       0       0        0        0         1       0

14         0       0       0       0        0        0         1       0

15         0       0       0       0        0        0         0       1

16         0       0       0       0        0        0         0       1

17         0       0       0       0        0        0         0       0

18         0       0       0       0        0        0         0       0

19         0       0       0       0        0        0         0       0

20         0       0       0       0        0        0         0       0

21         0       0       0       0        0        0         0       0

22         0       0       0       0        0        0         0       0

23         0       0       0       0        0        0         0       0

24         0       0       0       0        0        0         0       0

   ftre3hr ftre6hr ftre12hr ftre24hr

1        0       0        0        0

2        0       0        0        0

3        0       0        0        0

4        0       0        0        0

5        0       0        0        0

6        0       0        0        0

7        0       0        0        0

8        0       0        0        0

9        0       0        0        0

10       0       0        0        0

11       0       0        0        0

12       0       0        0        0

13       0       0        0        0

14       0       0        0        0

15       0       0        0        0

16       0       0        0        0

17       1       0        0        0

18       1       0        0        0

19       0       1        0        0

20       0       1        0        0

21       0       0        1        0

22       0       0        1        0

23       0       0        0        1

24       0       0        0        1

attr(,"assign")

 [1] 1 1 1 1 1 1 1 1 1 1 1 1

attr(,"contrasts")

attr(,"contrasts")$f

[1] "contr.treatment"

 

Then

> colnames(design)<-lev

> colnames(design)

 [1] "con0.5hr" "con1hr"   "con3hr"   "con6hr"   "con12hr"  "con24hr" 

 [7] "tre0.5hr" "tre1hr"   "tre3hr"   "tre6hr"   "tre12hr"  "tre24hr"

 

But when I do lmFit I get

> fit <-lmFit(eset,design)

Error in lm.fit(design, t(M)) : incompatible dimensions

 

So I tested if my expression set is a data.frame as I think it is
supposed to be

> is.data.frame(eset)

[1] FALSE

 

So then I tried importing my pre-normalized values into a data table
using 

 

data<-read.csv("mydata.csv", header = TRUE, sep = ',')

> is.data.frame(data)

[1] TRUE

 

and is formatted as following (the header names being as the targets
file, shortened here to fit on screen)

            X                     30MINREP1   30MINREP2

1          244901_at       6.34848           6.128339

etc for miles!

 

But I get the same lmfit error as before?

<-lmFit(data,design)

Error in lm.fit(design, t(M)) : incompatible dimensions

 

Can anyone give me any help, I guess I'm missing something basic, I
think I have a different problem with the eset and the imported data
file but am really stuck.

 

Many thanks in advance for any help anyone can give me

 

Sara Rollinson

 

 

 

 

Dr Sara Rollinson,

Academic Unit of Oncology and Haematology,

Algernon Firth Building,

Great George Street,

University of Leeds,

Leeds,

Ls2 9JT.

 


	[[alternative HTML version deleted]]



More information about the Bioconductor mailing list