Can't make a boxplot or hist with oligo
1
0
Entering edit mode
@iamfilippov-22435
Last seen 20 months ago
Estonia

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!

oligo • 806 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Works for me. What's the output from sessionInfo (you should always provide this!)?

> affy_raw <- read.celfiles(list.celfiles(listGzipped = TRUE))
Loading required package: pd.clariom.s.mouse
Platform design info loaded.
Reading in : GSM4675944_01_CT4N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675945_02_CT5N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675946_03_CT6N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675947_04_CT7N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675948_05_CT15N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675949_06_DQ8N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675950_07_DQ11N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675951_08_DQ16N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675952_09_DQ17N_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675953_10_CT4A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675954_11_CT5A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675955_12_CT6A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675956_13_CT7A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675957_14_CT15A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675958_15_DQ8A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675959_16_DQ11A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675960_17_DQ16A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
Reading in : GSM4675961_18_DQ17A_Emanual_9-12-19_Clariom_S_Mouse_.CEL.gz
> boxplot(affy_raw)
> sessionInfo()
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 
[2] LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

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

other attached packages:
 [1] pd.clariom.s.mouse_3.14.1   GEOquery_2.66.0            
 [3] hapmap100kxba_1.40.0        pd.mapping50k.xba240_3.12.0
 [5] DBI_1.1.3                   RSQLite_2.3.0              
 [7] BiocManager_1.30.19         oligo_1.62.2               
 [9] Biostrings_2.66.0           GenomeInfoDb_1.34.9        
[11] XVector_0.38.0              IRanges_2.32.0             
[13] S4Vectors_0.36.2            Biobase_2.58.0             
[15] oligoClasses_1.60.0         BiocGenerics_0.44.0        

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.10                 lattice_0.20-45            
 [3] tidyr_1.3.0                 foreach_1.5.2              
 [5] utf8_1.2.3                  R6_2.5.1                   
 [7] pillar_1.9.0                zlibbioc_1.44.0            
 [9] rlang_1.1.0                 curl_5.0.0                 
[11] data.table_1.14.8           blob_1.2.4                 
[13] Matrix_1.5-1                preprocessCore_1.60.2      
[15] splines_4.2.2               readr_2.1.4                
[17] RCurl_1.98-1.12             bit_4.0.5                  
[19] DelayedArray_0.24.0         compiler_4.2.2             
[21] pkgconfig_2.0.3             tidyselect_1.2.0           
[23] SummarizedExperiment_1.28.0 tibble_3.2.1               
[25] GenomeInfoDbData_1.2.9      ff_4.0.9                   
[27] codetools_0.2-18            matrixStats_0.63.0         
[29] fansi_1.0.4                 crayon_1.5.2               
[31] dplyr_1.1.1                 tzdb_0.3.0                 
[33] bitops_1.0-7                grid_4.2.2                 
[35] lifecycle_1.0.3             magrittr_2.0.3             
[37] cli_3.6.1                   cachem_1.0.7               
[39] affyio_1.68.0               limma_3.54.2               
[41] xml2_1.3.3                  generics_0.1.3             
[43] vctrs_0.6.1                 iterators_1.0.14           
[45] tools_4.2.2                 bit64_4.0.5                
[47] glue_1.6.2                  purrr_1.0.1                
[49] hms_1.1.3                   MatrixGenerics_1.10.0      
[51] fastmap_1.1.1               GenomicRanges_1.50.2       
[53] memoise_2.0.1               affxparser_1.70.0
ADD COMMENT

Login before adding your answer.

Traffic: 558 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6