[BioC] Boxplots, different results?

J.delasHeras at ed.ac.uk J.delasHeras at ed.ac.uk
Tue Jul 11 16:20:10 CEST 2006


Aha! I got it at last!!!!

the problem was that my MAw object contains 6 slides, of which I was 
trying to select 3 to make the boxplots... but wasn't indicating that 
properly (except for type (b) in which I was just unable to make it 
work unless I used all slides)

If I take all 6 slides everything makes sense:

> A<-boxplot(MAw$M[,1],MAw$M[,2],MAw$M[,3],MAw$M[,4],MAw$M[,5],MAw$M[,6])
> A$n
[1] 9181 9435 9331 8743 9065 9696
> C<-boxplot(split(MAw$M[,1:6], col(MAw$M[,1:6])))
> C$n
[1] 9181 9435 9331 8743 9065 9696
> CC<-boxplot(split(MAw$M, col(MAw$M[,1:6])))
> CC$n
[1] 9181 9435 9331 8743 9065 9696
> B<-boxplot(MAw$M ~ col(MAw$M[,1:6]))
> B$n
[1] 8109 8109 8109 8109 8109 8109
> B<-boxplot(MAw$M ~ col(MAw$M))
> B$n
[1] 8109 8109 8109 8109 8109 8109


Thanks Ligia!

regards,

Jose




Quoting ligia at ebi.ac.uk:

> Hi, Jose
>
> I've also noticed this feature some time ago.
> It is related with the way they handle missing data.
>
> For example, if you save the output of boxplot in either case, we can see
> that:
> a = boxplot(MA$M[,1],MA$M[,2],MA$M[,3])
> b = boxplot(MAw$M ~ col(MAw$M[,1:3]))
>
> the number of observations is different:
>
> a$n
> b$n
>
> Because option (b) is removing the NA entries that are common to all the
> columns in MAw$M, so you'll have less data points in each vector.
>
> However, if you use the command "split" we this will work, giving the same
> results as option (a):
>
> boxplot(split(MAw$M, col(MAw$M[,1:3])))
>
>
> Best wishes,
> Ligia
>
>
>>
>> Hi,
>>
>> I am using limma to analyse my cDNA expression arrays (2 channel).
>>
>> I am looking at boxplots generated from the M values of my arrays (MA =
>> product of 'normalizeWithinArrays', but I am not sure I understand the
>> syntax and what the 'boxplot' function is doing.
>>
>> This is because I get slightly different plots if I try (a) or (b)
>> below, which
>> I thought would be equivalent. Am I missing something?
>>
>> (a)
>> boxplot(MA$M[,1],MA$M[,2],MA$M[,3])
>>
>> (b)
>> boxplot(MAw$M ~ col(MAw$M[,1:3]))
>>
>> The differences are noticeable on teh spots outside the "whiskers". The
>> main box and whiskers themselves *appear* to be the same. I guess some
>> defaults must be different when defining the data as a formula or
>> explicitly naming the vectors... but I'm not finding an obvious note as
>> to which ones they may be?
>>
>> thanks for your help,
>>
>> Jose
>>
>>
>> --
>> Dr. Jose I. de las Heras                      Email: J.delasHeras at ed.ac.uk
>> The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
>> Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
>> Swann Building, Mayfield Road
>> University of Edinburgh
>> Edinburgh EH9 3JR
>> UK
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>
>



-- 
Dr. Jose I. de las Heras                      Email: J.delasHeras at ed.ac.uk
The Wellcome Trust Centre for Cell Biology    Phone: +44 (0)131 6513374
Institute for Cell & Molecular Biology        Fax:   +44 (0)131 6507360
Swann Building, Mayfield Road
University of Edinburgh
Edinburgh EH9 3JR
UK



More information about the Bioconductor mailing list