Hello all,

I tried to run the following code to order the unevenly spaced duplicate
probes on my two color arrays:

>*MA.norm <- MA.norm[order(MA.norm$genes$ID),]
*>*
*>*x <- unique(MA.norm$genes$ID)
*>*
*>*MA.norm$genes$spotrep <- NULL
*>*
*>*# I'm sure there's a better, faster way to do the following, but this is
*>*
*>*the only way I know how:
*>*
*>*for (i in 1:length(x)) {
*>*      y <- which( MA.norm$genes$ID == x[i] )
*>*      MA.norm$genes$spotrep[y] <- 1:length(y)
*>*      }
*>*
*>*MA.norm.2spot <- MA.norm[MA.norm$genes$spotrep <= 2 , ]

*

But I kept getting the following error message:

Error in `$<-.data.frame`(`*tmp*`, "spotrep", value = 1:442) :
  replacement has 442 rows, data has 20160

The problem ended up being an issue with the initialization of the
"MA.norm$genes$spotrep" object.  It was being initialized within the loop
with a length equal to the number of occurences of the first probe in my
ordered (by MA.norm.$genes$ID), MA.norm object (which was a "-" for an empty
spot which occurred 442 times).

This might just be an issue with the version of R that I'm running (GUI
1.22-devel (4859) (4859)) or the platform I'm running it on (Mac OSX Version
10.4.11), but I just wanted to put it out there in case others are having
issues.

I solved the problem by initializing the "MA.norm$genes$spotrep" object as
follows:

MA.norm$genes$spotrep[1:length(MA.norm$genes$ID)] <- 0

Thanks for the code.

Long live bioconductor!

Bryan


-- 
Bryan Clarkson
Graduate Student
Doudna Lab. UC Berkeley
731 Stanley Hall MS #3220
Berkeley, Ca. 94720

	[[alternative HTML version deleted]]

