Problem with Agilent microarray data analysis using limma package
1
0
Entering edit mode
Jesse L. • 0
@jesse-l-11129
Last seen 8.4 years ago

Hi all,

I am using limma package to analyze the expression array data (single channel Agilent microarray) of 14 paired dog cancer samples. 

library(limma)
SDRF <- read.delim("SDRF.txt", check.names=FALSE, stringsAsFactors=FALSE)
x <- read.maimages(SDRF[,"Array Data File"],source="agilent",green.only=TRUE)
y <- backgroundCorrect(x,method="normexp")
neg95 <- apply(y$E[y$genes$ControlType==-1,],2,function(x) quantile(x,p=0.95))
cutoff <- matrix(1.1*neg95,nrow(y),ncol(y),byrow=TRUE)
isexpr <- rowSums(y$E > cutoff) >= 7
table(isexpr)
y0 <- y[y$genes$ControlType==0 & isexpr,]
group <- SDRF[,"Dog"]
levels <- c("1","2","3","4","5","6","7")
group <- factor(group, levels = levels)
type <- SDRF[,"Type"]
levels <- c("P","M")
type <- factor(type, levels = levels)
design <- model.matrix(~group+type)

It works fine. However, when I ran

fit <- lmFit(y0, design)

It shows that

Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x),  : 
  'data' must be of a vector type, was 'NULL'

This problem is similar with the one posted at Agilent data processing by Limma R package, but has not been solved yet. 

 

> traceback()
5: array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), 
       NULL) else NULL)
4: as.matrix.default(object$M)
3: as.matrix(object$M)
2: getEAWP(object)
1: lmFit(y0, design)

I am a newbie and still have no idea what's wrong with the function. It is highly appreciated if someone can help.

Here is the system I am using:

> sessionInfo()
R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.3 (El Capitan)

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.2.4

Thanks a lot!

Jesse

limma agilent microarrays lmfit • 1.8k views
ADD COMMENT
2
Entering edit mode
@gordon-smyth
Last seen 4 hours ago
WEHI, Melbourne, Australia

There isn't anything wrong with the lmFit() function. The problem is that you haven't normalized the data, so that the data object y0 is not yet ready for lmFit().

Please follow the case study code in the limma User's Guide, which uses normalizeBetweenArrays().

ADD COMMENT
0
Entering edit mode

Hi Gordon,

Thank you so much for your reply! I did miss the normalizeBetweenArray()...now it works perfectly! 

Just one more question, I am not so sure if my design matrix is appropriate for the paired samples analysis, is that OK?

group <- SDRF[,"Dog"]
levels <- c("1","2","3","4","5","6","7")
group <- factor(group, levels = levels)
type <- SDRF[,"Type"]
levels <- c("P","M")
type <- factor(type, levels = levels)
design <- model.matrix(~group+type)

thanks!

Jesse L.

ADD REPLY
0
Entering edit mode

Well, I don't know anything about your experiment, but your design matrix looks correct for a paired analysis.

ADD REPLY
0
Entering edit mode

Hi Gordon,

I have 7 matched primary (P) and metastatic (M) cancer samples (14 samples in total). I am going to identify the differentially expressed genes between two groups (M vs. P). So, I used the design matrix below:

group <- SDRF[,"Dog"]
levels <- c("1","2","3","4","5","6","7")
group <- factor(group, levels = levels)
type <- SDRF[,"Type"]
levels <- c("P","M")
type <- factor(type, levels = levels)
design <- model.matrix(~group+type)

I am not sure if it is correct.

Thanks!

Jesse L.

ADD REPLY

Login before adding your answer.

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