Entering edit mode
Geoff Woodward
▴
30
@geoff-woodward-5057
Last seen 10.4 years ago
Dear All,
I'm having trouble performing color correction.
I've loaded the data via methylumIDAT() and then coerced to
MethyLumiM.
When I run /lumiMethyC() /it seems to work fine, but when I try to
plot
the data, I get the following message:
> plotColorBias1D(lumiM.c.adj, channel='sum')
Error in density.default(log2(red)) : 'x' contains missing values
I've tried splitting out the 2 different probe types to see if it was
just a typeII probe problem, but I get the same error for both I and
II.
>lumiM.typeI.temp <- expressionSet[pData(featureData(lumiM))[,
"DESIGN"]=="I", ]
>lumiM.typeII.temp <- expressionSet[pData(featureData(lumiM))[,
"DESIGN"]=="II", ]
>lumiM.typeI <- as(lumiM.typeI.temp, "MethyLumiM")
>lumiM.typeII <-as(lumiM.typeII.temp, "MethyLumiM")
> plotColorBias1D(lumiM.typeI.c.adj, channel='sum')
Error in density.default(log2(red)) : 'x' contains missing values
Incidentally, I also lose 2 (of 12) arrays when performing the split
above, is there a better way of doing it?
Thanks for you help. Please find the traceback below:
>traceback()
7: stop("'x' contains missing values")
6: density.default(log2(red))
5: density(log2(red))
4: density(log2(red))
3: FUN(1:10[[3L]], ...)
2: lapply(1:nSample, function(i) {
red.a.i <- unmethy[redInd, i]
red.b.i <- methy[redInd, i]
grn.a.i <- unmethy[grnInd, i]
grn.b.i <- methy[grnInd, i]
if (channel == "both") {
red <- c(red.a.i, red.b.i)
grn <- c(grn.a.i, grn.b.i)
}
else if (channel == "unmethy") {
red <- red.a.i
grn <- grn.a.i
}
else if (channel == "methy") {
red <- red.b.i
grn <- grn.b.i
}
else {
red <- red.a.i + red.b.i
grn <- grn.a.i + grn.b.i
}
if (colorMode) {
if (logMode) {
red[red < 1] <- 1
grn[grn < 1] <- 1
if (length(densityPar) > 0) {
dd.red <- do.call("density", c(list(log2(red)),
densityPar))
dd.grn <- do.call("density", c(list(log2(grn)),
densityPar))
}
else {
dd.red <- density(log2(red))
dd.grn <- density(log2(grn))
}
}
else {
if (length(densityPar) > 0) {
dd.red <- do.call("density", c(list(red),
densityPar))
dd.grn <- do.call("density", c(list(grn),
densityPar))
}
else {
dd.red <- density(red)
dd.grn <- density(grn)
}
}
}
else {
pool <- c(red, grn)
if (logMode) {
pool[pool < 1] <- 1
if (length(densityPar) > 0) {
dd.pool <- do.call("density", c(list(log2(pool)),
densityPar))
}
else {
dd.pool <- density(log2(pool))
}
}
else {
if (length(densityPar) > 0) {
dd.pool <- do.call("density", c(list(pool),
densityPar))
}
else {
dd.pool <- density(pool)
}
}
dd.red <- dd.grn <- dd.pool
}
return(list(red = dd.red, green = dd.grn))
})
1: plotColorBias1D(lumiM.typeI.c.adj, channel = "sum")
I get the following error from plotting the boxplot:
> boxplotColorBias(lumiM.typeI.c.adj, channel='sum')
Error in sprintf(ngettext(length(unique(out[inf])), "Outlier (%s) in
boxplot %d is not drawn", :
invalid format '%d'; use format %f, %e, %g or %a for numeric
objects
[[alternative HTML version deleted]]