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
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?
thanks!
Jesse L.
Well, I don't know anything about your experiment, but your design matrix looks correct for a paired analysis.
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:
I am not sure if it is correct.
Thanks!
Jesse L.