Entering edit mode
I've loaded the CEL files and want to make a histogram or boxplot as QC:
affy_raw <- file.path(data_dir, list.files(data_dir)) |>
read.celfiles()
Reading in : ../../data/DpQ/GSE154619//GSM4675944_01_CT4N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675945_02_CT5N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675946_03_CT6N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675947_04_CT7N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675948_05_CT15N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675949_06_DQ8N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675950_07_DQ11N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675951_08_DQ16N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675952_09_DQ17N.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675953_10_CT4A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675954_11_CT5A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675955_12_CT6A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675956_13_CT7A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675957_14_CT15A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675958_15_DQ8A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675959_16_DQ11A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675960_17_DQ16A.CEL
Reading in : ../../data/DpQ/GSE154619//GSM4675961_18_DQ17A.CEL
I added the metadata:
phenoData(affy_raw) <- as(metadata, 'AnnotatedDataFrame')
boxplot(affy_raw)
produces the following error:
Error in `$<-.data.frame`(`*tmp*`, "channel", value = structure(integer(0), levels = c("exprs", : replacement has 0 rows, data has 2
Traceback:
1. boxplot(affy_raw)
2. boxplot(affy_raw)
3. .local(x, ...)
4. x[idx, ]
5. x[idx, ]
6. `assayData<-`(`*tmp*`, value = switch(storage.mode, environment = ,
. lockedEnvironment = {
. aData <- new.env(parent = emptyenv())
. if (missing(i)) for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][,
. j, ..., drop = drop] else {
. if (missing(j)) for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][i,
. , ..., drop = drop] else for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][i,
. j, ..., drop = drop]
. }
. if ("lockedEnvironment" == storage.mode) assayDataEnvLock(aData)
. aData
. }, list = {
. if (missing(i)) lapply(orig, function(obj) obj[, j, ...,
. drop = drop]) else {
. if (missing(j)) lapply(orig, function(obj) obj[i,
. , ..., drop = drop]) else lapply(orig, function(obj) obj[i,
. j, ..., drop = drop])
. }
. }))
7. `assayData<-`(`*tmp*`, value = switch(storage.mode, environment = ,
. lockedEnvironment = {
. aData <- new.env(parent = emptyenv())
. if (missing(i)) for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][,
. j, ..., drop = drop] else {
. if (missing(j)) for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][i,
. , ..., drop = drop] else for (nm in ls(orig)) aData[[nm]] <- orig[[nm]][i,
. j, ..., drop = drop]
. }
. if ("lockedEnvironment" == storage.mode) assayDataEnvLock(aData)
. aData
. }, list = {
. if (missing(i)) lapply(orig, function(obj) obj[, j, ...,
. drop = drop]) else {
. if (missing(j)) lapply(orig, function(obj) obj[i,
. , ..., drop = drop]) else lapply(orig, function(obj) obj[i,
. j, ..., drop = drop])
. }
. }))
8. `$<-`(`*tmp*`, "channel", value = structure(integer(0), levels = c("exprs",
. "_ALL_"), class = "factor"))
9. `$<-.data.frame`(`*tmp*`, "channel", value = structure(integer(0), levels = c("exprs",
. "_ALL_"), class = "factor"))
10. stop(sprintf(ngettext(N, "replacement has %d row, data has %d",
. "replacement has %d rows, data has %d"), N, nrows), domain = NA)
boxplot
or hist
works after I run:
eset <- rma(affy_raw)
However, I'd like to see the plots before the processing.
Would appreciate any hints!