[BioC] MA plots for large number of arrays

James W. MacDonald jmacdon at med.umich.edu
Wed Nov 2 15:58:40 CET 2011


I should add that the plotMA() function won't do this for all arrays 
automagically. However something like

pdf("MAplots.pdf")
lapply(1:ncol(matrixOfArrays), function(x) plotMA(matrixOfArrays, x))
dev.off()

will do so. However, a pdf of 250 MA plots will be absolutely huge. 
Vector graphics with lots of points are not fun. Alternatives would be 
to create jpeg files, or to 'roll your own' using smoothScatter() 
instead of plot(). Something similar to

maplot <- function(mat){
     x <- apply(mat, 1, median, na.rm = TRUE)
     for(i in seq_len(ncol(mat))){
         y <- mat[,i] - x
         smoothScatter(y~x, main = colnames(mat)[i], xlab = "A", ylab = "M")
     }
}

Best,

Jim




On 11/2/2011 10:43 AM, James W. MacDonald wrote:
> Hi Juliet,
>
> On 11/2/2011 10:23 AM, Juliet Hannah wrote:
>> All,
>>
>> I have illumina arrays (~250)  and I was looking at the options for MA
>> plots in the lumi package and the beadarray package. It seems they are
>> all giving pairwise plots.
>>
>> When I have had a large number of Affy arrays, I have had success with
>> the MAplot function in affyPLM because I believe it takes the median
>> of all
>> arrays and then gives me one pdf comparing each array to the reference.
>>
>> Does anyone know of a general function similar to this that I can use
>> on a matrix.
>
> The plotMA() function in limma will do this.
>
> Best,
>
> Jim
>
>
>>
>> Thanks!
>>
>> Juliet
>>
>>> sessionInfo()
>> R version 2.14.0 (2011-10-31)
>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>
>> locale:
>>   [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>>   [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>   [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>>   [7] LC_PAPER=C                 LC_NAME=C
>>   [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] lumi_2.6.0      nleqslv_1.9.0   methylumi_2.0.0 Biobase_2.14.0
>>
>> loaded via a namespace (and not attached):
>>   [1] affy_1.32.0           affyio_1.22.0         annotate_1.32.0
>>   [4] AnnotationDbi_1.16.0  BiocInstaller_1.2.0   DBI_0.2-5
>>   [7] grid_2.14.0           hdrcde_2.15           IRanges_1.12.0
>> [10] KernSmooth_2.23-6     lattice_0.20-0        MASS_7.3-16
>> [13] Matrix_1.0-1          mgcv_1.7-9            nlme_3.1-102
>> [16] preprocessCore_1.16.0 RSQLite_0.10.0        tools_2.14.0
>> [19] xtable_1.6-0          zlibbioc_1.0.0
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: 
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826

**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 



More information about the Bioconductor mailing list