Hi,
 
I am analysing an Affy experiment and want to use the geneplotter package to
generate paired images of expression along each chromosome but keep running
into a 'subscript out of bounds' error. I am using RGui 2.2.1 and
geneplotter 1.8 on Windows XP. The script I am using is as follows:
 
library(simpleaffy)
library(genefilter)
library(geneplotter)
library(multtest)
library(affy)
library(limma)
library(gcrma)
library(xtable)
library(mouse4302)
library(GO)
library(annotate)
library(annaffy)
myexp <- read.phenoData("Sample_InfoR.txt", header=TRUE, row.names=1)
raw <-
ReadAffy(filenames=rownames(pData(myexp)),phenoData=myexp,verbose=TRUE)
esetGCRMA <- gcrma(raw)
f1 <- kOverA(3,6)
ff<-filterfun(f1)
wh<-genefilter(esetGCRMA, ff)
mySubSet<-esetGCRMA[wh,]
 
selSamples <- mySubSet$Sample_Group %in% c("D","CONTROL")
Set <- mySubSet[, selSamples]
Set$Sample_Group <- factor(Set$Sample_Group)
colnames(exprs(Set)) <- paste(Set$Sample_Group,colnames(exprs(Set)))
library("genefilter")
g <- split(1:length(Set$Sample_Group), Set$Sample_Group)
meanThr <- log2(100)
tThr <- qt(0.9999, df = sum(listLen(g)) - 2)
s1 <- rowMeans(exprs(Set)[, g[[1]]]) > meanThr
s2 <- rowMeans(exprs(Set)[, g[[2]]]) > meanThr
s3 <- abs(fastT(exprs(Set), g[[1]], g[[2]], var.equal = TRUE)$z) >tThr
selProbes <- (s1 | s2) & s3
Sethm <- Set[selProbes, ]

chrLoc <- buildChromLocation("mouse4302")
 
Setch <- Set[s1 | s2, ]
m1 <- rowMeans(exprs(Setch)[, Setch$Sample_Group =="D"])
m2 <- rowMeans(exprs(Setch)[, Setch$Sample_Group =="CONTROL"])
 
deciles <- quantile(c(m1, m2), probs = seq(0,1, 0.1))
s1dec <- cut(m1, deciles)
s2dec <- cut(m2, deciles)
gN <- names(s1dec) <- names(s2dec) <- geneNames(Setch)
colors <- dChip.colors(10)  # Alternate colour scheme
layout(matrix(1:3, nr = 1), widths = c(5, 5, 2))
cPlot(chrLoc, main = "D")
cColor(gN, colors[s1dec], chrLoc)
cPlot(chrLoc, main = "CONTROL")
cColor(gN, colors[s2dec], chrLoc)
image(1, 1:10, matrix(1:10, nc = 10), col = colors,axes = FALSE, xlab = "",
ylab = "")
axis(2, at = (1:10), labels = levels(s1dec), las = 1)
 
par(mfrow = c(1, 1))
msobj <- Makesense(Set, "mouse4302")
Error in Makesense(exprs(expr), lib, f) : subscript out of bounds
 
All seems to be going OK initially and I get good comparitive images of the
whole genome but the 'Makesense' stage fails every time. I checked that
'Set' is indeed an exprSet and I have tried updating my packages and have
also installed the 2.3 version of R and its associated packages but still
get the same problem.
 
Please help if you can, I have read all the vignettes,etc but without any
joy on this one!
 
Many thanks,
 
Quentin Anstee
Imperial College London

	[[alternative HTML version deleted]]

