Problem with maplot {affy} method when using rma {affy} method output as its input
Entering edit mode
Mj.A. • 0
Last seen 5 days ago

When I want to create an MA plot from the data normalized by rma method, the following error is shown. Could anybody help me solve this issue?

> library(affy)
> library(GEOquery)
> library(tidyverse)

> getGEOSuppFiles("GSE57178")
> untar("GSE57178/GSE57178_RAW.tar", exdir = "data/")
> data.affy <- ReadAffy(celfile.path = "data/")

> data.rma <- rma(data.affy)
> MAplot(data.rma, which = c(1:18), plot.method = "smoothScatter", type = "pm")
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function MAplot for signature "ExpressionSet"

> sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/ 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/

 [1] LC_CTYPE=en_US.UTF-8      
 [2] LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8      
 [8] LC_NAME=C                 
 [9] LC_ADDRESS=C              
[10] LC_TELEPHONE=C            

tzcode source: system (glibc)

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

other attached packages:
 [1] hugene10stv1cdf_2.18.0 lubridate_1.9.3       
 [3] forcats_1.0.0          stringr_1.5.1         
 [5] dplyr_1.1.4            purrr_1.0.2           
 [7] readr_2.1.5            tidyr_1.3.1           
 [9] tibble_3.2.1           ggplot2_3.5.0         
[11] tidyverse_2.0.0        GEOquery_2.70.0       
[13] affy_1.80.0            Biobase_2.62.0        
[15] BiocGenerics_0.48.1
maplot_function rma_function ExpressionSet MicroarrayData affy • 202 views
Entering edit mode
Last seen 3 days ago
United States

The MAplot function from affy is meant for AffyBatch objects, not ExpressionSet, which is why you get the error. You can figure this out for yourself by checking the help page (which you seem to have done already - note that once you have summarized an AffyBatch, there are no longer any PM probes, so using type = "pm" should have been a hint). Alternatively, you can check the methods.

> showMethods(MAplot)
Function: MAplot (package affy)

Which indicates there is only dispatch on an AffyBatch.

You could do

MAplot(data.affy, plot.method = "smoothScatter", type = "pm")

To get MA plots for the PM probes. By definition this will use a pseudo-median as the comparator, and if that is what you are after (for the ExpressionSet), one alternative is in my affycoretools package.

Entering edit mode

Thank you so much. I watched a video from Harvard in which the instructor used affy::MAplot for output of rma function and it worked for them without any error. I think that the implementation of one of the two functions may have been changed afterward which results in this error. I wonder, is there another alternative that its output plot is like that of the affy::MAplot ? This can help for easier comparison between before and after normalization, as affycoretools::maplot is not implemented for AffyBatch objects.


Login before adding your answer.

Traffic: 428 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6