Question: Problem with Agilent microarray data analysis using limma package
0
gravatar for Jesse L.
3.2 years ago by
Jesse L.0
Jesse L.0 wrote:

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

ADD COMMENTlink modified 3.2 years ago by Gordon Smyth38k • written 3.2 years ago by Jesse L.0
Answer: Problem with Agilent microarray data analysis using limma package
2
gravatar for Gordon Smyth
3.2 years ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

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 COMMENTlink modified 3.2 years ago • written 3.2 years ago by Gordon Smyth38k

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 REPLYlink written 3.2 years ago by Jesse L.0

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

ADD REPLYlink modified 3.2 years ago • written 3.2 years ago by Gordon Smyth38k

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 REPLYlink written 3.2 years ago by Jesse L.0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 295 users visited in the last hour