[BioC] Problem producing imageplot for Agilent data

Lesley Hoyles [guest] guest at bioconductor.org
Wed Jul 18 13:20:13 CEST 2012


Hi

I am following the 'Single channel analysis of Agilent microarray data with Limma' given at http://matticklab.com/index.php?title=Single_channel_analysis_of_Agilent_microarray_data_with_Limma.

>From starting with the shortened code given at the top of the webpage, I have been able to produce boxplots and MA plots for the prenormalized and normalized data, and volcano plots for the normalized data. I'm able to export the pre-normalized and normalized data, and have generated output files (from topTable) for the various coefficients I am testing.

However, I'm having problems creating imageplots from the data. I've had a look at the script given at https://stat.ethz.ch/pipermail/bioconductor/2007-January/015532.html and have tried various ways of modifying it to get it to work for my data. Please find below an excerpt of my script.

The output I get when the script gets to the imageplot part of this version of the script is 'Error in (row - 1) * nc + c : non-numeric argument to binary operator'.

I am not sure where I am going wrong. Any help as to how to correct the code would be greatly appreciated.

Thanks
Lesley

-------------------------------------------

targets <- readTargets("Targets.txt")
x <- read.maimages(targets, path="assays/", source="agilent.median",green.only=TRUE) #x = $E, $Eb, $targets, $genes, $source

##Create boxplot of pre-normalized data
png("QC/Raw_data/Boxplot_prenormalization.png")'
boxplot(log2(x$E) ~ col(x$E), names = targets$Patient_id, las = 2, ylab = "E", main = "Pre-normalized data")
dev.off()

##Produce pseudo-MA plots for pre-normalized data
E <- log2(x$E) #Log2 transform the values
A <- matrix(rowMeans(E),nrow(E),ncol(E))
MA <- new("MAList",list(M=E,A=A))
png("*.png")
plotMA3by2(MA) #Can use plotMA3by2() for single channel data by making a pseudo two-color data object
dev.off()

##read.maimages() doesn't set the $printer information automatically for Agilent data; need to expand out the data vector to be the right length by adding NAs in the right places, so that imageplot() can be used https://stat.ethz.ch/pipermail/bioconductor/2007-January/015532.html

r <- x$genes$Row
c <- x$genes$Col
nr <- max(r)
nc <- max(c)
y <- rep(NA,nr*nc)
i <- (r-1)*nc+c
y[i] <- log2(x$E)
imageplot(y,x$printer)

 -- output of sessionInfo(): 

R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C             
 [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8    
 [5] LC_MONETARY=en_US.utf8    LC_MESSAGES=en_US.utf8   
 [7] LC_PAPER=C                LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C      

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

other attached packages:
[1] limma_3.12.1


--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list